8 #ifndef __VRV_BEAMSPAN_H__
9 #define __VRV_BEAMSPAN_H__
13 #include "controlelement.h"
14 #include "drawinginterface.h"
15 #include "plistinterface.h"
16 #include "timeinterface.h"
46 void Reset()
override;
47 std::string GetClassName()
const override {
return "beamSpan"; }
59 PlistInterface *GetPlistInterface()
override {
return vrv_cast<PlistInterface *>(
this); }
60 const PlistInterface *GetPlistInterface()
const override {
return vrv_cast<const PlistInterface *>(
this); }
61 TimePointInterface *GetTimePointInterface()
override {
return vrv_cast<TimePointInterface *>(
this); }
62 const TimePointInterface *GetTimePointInterface()
const override
64 return vrv_cast<const TimePointInterface *>(
this);
66 TimeSpanningInterface *GetTimeSpanningInterface()
override {
return vrv_cast<TimeSpanningInterface *>(
this); }
67 const TimeSpanningInterface *GetTimeSpanningInterface()
const override
69 return vrv_cast<const TimeSpanningInterface *>(
this);
77 void InitBeamSegments();
78 void ClearBeamSegments();
87 BeamSpanSegment *GetSegmentForSystem(
const System *system);
88 const BeamSpanSegment *GetSegmentForSystem(
const System *system)
const;
96 void ResetBeamedElements() { m_beamedElements.clear(); }
97 void SetBeamedElements(
const ArrayOfObjects &beamedElements) { m_beamedElements = beamedElements; }
104 using SpanIndexVector = std::vector<std::pair<vrv::ArrayOfObjects::const_iterator, Object *>>;
105 bool AddSpanningSegment(
const Doc *doc,
const SpanIndexVector &elements,
int index,
bool newSegment =
true);
118 FunctorCode AcceptEnd(
Functor &functor)
override;
119 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
130 std::vector<BeamSpanSegment *> m_beamSegments;
134 ArrayOfObjects m_beamedElements;
This class is an interface for MEI beam elements (beam, beamSpan).
Definition: drawinginterface.h:98
This class models the MEI <beamSpan> element.
Definition: beamspan.h:36
const ArrayOfObjects & GetBeamedElements() const
Getter and setter for the beamed elements.
Definition: beamspan.h:95
Object * Clone() const override
Method call for copying child classes.
Definition: beamspan.h:45
void CloneReset() override
Overriding CloneReset() method to be called after copy / assignment calls.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
std::vector< std::pair< vrv::ArrayOfObjects::const_iterator, Object * > > SpanIndexVector
Break one big spanning beamSpan into smaller beamSpans.
Definition: beamspan.h:104
BeamSpanSegment * GetSegment(int index)
Access the beam segments.
Definition: beamspan.h:85
This abstract class is the base class for all const functors.
Definition: functor.h:126
This class represents elements appearing within a measure.
Definition: controlelement.h:35
This class is a hold the data and corresponds to the model of a MVC design pattern.
Definition: doc.h:41
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
This class represents a basic object.
Definition: object.h:64
This class is an interface for elements having a single time point, such as tempo,...
Definition: plistinterface.h:29
This class is an interface for spanning elements, such as slur, hairpin, etc.
Definition: timeinterface.h:145