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"; }
30  Object *Clone() const override { return new TimestampAttr(*this); }
32 
38  double GetActualDurPos() const { return m_actualDurPos; }
39  void SetDrawingPos(double pos) { m_actualDurPos = pos; }
41 
45  Fraction GetTimestampAttrAlignmentDuration(data_DURATION meterUnit) const;
46 
47  //----------//
48  // Functors //
49  //----------//
50 
55  FunctorCode Accept(Functor &functor) override;
56  FunctorCode Accept(ConstFunctor &functor) const override;
57  FunctorCode AcceptEnd(Functor &functor) override;
58  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
60 
61 private:
62  //
63 public:
64  //
65 private:
67  double m_actualDurPos;
68 };
69 
70 } // namespace vrv
71 
72 #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
This class represents a basic object.
Definition: object.h:66
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.
Object * Clone() const override
Method call for copying child classes.
Definition: timestamp.h:30
void Reset() override
Virtual reset method.