Verovio
Source code documentation
All Classes Namespaces Functions Variables Typedefs Enumerations Modules
mnum.h
1 // Name: mnum.h
3 // Author: Klaus Rettinghaus
4 // Created: 2018
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_MNUM_H__
9 #define __VRV_MNUM_H__
10 
11 #include "controlelement.h"
12 #include "textdirinterface.h"
13 #include "timeinterface.h"
14 
15 namespace vrv {
16 
17 class TextElement;
18 
19 //----------------------------------------------------------------------------
20 // MNum
21 //----------------------------------------------------------------------------
22 
26 class MNum : public ControlElement,
27  public TextListInterface,
28  public TextDirInterface,
29  public TimePointInterface,
30  public AttLang,
31  public AttTypography {
32 public:
37  MNum();
39  virtual ~MNum();
40  Object *Clone() const override { return new MNum(*this); }
41  void Reset() override;
42  std::string GetClassName() const override { return "mNum"; }
44 
48  TextDirInterface *GetTextDirInterface() override { return vrv_cast<TextDirInterface *>(this); }
50  const TextDirInterface *GetTextDirInterface() const override { return vrv_cast<const TextDirInterface *>(this); }
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 
62  bool IsSupportedChild(ClassId classId) override;
63 
67  bool IsGenerated() const { return m_isGenerated; }
69  void IsGenerated(bool isGenerated) { m_isGenerated = isGenerated; }
71 
72  //----------//
73  // Functors //
74  //----------//
75 
79  FunctorCode Accept(Functor &functor) override;
81  FunctorCode Accept(ConstFunctor &functor) const override;
82  FunctorCode AcceptEnd(Functor &functor) override;
83  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
85 
86 private:
90  bool m_isGenerated;
91 };
92 
93 } // namespace vrv
94 
95 #endif
vrv::MNum::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
vrv::Object
This class represents a basic object.
Definition: object.h:59
vrv::MNum::Reset
void Reset() override
Virtual reset method.
vrv::MNum
This class models the MEI <mNum> element.
Definition: mnum.h:26
vrv::TextListInterface
This class is an pseudo interface for elements maintaining a flat list of children LayerElement for p...
Definition: object.h:972
vrv::TextDirInterface
This class is an interface for elements implementing a text directive, such as <dir>,...
Definition: textdirinterface.h:26
vrv::MNum::IsSupportedChild
bool IsSupportedChild(ClassId classId) override
Add an element (text, rend.
vrv::MNum::Clone
Object * Clone() const override
Method call for copying child classes.
Definition: mnum.h:40
vrv::ControlElement
This class represents elements appearing within a measure.
Definition: controlelement.h:28
vrv::TimePointInterface
This class is an interface for elements having a single time point, such as tempo,...
Definition: timeinterface.h:35