Extend mechanism of visitor for all important classes that has

attributes of a scene (for saving in XML, or other visitors)
This commit is contained in:
brunoherbelin
2020-04-01 14:41:42 +02:00
parent 178bf45f08
commit 37a6754de2
13 changed files with 176 additions and 101 deletions

View File

@@ -5,12 +5,15 @@
// Forward declare different kind of Node
class Node;
class Primitive;
class Group;
class Primitive;
class Scene;
class TexturedRectangle;
class MediaRectangle;
class LineStrip;
class MediaPlayer;
class Shader;
class ImageShader;
// Declares the interface for the visitors
class Visitor {
@@ -18,12 +21,16 @@ class Visitor {
public:
// Declare overloads for each kind of Node to visit
virtual void visit(Node& n) = 0;
virtual void visit(Primitive& n) = 0;
virtual void visit(Group& n) = 0;
virtual void visit(Primitive& n) = 0;
virtual void visit(Scene& n) = 0;
virtual void visit(TexturedRectangle& n) = 0;
virtual void visit(MediaRectangle& n) = 0;
virtual void visit(LineStrip& n) = 0;
virtual void visit(Scene& n) = 0;
virtual void visit(MediaPlayer& n) = 0;
virtual void visit(Shader& n) = 0;
virtual void visit(ImageShader& n) = 0;
};