Debian Codegraph @

avogadro/rendering/visitor.h

raw
1 /******************************************************************************
2 This source file is part of the Avogadro project.
3 This source code is released under the 3-Clause BSD License, (see "LICENSE").
4 ******************************************************************************/
5
6 #ifndef AVOGADRO_RENDERING_VISITOR_H
7 #define AVOGADRO_RENDERING_VISITOR_H
8
9 #include "avogadrorenderingexport.h"
10 #include <avogadro/core/avogadrocore.h>
11
12 namespace Avogadro {
13 namespace Rendering {
14
15 class CylinderGeometry;
16 class Drawable;
17 class GeometryNode;
18 class GroupNode;
19 class LineStripGeometry;
20 class MeshGeometry;
21 class Node;
22 class SphereGeometry;
23 class TextLabel2D;
24 class TextLabel3D;
25 class AmbientOcclusionSphereGeometry;
26 class CurveGeometry;
27 class WideLineGeometry;
28
29 /**
30 * @class Visitor visitor.h <avogadro/rendering/visitor.h>
31 * @brief The Visitor class is the base class for all Node visitors.
32 * @author Marcus D. Hanwell
33 *
34 * The Visitor class is the base class for visitors to Node objects in the
35 * Scene, providing common API and functionality.
36 */
37
38 class AVOGADRORENDERING_EXPORT Visitor
39 {
40 public:
41 Visitor();
42 virtual ~Visitor();
43
44 /**
45 * The overloaded visit functions, the base versions of which do nothing.
46 */
47 virtual void visit(Node&) { return; }
48 virtual void visit(GroupNode&) { return; }
49 virtual void visit(GeometryNode&) { return; }
50 virtual void visit(Drawable&) { return; }
51 virtual void visit(SphereGeometry&) { return; }
52 virtual void visit(AmbientOcclusionSphereGeometry&) { return; }
53 virtual void visit(CurveGeometry&) { return; }
54 virtual void visit(CylinderGeometry&) { return; }
55 virtual void visit(MeshGeometry&) { return; }
56 virtual void visit(TextLabel2D&) { return; }
57 virtual void visit(TextLabel3D&) { return; }
58 virtual void visit(LineStripGeometry&) { return; }
59 virtual void visit(WideLineGeometry&) { return; }
60 };
61
62 } // End namespace Rendering
63 } // End namespace Avogadro
64
65 #endif // AVOGADRO_RENDERING_VISITOR_H