Verovio
Source code documentation
beatrpt.h
1 // Name: beatrpt.h
3 // Author: Klaus Rettinghaus
4 // Created: 2018
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_BEATRPT_H__
9 #define __VRV_BEATRPT_H__
10 
11 #include "atts_cmn.h"
12 #include "atts_shared.h"
13 #include "atts_visual.h"
14 #include "layerelement.h"
15 
16 namespace vrv {
17 
18 //----------------------------------------------------------------------------
19 // BeatRpt (beat repeat)
20 //----------------------------------------------------------------------------
21 
25 class BeatRpt : public LayerElement, public AttColor, public AttBeatRptLog, public AttBeatRptVis {
26 public:
32  BeatRpt();
33  virtual ~BeatRpt();
34  Object *Clone() const override { return new BeatRpt(*this); }
35  void Reset() override;
36  std::string GetClassName() const override { return "beatRpt"; }
38 
40  bool HasToBeAligned() const override { return true; }
41 
46  Fraction GetBeatRptAlignmentDuration(data_DURATION meterUnit) const;
47 
52  void SetScoreTimeOnset(Fraction scoreTime);
53  Fraction GetScoreTimeOnset() const;
54 
55  //----------//
56  // Functors //
57  //----------//
58 
63  FunctorCode Accept(Functor &functor) override;
64  FunctorCode Accept(ConstFunctor &functor) const override;
65  FunctorCode AcceptEnd(Functor &functor) override;
66  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
68 
69 private:
70  //
71 public:
72  //
73 private:
78  Fraction m_scoreTimeOnset;
79 };
80 
81 } // namespace vrv
82 
83 #endif
This class models the MEI <beatRpt> element.
Definition: beatrpt.h:25
Fraction GetBeatRptAlignmentDuration(data_DURATION meterUnit) const
Returns the duration (in Fraction) for the BeatRpt.
bool HasToBeAligned() const override
Override the method since alignment is required.
Definition: beatrpt.h:40
Object * Clone() const override
Method call for copying child classes.
Definition: beatrpt.h:34
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
void SetScoreTimeOnset(Fraction scoreTime)
MIDI timing information.
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
This abstract class is the base class for all const functors.
Definition: functor.h:126
Definition: fraction.h:19
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:61