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"; }
54 PlistInterface *GetPlistInterface()
override {
return vrv_cast<PlistInterface *>(
this); }
55 const PlistInterface *GetPlistInterface()
const override {
return vrv_cast<const PlistInterface *>(
this); }
56 TimePointInterface *GetTimePointInterface()
override {
return vrv_cast<TimePointInterface *>(
this); }
57 const TimePointInterface *GetTimePointInterface()
const override
59 return vrv_cast<const TimePointInterface *>(
this);
61 TimeSpanningInterface *GetTimeSpanningInterface()
override {
return vrv_cast<TimeSpanningInterface *>(
this); }
62 const TimeSpanningInterface *GetTimeSpanningInterface()
const override
64 return vrv_cast<const TimeSpanningInterface *>(
this);
72 void InitBeamSegments();
73 void ClearBeamSegments();
82 BeamSpanSegment *GetSegmentForSystem(
const System *system);
83 const BeamSpanSegment *GetSegmentForSystem(
const System *system)
const;
91 void ResetBeamedElements() { m_beamedElements.clear(); }
92 void SetBeamedElements(
const ArrayOfObjects &beamedElements) { m_beamedElements = beamedElements; }
99 using SpanIndexVector = std::vector<std::pair<vrv::ArrayOfObjects::const_iterator, Object *>>;
100 bool AddSpanningSegment(
const Doc *doc,
const SpanIndexVector &elements,
int index,
bool newSegment =
true);
113 FunctorCode AcceptEnd(
Functor &functor)
override;
114 FunctorCode AcceptEnd(
ConstFunctor &functor)
const override;
125 std::vector<BeamSpanSegment *> m_beamSegments;
129 ArrayOfObjects m_beamedElements;
This class is an interface for MEI beam elements (beam, beamSpan).
Definition: drawinginterface.h:97
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:90
Object * Clone() const override
Method call for copying child classes.
Definition: beamspan.h:45
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:99
BeamSpanSegment * GetSegment(int index)
Access the beam segments.
Definition: beamspan.h:80
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:33
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:61
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