GCC Code Coverage Report


Directory: ./
File: include/gepetto/viewer/node-visitor.h
Date: 2024-12-20 15:53:58
Exec Total Coverage
Lines: 0 3 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 //
2 // node-visitor.h
3 // gepetto-viewer
4 //
5 // Created by Joseph Mirabel in November 2015.
6 // Copyright (c) 2015 LAAS-CNRS. All rights reserved.
7 //
8
9 #ifndef GEPETTO_VIEWER_NODE_VISITOR_HH
10 #define GEPETTO_VIEWER_NODE_VISITOR_HH
11
12 #include <gepetto/viewer/config-osg.h>
13
14 #include <iostream>
15
16 namespace gepetto {
17 namespace viewer {
18 class Node;
19 class GroupNode;
20 class LeafNodeArrow;
21 class LeafNodeBox;
22 class LeafNodeCapsule;
23 class LeafNodeCollada;
24 class LeafNodeCone;
25 class LeafNodeCylinder;
26 class LeafNodeFace;
27 class LeafNodeGround;
28 class LeafNodeLight;
29 class LeafNodeLine;
30 class LeafNodeSphere;
31 class LeafNodeXYZAxis;
32
33 DEF_CLASS_SMART_PTR(NodeVisitor)
34
35 class NodeVisitor : public osg::Referenced {
36 public:
37 NodeVisitor(bool invisibleAreValid = true)
38 : invisibleAreValid_(invisibleAreValid) {}
39
40 virtual ~NodeVisitor() {}
41
42 virtual void apply(Node& node);
43 virtual void apply(GroupNode& node);
44 virtual void apply(LeafNodeArrow& node);
45 virtual void apply(LeafNodeBox& node);
46 virtual void apply(LeafNodeCapsule& node);
47 virtual void apply(LeafNodeCollada& node);
48 virtual void apply(LeafNodeCone& node);
49 virtual void apply(LeafNodeCylinder& node);
50 virtual void apply(LeafNodeFace& node);
51 virtual void apply(LeafNodeGround& node);
52 virtual void apply(LeafNodeLight& node);
53 virtual void apply(LeafNodeLine& node);
54 virtual void apply(LeafNodeSphere& node);
55 virtual void apply(LeafNodeXYZAxis& node);
56
57 virtual bool valid(Node& node);
58
59 void traverse(Node& node);
60
61 protected:
62 bool invisibleAreValid_;
63 }; /* class Node */
64 } /* namespace viewer */
65 } /* namespace gepetto */
66
67 #endif /* GEPETTO_VIEWER_NODE_VISITOR_HH */
68