Verovio
Source code documentation
pagemilestone.h
1 // Name: pagemilestone.h
3 // Author: Laurent Pugin
4 // Created: 2021
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_PAGE_MILESTONE_H__
9 #define __VRV_PAGE_MILESTONE_H__
10 
11 #include "pageelement.h"
12 #include "vrvdef.h"
13 
14 namespace vrv {
15 
16 class Measure;
17 class Object;
18 
19 //----------------------------------------------------------------------------
20 // PageMilestoneEnd
21 //----------------------------------------------------------------------------
22 
26 class PageMilestoneEnd : public PageElement {
27 public:
32  PageMilestoneEnd(Object *start);
34  virtual ~PageMilestoneEnd();
35  void Reset() override;
36  std::string GetClassName() const override { return "pageMilestoneEnd"; }
38 
42  Object *GetStart() { return m_start; }
44  const Object *GetStart() const { return m_start; }
45  std::string GetStartClassName() const { return m_startClassName; }
47 
48  //----------//
49  // Functors //
50  //----------//
51 
55  FunctorCode Accept(Functor &functor) override;
57  FunctorCode Accept(ConstFunctor &functor) const override;
58  FunctorCode AcceptEnd(Functor &functor) override;
59  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
61 
62 protected:
63  //
64 private:
65  //
66 public:
67  //
68 protected:
69  Object *m_start;
70 
71 private:
73  std::string m_startClassName;
74 };
75 
76 //----------------------------------------------------------------------------
77 // PageMilestoneInterface
78 //----------------------------------------------------------------------------
79 
84 public:
91  virtual ~PageMilestoneInterface();
92  virtual void Reset();
94 
99  void SetEnd(PageMilestoneEnd *end);
101  PageMilestoneEnd *GetEnd() { return m_end; }
102  const PageMilestoneEnd *GetEnd() const { return m_end; }
103  bool IsPageMilestone() const { return (m_end != NULL); }
105 
109  void ConvertToPageBasedMilestone(Object *object, Object *parent);
110 
111  //-----------------//
112  // Pseudo functors //
113  //-----------------//
114 
115 protected:
116  //
117 private:
118  //
119 public:
120  //
121 protected:
126 
127 private:
128 };
129 
130 } // namespace vrv
131 
132 #endif
vrv::PageMilestoneInterface
This class is an interface for container elements that have to be turned to milestones in a page-base...
Definition: pagemilestone.h:83
vrv::PageElement
This class represents elements appearing within a page.
Definition: pageelement.h:25
vrv::Object
This class represents a basic object.
Definition: object.h:59
vrv::Functor
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
vrv::PageMilestoneEnd
This class models an end milestone element and has no MEI equivalent.
Definition: pagemilestone.h:26
vrv::ConstFunctor
This abstract class is the base class for all const functors.
Definition: functor.h:126
vrv::PageMilestoneEnd::Reset
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
vrv::PageMilestoneEnd::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
vrv::PageMilestoneInterface::m_end
PageMilestoneEnd * m_end
The corresponding end element.
Definition: pagemilestone.h:125