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 {
16 public:
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 
28 template <class BaseT>
29 class PrimitiveShapeVisitorShell : public BaseT
30 {
31 public:
33  {
34  }
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
47  Visit(const PlanePrimitiveShape& plane)
48  {
49  BaseT::Visit(plane);
50  }
51 
52  void
53  Visit(const SpherePrimitiveShape& sphere)
54  {
55  BaseT::Visit(sphere);
56  }
57 
58  void
59  Visit(const CylinderPrimitiveShape& cylinder)
60  {
61  BaseT::Visit(cylinder);
62  }
63 
64  void
66  {
67  BaseT::Visit(cone);
68  }
69 
70  void
71  Visit(const TorusPrimitiveShape& torus)
72  {
73  BaseT::Visit(torus);
74  }
75 };
76 
77 #endif
PrimitiveShapeVisitorShell::Visit
void Visit(const TorusPrimitiveShape &torus)
Definition: PrimitiveShapeVisitor.h:71
PrimitiveShapeVisitorShell::Visit
void Visit(const SpherePrimitiveShape &sphere)
Definition: PrimitiveShapeVisitor.h:53
ConePrimitiveShape
Definition: ConePrimitiveShape.h:11
TorusPrimitiveShape
Definition: TorusPrimitiveShape.h:12
PrimitiveShapeVisitorShell::PrimitiveShapeVisitorShell
PrimitiveShapeVisitorShell(const T &t)
Definition: PrimitiveShapeVisitor.h:37
PrimitiveShapeVisitorShell::PrimitiveShapeVisitorShell
PrimitiveShapeVisitorShell()
Definition: PrimitiveShapeVisitor.h:32
PrimitiveShapeVisitorShell::Visit
void Visit(const ConePrimitiveShape &cone)
Definition: PrimitiveShapeVisitor.h:65
PrimitiveShapeVisitorShell::PrimitiveShapeVisitorShell
PrimitiveShapeVisitorShell(const A &a, const B &b)
Definition: PrimitiveShapeVisitor.h:42
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
CylinderPrimitiveShape
Definition: CylinderPrimitiveShape.h:11
PlanePrimitiveShape
Definition: PlanePrimitiveShape.h:15
PrimitiveShapeVisitor
Definition: PrimitiveShapeVisitor.h:14
A
class A(deque< T, A >)) ARMARX_OVERLOAD_STD_HASH_FOR_ITERABLE((class T
Enables hashing of std::list.
PrimitiveShapeVisitorShell::Visit
void Visit(const CylinderPrimitiveShape &cylinder)
Definition: PrimitiveShapeVisitor.h:59
PrimitiveShapeVisitorShell
Definition: PrimitiveShapeVisitor.h:29
PrimitiveShapeVisitor::~PrimitiveShapeVisitor
virtual ~PrimitiveShapeVisitor()
Definition: PrimitiveShapeVisitor.h:17
PrimitiveShapeVisitorShell::Visit
void Visit(const PlanePrimitiveShape &plane)
Definition: PrimitiveShapeVisitor.h:47
DLL_LINKAGE
#define DLL_LINKAGE
Definition: PrimitiveShapeVisitor.h:5
T
float T
Definition: UnscentedKalmanFilterTest.cpp:38
SpherePrimitiveShape
Definition: SpherePrimitiveShape.h:20