Verovio
Source code documentation
resetfunctor.h
1 // Name: resetfunctor.h
3 // Author: David Bauer
4 // Created: 2023
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_RESETFUNCTOR_H__
9 #define __VRV_RESETFUNCTOR_H__
10 
11 #include "functor.h"
12 
13 namespace vrv {
14 
15 //----------------------------------------------------------------------------
16 // ResetDataFunctor
17 //----------------------------------------------------------------------------
18 
22 class ResetDataFunctor : public Functor {
23 public:
29  virtual ~ResetDataFunctor() = default;
31 
32  /*
33  * Abstract base implementation
34  */
35  bool ImplementsEndInterface() const override { return false; }
36 
37  /*
38  * Functor interface
39  */
41  FunctorCode VisitAccid(Accid *accid) override;
42  FunctorCode VisitArpeg(Arpeg *arpeg) override;
43  FunctorCode VisitArtic(Artic *artic) override;
44  FunctorCode VisitBeam(Beam *beam) override;
45  FunctorCode VisitBeamSpan(BeamSpan *beamSpan) override;
46  FunctorCode VisitChord(Chord *chord) override;
47  FunctorCode VisitControlElement(ControlElement *controlElement) override;
48  FunctorCode VisitCustos(Custos *custos) override;
49  FunctorCode VisitDiv(Div *div) override;
50  FunctorCode VisitDot(Dot *dot) override;
51  FunctorCode VisitDots(Dots *dots) override;
52  FunctorCode VisitEditorialElement(EditorialElement *editorialElement) override;
53  FunctorCode VisitEnding(Ending *ending) override;
54  FunctorCode VisitF(F *f) override;
55  FunctorCode VisitFlag(Flag *flag) override;
56  FunctorCode VisitFloatingObject(FloatingObject *floatingObject) override;
57  FunctorCode VisitFTrem(FTrem *fTrem) override;
58  FunctorCode VisitHairpin(Hairpin *hairpin) override;
59  FunctorCode VisitLayer(Layer *layer) override;
60  FunctorCode VisitLayerElement(LayerElement *layerElement) override;
61  FunctorCode VisitLigature(Ligature *ligature) override;
62  FunctorCode VisitMeasure(Measure *measure) override;
63  FunctorCode VisitMRest(MRest *mRest) override;
64  FunctorCode VisitNote(Note *note) override;
65  FunctorCode VisitNc(Nc *nc) override;
66  FunctorCode VisitObject(Object *object) override;
67  FunctorCode VisitPage(Page *page) override;
68  FunctorCode VisitRepeatMark(RepeatMark *repeatMark) override;
69  FunctorCode VisitRest(Rest *rest) override;
70  FunctorCode VisitSection(Section *section) override;
71  FunctorCode VisitSlur(Slur *slur) override;
72  FunctorCode VisitStaff(Staff *staff) override;
73  FunctorCode VisitStaffDef(StaffDef *staffDef) override;
74  FunctorCode VisitStem(Stem *stem) override;
75  FunctorCode VisitSyl(Syl *syl) override;
76  FunctorCode VisitSystem(System *system) override;
77  FunctorCode VisitSystemMilestone(SystemMilestoneEnd *systemMilestoneEnd) override;
78  FunctorCode VisitTabDurSym(TabDurSym *tabDurSym) override;
79  FunctorCode VisitTempo(Tempo *tempo) override;
80  FunctorCode VisitTuplet(Tuplet *tuplet) override;
81  FunctorCode VisitTurn(Turn *turn) override;
82  FunctorCode VisitVerse(Verse *verse) override;
84 
85 protected:
86  //
87 private:
88  //
89 public:
90  //
91 private:
92  //
93 };
94 
95 //----------------------------------------------------------------------------
96 // ResetHorizontalAlignmentFunctor
97 //----------------------------------------------------------------------------
98 
103 public:
109  virtual ~ResetHorizontalAlignmentFunctor() = default;
111 
112  /*
113  * Abstract base implementation
114  */
115  bool ImplementsEndInterface() const override { return false; }
116 
117  /*
118  * Functor interface
119  */
121  FunctorCode VisitAccid(Accid *accid) override;
122  FunctorCode VisitArpeg(Arpeg *arpeg) override;
123  FunctorCode VisitBeam(Beam *beam) override;
124  FunctorCode VisitBeamSpan(BeamSpan *beamSpan) override;
125  FunctorCode VisitCustos(Custos *custos) override;
126  FunctorCode VisitDiv(Div *div) override;
127  FunctorCode VisitDot(Dot *dot) override;
128  FunctorCode VisitDots(Dots *dots) override;
129  FunctorCode VisitFloatingObject(FloatingObject *floatingObject) override;
130  FunctorCode VisitLayer(Layer *layer) override;
131  FunctorCode VisitLayerElement(LayerElement *layerElement) override;
132  FunctorCode VisitMeasure(Measure *measure) override;
133  FunctorCode VisitMRest(MRest *mRest) override;
134  FunctorCode VisitNote(Note *note) override;
135  FunctorCode VisitProport(Proport *proport) override;
136  FunctorCode VisitRest(Rest *rest) override;
137  FunctorCode VisitScoreDef(ScoreDef *scoreDef) override;
138  FunctorCode VisitSystem(System *system) override;
139  FunctorCode VisitTuplet(Tuplet *tuplet) override;
140  FunctorCode VisitTupletBracket(TupletBracket *tupletBracket) override;
141  FunctorCode VisitTupletNum(TupletNum *tupletNum) override;
143 
144 protected:
145  //
146 private:
147  //
148 public:
149  //
150 private:
151  //
152 };
153 
154 //----------------------------------------------------------------------------
155 // ResetVerticalAlignmentFunctor
156 //----------------------------------------------------------------------------
157 
162 public:
168  virtual ~ResetVerticalAlignmentFunctor() = default;
170 
171  /*
172  * Abstract base implementation
173  */
174  bool ImplementsEndInterface() const override { return false; }
175 
176  /*
177  * Functor interface
178  */
180  FunctorCode VisitArtic(Artic *artic) override;
181  FunctorCode VisitFloatingObject(FloatingObject *floatingObject) override;
182  FunctorCode VisitLayerElement(LayerElement *layerElement) override;
183  FunctorCode VisitOctave(Octave *octave) override;
184  FunctorCode VisitPage(Page *page) override;
185  FunctorCode VisitStaff(Staff *staff) override;
186  FunctorCode VisitSystem(System *system) override;
187  FunctorCode VisitTextElement(TextElement *textElement) override;
188  FunctorCode VisitTuplet(Tuplet *tuplet) override;
189  FunctorCode VisitTupletBracket(TupletBracket *tupletBracket) override;
191 
192 protected:
193  //
194 private:
195  //
196 public:
197  //
198 private:
199  //
200 };
201 
202 } // namespace vrv
203 
204 #endif // __VRV_RESETFUNCTOR_H__
vrv::StaffDef
This class represents a MEI staffDef.
Definition: staffdef.h:26
vrv::Staff
This class represents a staff in a laid-out score (Doc).
Definition: staff.h:102
vrv::Measure
This class represents a measure in a page-based score (Doc).
Definition: measure.h:37
vrv::Nc
This class models the MEI <nc> element.
Definition: nc.h:34
vrv::RepeatMark
This class models the MEI <ornam> element.
Definition: repeatmark.h:26
vrv::F
This class models the MEI <f> element.
Definition: f.h:24
vrv::Turn
This class models the MEI <turn> element.
Definition: turn.h:26
vrv::BeamSpan
This class models the MEI <beamSpan> element.
Definition: beamspan.h:31
vrv::Verse
Definition: verse.h:23
vrv::Tempo
This class is an interface for <tempo> elements at the measure level.
Definition: tempo.h:27
vrv::Div
This class represents an MEI Div.
Definition: div.h:24
vrv::FTrem
This class models the MEI <fTrem> element.
Definition: ftrem.h:25
vrv::TabDurSym
This class models the MEI <tabDurSym> element.
Definition: tabdursym.h:25
vrv::Ending
This class represents a MEI ending.
Definition: ending.h:28
vrv::TextElement
Definition: textelement.h:22
vrv::Dots
This class models a group of dots as a layer element part and has no direct MEI equivalent.
Definition: elementpart.h:27
vrv::TupletBracket
This class models a bracket as a layer element part and has no direct MEI equivalent.
Definition: elementpart.h:150
vrv::Section
This class represents a MEI section.
Definition: section.h:28
vrv::Chord
This class represents a collection of notes in the same layer with the same onset time.
Definition: chord.h:32
vrv::Accid
This class models the MEI <accid> element.
Definition: accid.h:27
vrv::Object
This class represents a basic object.
Definition: object.h:59
vrv::ResetVerticalAlignmentFunctor
This class resets the vertical alignment for various types.
Definition: resetfunctor.h:161
vrv::Slur
Definition: slur.h:53
vrv::Flag
This class models a stem as a layer element part and has no direct MEI equivalent.
Definition: elementpart.h:97
vrv::ResetVerticalAlignmentFunctor::ImplementsEndInterface
bool ImplementsEndInterface() const override
Return true if the functor implements the end interface.
Definition: resetfunctor.h:174
vrv::ResetHorizontalAlignmentFunctor
This class resets the horizontal alignment for various types.
Definition: resetfunctor.h:102
vrv::Ligature
This class represents a collection of notes in the same layer with successive onset times,...
Definition: ligature.h:28
vrv::ResetHorizontalAlignmentFunctor::ImplementsEndInterface
bool ImplementsEndInterface() const override
Return true if the functor implements the end interface.
Definition: resetfunctor.h:115
vrv::SystemMilestoneEnd
This class models an end milestone element at the system level.
Definition: systemmilestone.h:28
vrv::Artic
Definition: artic.h:22
vrv::Functor
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
vrv::Octave
This class models the MEI <octave> element.
Definition: octave.h:25
vrv::Beam
Definition: beam.h:279
vrv::Proport
This class models the MEI <proport> element.
Definition: proport.h:23
vrv::Arpeg
This class models the MEI <arpeg> element.
Definition: arpeg.h:26
vrv::TupletNum
This class models a tuplet num as a layer element part and has no direct MEI equivalent.
Definition: elementpart.h:249
vrv::FloatingObject
This class represents elements appearing within a measure.
Definition: floatingobject.h:28
vrv::Custos
Definition: custos.h:24
vrv::Note
This class models the MEI <note> element.
Definition: note.h:47
vrv::Page
This class represents a page in a laid-out score (Doc).
Definition: page.h:31
vrv::ResetDataFunctor::ImplementsEndInterface
bool ImplementsEndInterface() const override
Return true if the functor implements the end interface.
Definition: resetfunctor.h:35
vrv::Dot
Definition: dot.h:22
vrv::System
This class represents a system in a laid-out score (Doc).
Definition: system.h:36
vrv::Syl
Syl is a TimeSpanningInterface for managing syllable connectors.
Definition: syl.h:31
vrv::Stem
This class models a stem as a layer element part and as MEI <stem> element.
Definition: stem.h:27
vrv::EditorialElement
This class is a base class for the editorial element containing musical content, for example <rgd> or...
Definition: editorial.h:38
vrv::ScoreDef
This class represents a MEI scoreDef.
Definition: scoredef.h:129
vrv::Tuplet
Definition: tuplet.h:28
vrv::MRest
This class models the MEI <mRest> element.
Definition: mrest.h:27
vrv::Rest
This class models the MEI <rest> element.
Definition: rest.h:37
vrv::ControlElement
This class represents elements appearing within a measure.
Definition: controlelement.h:28
vrv::LayerElement
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:46
vrv::Layer
This class represents a layer in a laid-out score (Doc).
Definition: layer.h:33
vrv::ResetDataFunctor
This class resets the drawing values before calling PrepareData after changes.
Definition: resetfunctor.h:22
vrv::Hairpin
This class models the MEI <hairpin> element.
Definition: hairpin.h:25