Verovio
Source code documentation
timestamp.h
1 // Name: timestamp.h
3 // Author: Laurent Pugin
4 // Created: 2016
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_TIMESTAMP_H__
9 #define __VRV_TIMESTAMP_H__
10 
11 #include "layerelement.h"
12 
13 namespace vrv {
14 
15 //----------------------------------------------------------------------------
16 // TimestampAttr
17 //----------------------------------------------------------------------------
18 
19 class TimestampAttr : public LayerElement {
20 public:
26  TimestampAttr();
27  virtual ~TimestampAttr();
28  void Reset() override;
29  std::string GetClassName() const override { return "timestampAttr"; }
31 
37  double GetActualDurPos() const { return m_actualDurPos; }
38  void SetDrawingPos(double pos) { m_actualDurPos = pos; }
40 
44  Fraction GetTimestampAttrAlignmentDuration(data_DURATION meterUnit) const;
45 
46  //----------//
47  // Functors //
48  //----------//
49 
54  FunctorCode Accept(Functor &functor) override;
55  FunctorCode Accept(ConstFunctor &functor) const override;
56  FunctorCode AcceptEnd(Functor &functor) override;
57  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
59 
60 private:
61  //
62 public:
63  //
64 private:
66  double m_actualDurPos;
67 };
68 
69 } // namespace vrv
70 
71 #endif
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
Definition: timestamp.h:19
Fraction GetTimestampAttrAlignmentDuration(data_DURATION meterUnit) const
Returns the duration (in Fraction) for the Timestamp.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
void Reset() override
Virtual reset method.