Verovio
Source code documentation
mrest.h
1 // Name: mrest.h
3 // Author: Rodolfo Zitellini
4 // Created: 2013
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_MREST_H__
9 #define __VRV_MREST_H__
10 
11 #include "atts_cmn.h"
12 #include "atts_shared.h"
13 #include "layerelement.h"
14 #include "offsetinterface.h"
15 #include "positioninterface.h"
16 
17 namespace vrv {
18 
19 class Layer;
20 class Staff;
21 
22 //----------------------------------------------------------------------------
23 // MRest
24 //----------------------------------------------------------------------------
25 
29 class MRest : public LayerElement,
30  public OffsetInterface,
31  public PositionInterface,
32  public AttColor,
33  public AttCue,
34  public AttCutout,
35  public AttFermataPresent,
36  public AttVisibility {
37 public:
43  MRest();
44  virtual ~MRest();
45  Object *Clone() const override { return new MRest(*this); }
46  void Reset() override;
47  std::string GetClassName() const override { return "mRest"; }
49 
54  OffsetInterface *GetOffsetInterface() override { return vrv_cast<OffsetInterface *>(this); }
55  const OffsetInterface *GetOffsetInterface() const override { return vrv_cast<const OffsetInterface *>(this); }
56  PositionInterface *GetPositionInterface() override { return vrv_cast<PositionInterface *>(this); }
57  const PositionInterface *GetPositionInterface() const override { return vrv_cast<const PositionInterface *>(this); }
59 
63  int GetOptimalLayerLocation(const Layer *layer, int defaultLocation) const;
64 
65  //----------//
66  // Functors //
67  //----------//
68 
73  FunctorCode Accept(Functor &functor) override;
74  FunctorCode Accept(ConstFunctor &functor) const override;
75  FunctorCode AcceptEnd(Functor &functor) override;
76  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
78 
79 private:
80  //
81 public:
82  //
83 private:
84 };
85 
86 } // namespace vrv
87 
88 #endif
This abstract class is the base class for all const functors.
Definition: functor.h:126
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 layer in a laid-out score (Doc).
Definition: layer.h:39
This class models the MEI <mRest> element.
Definition: mrest.h:36
void Reset() override
Virtual reset method.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
int GetOptimalLayerLocation(const Layer *layer, int defaultLocation) const
Get the vertical location for mRest considering other layer elements.
Object * Clone() const override
Method call for copying child classes.
Definition: mrest.h:45
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 a position on the staff, such as rests.
Definition: positioninterface.h:30