Verovio
Source code documentation
genericlayerelement.h
1 // Name: genericlayerelement.h
3 // Author: Laurent Pugin
4 // Created: 2024
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_GENERICLAYERELEMENT_H__
9 #define __VRV_GENERICLAYERELEMENT_H__
10 
11 #include "layerelement.h"
12 
13 namespace vrv {
14 
15 //----------------------------------------------------------------------------
16 // GenericLayerElement
17 //----------------------------------------------------------------------------
18 
23 public:
30  GenericLayerElement(const std::string &name);
31  virtual ~GenericLayerElement();
32  Object *Clone() const override { return new GenericLayerElement(*this); }
33  void Reset() override;
34  std::string GetClassName() const override { return m_className; }
36 
40  std::string GetMEIName() const { return m_meiName; }
41 
45  std::string GetContent() { return m_content; }
46  void SetContent(std::string content) { m_content = content; }
47 
48  //----------//
49  // Functors //
50  //----------//
51 
55  FunctorCode Accept(Functor &functor) override;
57  FunctorCode Accept(ConstFunctor &functor) const override;
58  FunctorCode AcceptEnd(Functor &functor) override;
59  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
61 
62 private:
64  std::string m_className;
66  std::string m_meiName;
68  std::string m_content;
69 
70 public:
71  //
72 private:
73 };
74 
75 } // namespace vrv
76 
77 #endif
vrv::GenericLayerElement::Clone
Object * Clone() const override
Method call for copying child classes.
Definition: genericlayerelement.h:32
vrv::Object
This class represents a basic object.
Definition: object.h:59
vrv::GenericLayerElement
This class holds generic elements existing within MEI <layer> but not supported by Verovio.
Definition: genericlayerelement.h:22
vrv::GenericLayerElement::GetContent
std::string GetContent()
Return the MEI element original name.
Definition: genericlayerelement.h:45
vrv::GenericLayerElement::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
vrv::GenericLayerElement::Reset
void Reset() override
Virtual reset method.
vrv::GenericLayerElement::GetMEIName
std::string GetMEIName() const
Return the MEI element original name.
Definition: genericlayerelement.h:40
vrv::LayerElement
This class is a base class for the Layer (<layer>) content.
Definition: layerelement.h:46