9 #ifndef __VRV_KEYSIG_H__
10 #define __VRV_KEYSIG_H__
16 #include "atts_analytical.h"
17 #include "atts_shared.h"
18 #include "atts_visual.h"
20 #include "layerelement.h"
24 class ScoreDefInterface;
33 data_ACCIDENTAL_WRITTEN accid;
52 public AttVisibility {
63 std::string GetClassName()
const override {
return "keySig"; }
93 void GenerateKeyAccidAttribChildren();
106 void FillMap(MapOfOctavedPitchAccid &mapOfPitchAccid)
const;
108 int GetFifthsInt()
const;
115 void ResetDrawingClef();
116 void SetDrawingClef(
Clef *clef);
126 static data_PITCHNAME
GetAccidPnameAt(data_ACCIDENTAL_WRITTEN alterationType,
int pos);
127 static int GetOctave(data_ACCIDENTAL_WRITTEN alterationType, data_PITCHNAME pitch,
const Clef *clef);
139 FunctorCode AcceptEnd(
Functor &functor)
override;
140 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
147 void FilterList(ListOfConstObjects &childList)
const override;
153 std::optional<KeyAccidInfo> GetKeyAccidInfoAt(
int pos)
const;
162 data_ACCIDENTAL_WRITTEN m_drawingCancelAccidType;
163 char m_drawingCancelAccidCount;
170 static const data_PITCHNAME s_pnameForFlats[];
171 static const data_PITCHNAME s_pnameForSharps[];
178 std::optional<Clef> m_drawingClef;
184 static const int octave_map[2][9][7];
This class models the MEI <clef> element.
Definition: clef.h:39
This abstract class is the base class for all const functors.
Definition: functor.h:126
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
This class models the MEI <keySig> element.
Definition: keysig.h:52
static data_PITCHNAME GetAccidPnameAt(data_ACCIDENTAL_WRITTEN alterationType, int pos)
Static methods for calculating position;.
void FillMap(MapOfOctavedPitchAccid &mapOfPitchAccid) const
Fill the map of modified pitches.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
bool AddChildAdditionalCheck(Object *child) override
Additional check when adding a child.
void FilterList(ListOfConstObjects &childList) const override
Filter the flat list and keep only StaffDef elements.
data_ACCIDENTAL_WRITTEN GetAccidType() const
Accid type getter.
bool HasNonAttribKeyAccidChildren() const
Generate KeyAccid attribute children.
Clef * GetDrawingClef()
Set/Get the drawing clef.
bool IsSupportedChild(ClassId classId) override
Add an element (a keyAccid) to a keySig.
bool IsScoreDefElement() const override
Override the method since check is required.
Definition: keysig.h:70
Object * Clone() const override
Method call for copying child classes.
Definition: keysig.h:61
data_KEYSIGNATURE ConvertToSig() const
Try to convert a keySig content (keyAccid) to a @sig value This can work only if the content represen...
void Reset() override
Virtual reset method.
bool HasToBeAligned() const override
Override the method since alignment is required.
Definition: keysig.h:67
bool m_skipCancellation
Variables for storing cancellation introduced by the key sig.
Definition: keysig.h:161
int GetAccidCount(bool fromAttribute=false) const
Accid number getter.
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:51
This class represents a basic object.
Definition: object.h:61
Object * GetFirstAncestor(const ClassId classId, int maxSteps=-1)
Return the first ancestor of the specified type.
Object * GetParent()
Get the parent of the Object.
Definition: object.h:383
This class is an pseudo interface for elements maintaining a flat list of children LayerElement for p...
Definition: object.h:893
Useful information regarding a KeyAccid child.
Definition: keysig.h:32