PrimitiveShapeVisitor.h
Go to the documentation of this file.
1#ifndef PRIMITIVESHAPEVISITOR_HEADER
2#define PRIMITIVESHAPEVISITOR_HEADER
3
4#ifndef DLL_LINKAGE
5#define DLL_LINKAGE
6#endif
7
13
15{
16public:
18 {
19 }
20
21 virtual void Visit(const PlanePrimitiveShape& plane) = 0;
22 virtual void Visit(const SpherePrimitiveShape& sphere) = 0;
23 virtual void Visit(const CylinderPrimitiveShape& cylinder) = 0;
24 virtual void Visit(const ConePrimitiveShape& cone) = 0;
25 virtual void Visit(const TorusPrimitiveShape& torus) = 0;
26};
27
28template <class BaseT>
29class PrimitiveShapeVisitorShell : public BaseT
30{
31public:
35
36 template <class T>
37 PrimitiveShapeVisitorShell(const T& t) : BaseT(t)
38 {
39 }
40
41 template <class A, class B>
42 PrimitiveShapeVisitorShell(const A& a, const B& b) : BaseT(a, b)
43 {
44 }
45
46 void
48 {
49 BaseT::Visit(plane);
50 }
51
52 void
54 {
55 BaseT::Visit(sphere);
56 }
57
58 void
60 {
61 BaseT::Visit(cylinder);
62 }
63
64 void
66 {
67 BaseT::Visit(cone);
68 }
69
70 void
72 {
73 BaseT::Visit(torus);
74 }
75};
76
77#endif
class A(deque< T, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T
Enables hashing of std::list.
class DLL_LINKAGE TorusPrimitiveShape
class DLL_LINKAGE CylinderPrimitiveShape
class DLL_LINKAGE SpherePrimitiveShape
class DLL_LINKAGE ConePrimitiveShape
#define DLL_LINKAGE
class DLL_LINKAGE PlanePrimitiveShape
#define DLL_LINKAGE
Definition basic.h:12
void Visit(const SpherePrimitiveShape &sphere)
void Visit(const ConePrimitiveShape &cone)
void Visit(const TorusPrimitiveShape &torus)
void Visit(const CylinderPrimitiveShape &cylinder)
void Visit(const PlanePrimitiveShape &plane)
PrimitiveShapeVisitorShell(const A &a, const B &b)
virtual void Visit(const TorusPrimitiveShape &torus)=0
virtual void Visit(const SpherePrimitiveShape &sphere)=0
virtual void Visit(const ConePrimitiveShape &cone)=0
virtual void Visit(const CylinderPrimitiveShape &cylinder)=0
virtual void Visit(const PlanePrimitiveShape &plane)=0