Verovio
Source code documentation
ftrem.h
1 // Name: ftrem.h
3 // Author: Klaus Rettinghaus
4 // Created: 2017
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_FTREM_H__
9 #define __VRV_FTREM_H__
10 
11 #include "atts_cmn.h"
12 #include "atts_shared.h"
13 #include "beam.h"
14 #include "layerelement.h"
15 
16 namespace vrv {
17 
18 //----------------------------------------------------------------------------
19 // FTrem (fingered tremolo)
20 //----------------------------------------------------------------------------
21 
25 class FTrem : public LayerElement, public BeamDrawingInterface, public AttFTremVis, public AttTremMeasured {
26 public:
32  FTrem();
33  virtual ~FTrem();
34  Object *Clone() const override { return new FTrem(*this); }
35  void Reset() override;
36  std::string GetClassName() const override { return "fTrem"; }
38 
43  BeamDrawingInterface *GetBeamDrawingInterface() override { return vrv_cast<BeamDrawingInterface *>(this); }
44  const BeamDrawingInterface *GetBeamDrawingInterface() const override
45  {
46  return vrv_cast<const BeamDrawingInterface *>(this);
47  }
49 
54  bool IsSupportedChild(ClassId classId) override;
55 
59  const ArrayOfBeamElementCoords *GetElementCoords();
60 
64  std::pair<int, int> GetAdditionalBeamCount() const override;
65 
69  std::pair<int, int> GetFloatingBeamCount() const override;
70 
71  //----------//
72  // Functors //
73  //----------//
74 
79  FunctorCode Accept(Functor &functor) override;
80  FunctorCode Accept(ConstFunctor &functor) const override;
81  FunctorCode AcceptEnd(Functor &functor) override;
82  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
84 
85 private:
86  //
87 protected:
91  void FilterList(ListOfConstObjects &childList) const override;
92 
93 public:
95  BeamSegment m_beamSegment;
96 
97 private:
98 };
99 
100 } // namespace vrv
101 
102 #endif
This class is an interface for MEI beam elements (beam, beamSpan).
Definition: drawinginterface.h:97
Class for storing drawing parameters when calculating beams.
Definition: beam.h:36
This abstract class is the base class for all const functors.
Definition: functor.h:126
This class models the MEI <fTrem> element.
Definition: ftrem.h:25
bool IsSupportedChild(ClassId classId) override
Add an element (a note or a chord) to a fTrem.
std::pair< int, int > GetAdditionalBeamCount() const override
See DrawingInterface::GetAdditionalBeamCount.
Object * Clone() const override
Method call for copying child classes.
Definition: ftrem.h:34
void FilterList(ListOfConstObjects &childList) const override
Filter the flat list and keep only Note or Chords elements.
std::pair< int, int > GetFloatingBeamCount() const override
See DrawingInterface::GetFloatingBeamCount.
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
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