Verovio
Source code documentation
custos.h
1 // Name: custos.h
3 // Author: Laurent Pugin
4 // Created: 2014
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_CUSTOS_H__
9 #define __VRV_CUSTOS_H__
10 
11 #include "accid.h"
12 #include "atts_analytical.h"
13 #include "atts_shared.h"
14 #include "layerelement.h"
15 #include "offsetinterface.h"
16 #include "pitchinterface.h"
17 #include "positioninterface.h"
18 
19 namespace vrv {
20 
21 //----------------------------------------------------------------------------
22 // Custos
23 //----------------------------------------------------------------------------
24 
25 class Custos : public LayerElement,
26  public OffsetInterface,
27  public PitchInterface,
28  public PositionInterface,
29  public AttColor,
30  public AttExtSymAuth,
31  public AttExtSymNames {
32 public:
38  Custos();
39  virtual ~Custos();
40  Object *Clone() const override { return new Custos(*this); }
41  void Reset() override;
42  std::string GetClassName() const override { return "custos"; }
44 
49  OffsetInterface *GetOffsetInterface() override { return vrv_cast<OffsetInterface *>(this); }
50  const OffsetInterface *GetOffsetInterface() const override { return vrv_cast<const OffsetInterface *>(this); }
51  PitchInterface *GetPitchInterface() override { return vrv_cast<PitchInterface *>(this); }
52  const PitchInterface *GetPitchInterface() const override { return vrv_cast<const PitchInterface *>(this); }
54 
56  bool HasToBeAligned() const override { return true; }
57 
61  bool IsSupportedChild(ClassId classId) override;
62 
66  char32_t GetCustosGlyph(const data_NOTATIONTYPE notationType) const;
67 
68  //----------//
69  // Functors //
70  //----------//
71 
76  FunctorCode Accept(Functor &functor) override;
77  FunctorCode Accept(ConstFunctor &functor) const override;
78  FunctorCode AcceptEnd(Functor &functor) override;
79  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
81 
82 private:
83  //
84 public:
85  //
86 private:
87 };
88 
89 } // namespace vrv
90 
91 #endif
This abstract class is the base class for all const functors.
Definition: functor.h:126
Definition: custos.h:31
char32_t GetCustosGlyph(const data_NOTATIONTYPE notationType) const
Return a SMuFL code for the custos.
bool HasToBeAligned() const override
Override the method since alignment is required.
Definition: custos.h:56
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
bool IsSupportedChild(ClassId classId) override
Add an accid to a custos.
void Reset() override
Virtual reset method.
Object * Clone() const override
Method call for copying child classes.
Definition: custos.h:40
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 visual offset, such as arpeg,...
Definition: offsetinterface.h:28
This class is an interface for elements with pitch, such as notes and neumes.
Definition: pitchinterface.h:28
This class is an interface for elements with a position on the staff, such as rests.
Definition: positioninterface.h:30