Verovio
Source code documentation
surface.h
1 // Name: surface.h
3 // Author: Juliette Regimbal
4 // Created: 05/06/2019
5 // Copyright (c) Authors and others. All rights reserved.
7 
8 #ifndef __VRV_SURFACE_H__
9 #define __VRV_SURFACE_H__
10 
11 #include <cassert>
12 
13 //----------------------------------------------------------------------------
14 
15 #include "atts_analytical.h"
16 #include "atts_shared.h"
17 #include "object.h"
18 #include "vrvdef.h"
19 
20 namespace vrv {
21 
22 //----------------------------------------------------------------------------
23 // Surface
24 //----------------------------------------------------------------------------
30 class Surface : public Object, public AttTyped, public AttCoordinated, public AttCoordinatedUl {
31 public:
36  Surface();
37  virtual ~Surface();
38  Object *Clone() const override { return new Surface(*this); }
39  void Reset() override;
40  std::string GetClassName() const override { return "surface"; }
42  bool IsSupportedChild(ClassId classId) override;
43 
44  int GetMaxX() const;
45  int GetMaxY() const;
46 
47  //----------//
48  // Functors //
49  //----------//
50 
55  FunctorCode Accept(Functor &functor) override;
56  FunctorCode Accept(ConstFunctor &functor) const override;
57  FunctorCode AcceptEnd(Functor &functor) override;
58  FunctorCode AcceptEnd(ConstFunctor &functor) const override;
60 
61 protected:
62  //
63 private:
64  //
65 };
66 
67 } // namespace vrv
68 
69 #endif
This abstract class is the base class for all const functors.
Definition: functor.h:126
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
Implements the surface element in MEI.
Definition: surface.h:30
Object * Clone() const override
Method call for copying child classes.
Definition: surface.h:38
FunctorCode Accept(Functor &functor) override
Interface for class functor visitation.
void Reset() override
Reset the object, that is 1) removing all children and 2) resetting all attributes.
bool IsSupportedChild(ClassId classId) override
Base method for checking if a child can be added.