Verovio
Source code documentation
bracketspan.h
1 // Name: bracketspan.h
3 // Author: Laurent Pugin
4 // Created: 2018
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_BRACKETSPAN_H__
9 #define __VRV_BRACKETSPAN_H__
10 
11 #include "atts_cmn.h"
12 #include "controlelement.h"
13 #include "timeinterface.h"
14 
15 namespace vrv {
16 
17 //----------------------------------------------------------------------------
18 // BracketSpan
19 //----------------------------------------------------------------------------
20 
24 class BracketSpan : public ControlElement,
25  public TimeSpanningInterface,
26  public AttBracketSpanLog,
27  public AttLineRend,
28  public AttLineRendBase {
29 public:
34  BracketSpan();
36  virtual ~BracketSpan();
37  Object *Clone() const override { return new BracketSpan(*this); }
38  void Reset() override;
39  std::string GetClassName() const override { return "bracketSpan"; }
41 
45  TimePointInterface *GetTimePointInterface() override { return vrv_cast<TimePointInterface *>(this); }
47  const TimePointInterface *GetTimePointInterface() const override
48  {
49  return vrv_cast<const TimePointInterface *>(this);
50  }
51  TimeSpanningInterface *GetTimeSpanningInterface() override { return vrv_cast<TimeSpanningInterface *>(this); }
52  const TimeSpanningInterface *GetTimeSpanningInterface() const override
53  {
54  return vrv_cast<const TimeSpanningInterface *>(this);
55  }
57 
61  int GetLineWidth(const Doc *doc, int unit) const;
62 
63  //----------//
64  // Functors //
65  //----------//
66 
70  FunctorCode Accept(Functor &functor) override;
72  FunctorCode Accept(ConstFunctor &functor) const override;
73  FunctorCode AcceptEnd(Functor &functor) override;
74  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
76 
77 protected:
78  //
79 private:
80  //
81 public:
82  //
83 private:
84 };
85 
86 } // namespace vrv
87 
88 #endif
vrv::BracketSpan::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
vrv::Object
This class represents a basic object.
Definition: object.h:59
vrv::BracketSpan::Clone
Object * Clone() const override
Method call for copying child classes.
Definition: bracketspan.h:37
vrv::BracketSpan::Reset
void Reset() override
Virtual reset method.
vrv::BracketSpan::GetLineWidth
int GetLineWidth(const Doc *doc, int unit) const
Calculate the bracket line width.
vrv::ControlElement
This class represents elements appearing within a measure.
Definition: controlelement.h:28
vrv::TimeSpanningInterface
This class is an interface for spanning elements, such as slur, hairpin, etc.
Definition: timeinterface.h:141
vrv::BracketSpan
This class models the MEI <bracketSpan> element.
Definition: bracketspan.h:24