Verovio
Source code documentation
annotscore.h
1 // Name: annotscore.h
3 // Author: David Lewis
4 // Created: 2024
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_ANNOTSCORE_H__
9 #define __VRV_ANNOTSCORE_H__
10 
11 #include "controlelement.h"
12 #include "plistinterface.h"
13 #include "timeinterface.h"
14 
15 namespace vrv {
16 
17 //----------------------------------------------------------------------------
18 // AnnotScore
19 //----------------------------------------------------------------------------
20 
25 public:
31  AnnotScore();
32  virtual ~AnnotScore();
33  Object *Clone() const override { return new AnnotScore(*this); }
34  void Reset() override;
35  std::string GetClassName() const override { return "annot"; }
37 
42  PlistInterface *GetPlistInterface() override { return vrv_cast<PlistInterface *>(this); }
43  const PlistInterface *GetPlistInterface() const override { return vrv_cast<const PlistInterface *>(this); }
44  TimePointInterface *GetTimePointInterface() override { return vrv_cast<TimePointInterface *>(this); }
45  const TimePointInterface *GetTimePointInterface() const override
46  {
47  return vrv_cast<const TimePointInterface *>(this);
48  }
49  TimeSpanningInterface *GetTimeSpanningInterface() override { return vrv_cast<TimeSpanningInterface *>(this); }
50  const TimeSpanningInterface *GetTimeSpanningInterface() const override
51  {
52  return vrv_cast<const TimeSpanningInterface *>(this);
53  }
54 
58  int GetBoxHeight(const Doc *doc, int unit) const;
59  int GetLineWidth(const Doc *doc, int unit) const;
60 
65  bool IsSupportedChild(ClassId classId) override;
66 
68 
69  //----------//
70  // Functors //
71  //----------//
72 
77  FunctorCode Accept(Functor &functor) override;
78  FunctorCode Accept(ConstFunctor &functor) const override;
79  FunctorCode AcceptEnd(Functor &functor) override;
80  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
82 
83 protected:
84  //
85 private:
86  //
87 public:
88  //
89 private:
90 };
91 
92 } // namespace vrv
93 
94 #endif
This class models the MEI <annot> element where @type is score.
Definition: annotscore.h:24
void Reset() override
Virtual reset method.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
Object * Clone() const override
Method call for copying child classes.
Definition: annotscore.h:33
bool IsSupportedChild(ClassId classId) override
Add a text element to an annotation.
int GetBoxHeight(const Doc *doc, int unit) const
Get a value for the height of the drawn box and the border width.
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:33
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 represents a basic object.
Definition: object.h:61
This class is an interface for elements having a single time point, such as tempo,...
Definition: plistinterface.h:29
This class is an interface for spanning elements, such as slur, hairpin, etc.
Definition: timeinterface.h:145