LibMusicXML 3.22
|
An xml tree browser that "unroll" the score. More...
#include <unrolled_xml_tree_browser.h>
Public Member Functions | |
unrolled_xml_tree_browser (basevisitor *v) | |
virtual void | visitStart (Sxmlelement &elt) |
virtual void | visitStart (S_measure &elt) |
virtual void | visitStart (S_ending &elt) |
virtual void | visitStart (S_repeat &elt) |
virtual void | visitStart (S_part &elt) |
virtual void | visitStart (S_sound &elt) |
virtual void | browse (xmlelement &t) |
virtual void | forwardBrowse (xmlelement &t) |
virtual void | enter (xmlelement &t) |
virtual void | leave (xmlelement &t) |
Public Member Functions inherited from visitor< Sxmlelement > | |
virtual void | visitEnd (Sxmlelement &elt) |
Public Member Functions inherited from visitor< S_measure > | |
virtual void | visitEnd (S_measure &elt) |
Public Member Functions inherited from visitor< S_ending > | |
virtual void | visitEnd (S_ending &elt) |
Public Member Functions inherited from visitor< S_repeat > | |
virtual void | visitEnd (S_repeat &elt) |
Public Member Functions inherited from visitor< S_part > | |
virtual void | visitEnd (S_part &elt) |
Public Member Functions inherited from visitor< S_sound > | |
virtual void | visitEnd (S_sound &elt) |
Protected Attributes | |
basevisitor * | fVisitor |
ctree< xmlelement >::literator | fFirstMeasure |
the first measure iterator | |
ctree< xmlelement >::literator | fForwardRepeat |
the forward repeat location | |
ctree< xmlelement >::literator | fEndIterator |
indicates the end of to visit | |
ctree< xmlelement >::literator | fNextIterator |
indicates the next elt to visit | |
ctree< xmlelement >::literator | fSegnoIterator |
the segno location | |
ctree< xmlelement >::literator | fCodaIterator |
the segno location | |
ctree< xmlelement >::literator * | fStoreIterator |
a pointer to store the current iterator | |
int | fStoreDelay |
an iterations counter for delayed store |
To "unroll" the score, structural information denoted by repeat, ending, coda and segno signs is interpreted and the score is visited similarly to a musician that would play the score ie: for example a section repeated twice is visited twice.
The unrolled_xml_tree_browser makes use of iterators collected along the visit and makes arbitrary jumps to these iterators to modify the tree visit. These iterators are expected to contains S_measure iterators only. This is ensured by the visit(S_part) method.
When visiting measures, forwarding the visit to the embedded visitor depends on the current state. In particular, it is verified that the current time a given measure is played corresponds to the expected time (if any), and that we're not currently jumping to a coda, which location could be unknown at the time of the jump.
|
virtual |
Implements browser< xmlelement >.
|
virtual |
Reimplemented from visitor< S_ending >.
|
virtual |
Reimplemented from visitor< S_measure >.
|
virtual |
Reimplemented from visitor< S_part >.
|
virtual |
Reimplemented from visitor< S_repeat >.
|
virtual |
Reimplemented from visitor< S_sound >.
|
virtual |
Reimplemented from visitor< Sxmlelement >.