|
MUSX Document Model
|
Iterator-style wrapper for workaround-aware voice traversal. More...
#include <Entries.h>
Public Member Functions | |
| InterpretedIterator ()=default | |
| Default constructor allows null return values by caller. | |
| const EntryInfoPtr & | getEntryInfo () const noexcept |
| Returns the entry at the current iterator position. | |
| bool | getEffectiveHidden () const noexcept |
| Returns whether the entry should be treated as hidden. | |
| util::Fraction | getEffectiveActualDuration (bool global=false) const |
| Return the effective actual duration of the entry. Calling code using InterpretedIterator should use this value rather than the one in the entry. | |
| util::Fraction | getEffectiveElapsedDuration (bool global=false) const |
| Return the effective elapsed duration of the entry. Calling code using InterpretedIterator should use this value rather than the one in the entry. | |
| util::Fraction | getEffectiveMeasureStaffDuration () const |
| Return the effective measure staff duration of the entry. Calling code using InterpretedIterator should use this value rather than the one in the entry. | |
| bool | calcIsPastLogicalEndOfFrame () const |
| Returns true is this entry is past the logical end of the frame, as defined by the length of the measure on the frame's staff. | |
| InterpretedIterator | getNext () const |
| Returns an iterator advanced to the next usable entry in this voice. | |
| InterpretedIterator | getPrevious () const |
| Returns an iterator advanced to the previous usable entry in this voice. | |
| operator bool () const noexcept | |
| Allows the iterator to be used directly in boolean contexts. | |
Friends | |
| class | EntryFrame |
| class | EntryInfoPtr |
Iterator-style wrapper for workaround-aware voice traversal.
Currently, InterpretedIterator implements only the "beamed-rest workaround". This is the common Finale technique where additional rests are inserted solely to shape beams (for example, to create 16th-note hooks over internal rests by hiding or duplicating rests between voiced layers).
Whenever a position is selected or advanced (including the initial position returned by EntryFrame::getFirstInterpretedIterator), the following rules are applied:
false.isHidden value. isHidden value.Handles traversal of beams created by zero-length tuplets. See EntryFrame::TupletInfo::calcCreatesSingletonBeamRight for more information.
If no usable entry exists at or beyond the current position, the iterator evaluates to false in a boolean context and getEntry() returns a null EntryInfoPtr.
InterpretedIterator represents a single position in a voice-1 or voice-2 entry sequence using musxdom's interpretation of Finale user workarounds. It is obtained from EntryFrame::getFirstInterpretedIterator and advanced with InterpretedIterator::getNext().
The iterator encapsulates:
| util::Fraction musx::dom::EntryInfoPtr::InterpretedIterator::getEffectiveActualDuration | ( | bool | global = false | ) | const |
Return the effective actual duration of the entry. Calling code using InterpretedIterator should use this value rather than the one in the entry.
| global | If true, return the global effective actual duration. |
| util::Fraction musx::dom::EntryInfoPtr::InterpretedIterator::getEffectiveElapsedDuration | ( | bool | global = false | ) | const |
Return the effective elapsed duration of the entry. Calling code using InterpretedIterator should use this value rather than the one in the entry.
| global | If true, return the global effective elapsed duration. |
|
inlinenoexcept |
Returns whether the entry should be treated as hidden.
true if the entry is effectively hidden after applying workaround rules described in the class documentation and false if it is effectively unhidden.
|
inlinenoexcept |
Returns the entry at the current iterator position.
| EntryInfoPtr::InterpretedIterator musx::dom::EntryInfoPtr::InterpretedIterator::getNext | ( | ) | const |
Returns an iterator advanced to the next usable entry in this voice.
The same workaround rules described in the class documentation are applied when selecting the next position.
| EntryInfoPtr::InterpretedIterator musx::dom::EntryInfoPtr::InterpretedIterator::getPrevious | ( | ) | const |
Returns an iterator advanced to the previous usable entry in this voice.
The same workaround rules described in the class documentation are applied when selecting the previous position.
|
inlineexplicitnoexcept |
Allows the iterator to be used directly in boolean contexts.
true if the iterator currently refers to a usable entry; false if iteration is exhausted.