Verovio
Source code documentation
svg.h
1 // Name: svg.h
3 // Author: Laurent Pugin
4 // Created: 2017
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_SVG_H__
9 #define __VRV_SVG_H__
10 
11 #include "atts_shared.h"
12 #include "object.h"
13 
14 namespace vrv {
15 
16 //----------------------------------------------------------------------------
17 // Svg
18 //----------------------------------------------------------------------------
19 
20 class Svg : public Object {
21 public:
26  Svg();
28  virtual ~Svg();
29  void Reset() override;
30  std::string GetClassName() const override { return "svg"; }
32 
36  void Set(pugi::xml_node svg);
38  pugi::xml_node Get() { return m_svg.first_child(); }
40 
44  int GetWidth() const;
46  int GetHeight() const;
48 
52  FunctorCode Accept(Functor &functor) override;
54  FunctorCode Accept(ConstFunctor &functor) const override;
55  FunctorCode AcceptEnd(Functor &functor) override;
56  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
58 
59 private:
60  //
61 public:
62  //
63 private:
67  pugi::xml_document m_svg;
68 };
69 
70 } // namespace vrv
71 
72 #endif
vrv::Svg
Definition: svg.h:20
vrv::Object
This class represents a basic object.
Definition: object.h:59
vrv::Svg::Reset
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
vrv::Functor
This abstract class is the base class for all mutable functors.
Definition: functor.h:101
vrv::ConstFunctor
This abstract class is the base class for all const functors.
Definition: functor.h:126
vrv::Svg::Accept
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.