Verovio
Source code documentation
turn.h
1 // Name: turn.h
3 // Author: Klaus Rettinghaus
4 // Created: 2017
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_TURN_H__
9 #define __VRV_TURN_H__
10 
11 #include "atts_cmn.h"
12 #include "atts_cmnornaments.h"
13 #include "atts_externalsymbols.h"
14 #include "controlelement.h"
15 #include "timeinterface.h"
16 
17 namespace vrv {
18 
19 //----------------------------------------------------------------------------
20 // Turn
21 //----------------------------------------------------------------------------
22 
26 class Turn : public ControlElement,
27  public TimePointInterface,
28  public AttEnclosingChars,
29  public AttExtSymAuth,
30  public AttExtSymNames,
31  public AttOrnamentAccid,
32  public AttPlacementRelStaff,
33  public AttTurnLog {
34 public:
40  Turn();
41  virtual ~Turn();
42  Object *Clone() const override { return new Turn(*this); }
43  void Reset() override;
44  std::string GetClassName() const override { return "turn"; }
46 
51  TimePointInterface *GetTimePointInterface() override { return vrv_cast<TimePointInterface *>(this); }
52  const TimePointInterface *GetTimePointInterface() const override
53  {
54  return vrv_cast<const TimePointInterface *>(this);
55  }
57 
61  char32_t GetTurnGlyph() const;
62 
63  std::pair<char32_t, char32_t> GetEnclosingGlyphs() const;
64 
68  int GetTurnHeight(const Doc *doc, int staffSize) const;
69 
70  //----------//
71  // Functors //
72  //----------//
73 
78  FunctorCode Accept(Functor &functor) override;
79  FunctorCode Accept(ConstFunctor &functor) const override;
80  FunctorCode AcceptEnd(Functor &functor) override;
81  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
83 
84 protected:
85  //
86 private:
87  //
88 public:
93 
94 private:
95  //
96 };
97 
98 } // namespace vrv
99 
100 #endif
This abstract class is the base class for all const functors.
Definition: functor.h:126
This class represents elements appearing within a measure.
Definition: controlelement.h:35
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:51
This class represents a basic object.
Definition: object.h:64
This class is an interface for elements having a single time point, such as tempo,...
Definition: timeinterface.h:39
This class models the MEI <turn> element.
Definition: turn.h:33
int GetTurnHeight(const Doc *doc, int staffSize) const
Get the turn height ignoring slash.
char32_t GetTurnGlyph() const
Get the SMuFL glyph for the turn based on form or glyph.num.
LayerElement * m_drawingEndElement
The end point of a delayed turn when @startid is used.
Definition: turn.h:92
Object * Clone() const override
Method call for copying child classes.
Definition: turn.h:42
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
void Reset() override
Virtual reset method.