derivator.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2010,
3  * François Bleibel,
4  * Olivier Stasse,
5  *
6  * CNRS/AIST
7  *
8  */
9 
10 #include <sot/core/derivator.hh>
11 #include <sot/core/factory.hh>
12 
13 using namespace dynamicgraph::sot;
14 using namespace dynamicgraph;
15 
16 // Unrolled Code:
17 // template<>
18 // const double Derivator<double>::TIMESTEP_DEFAULT = 1.;
19 
20 // template<>
21 // std::string Derivator<double>::
22 // getTypeName( void ) { return #double; }
23 
24 // template<>
25 // const std::string Derivator<double>::CLASS_NAME =
26 // std::string("Derivator_of_double"); extern "C" {
27 // Entity *regFunctiondoubleDerivator( const std::string& objname )
28 // {
29 // return new Derivator<double>( objname );
30 // }
31 // EntityRegisterer regObjdoubleDerivator
32 // ( std::string("Derivator_of_double"),
33 // &regFunctiondoubleDerivator );
34 // }
35 
36 #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(sotClassType, sotType, className) \
37  template <> \
38  const double Derivator<sotType>::TIMESTEP_DEFAULT = 1.; \
39  template <> \
40  std::string sotClassType<sotType>::getTypeName(void) { \
41  return #sotType; \
42  } \
43  template <> \
44  const std::string sotClassType<sotType>::CLASS_NAME = \
45  std::string(className) + "_of_" + #sotType; \
46  extern "C" { \
47  Entity *regFunction##_##sotType##_##sotClassType( \
48  const std::string &objname) { \
49  return new sotClassType<sotType>(objname); \
50  } \
51  EntityRegisterer regObj##_##sotType##_##sotClassType( \
52  std::string(className) + "_of_" + #sotType, \
53  &regFunction##_##sotType##_##sotClassType); \
54  }
55 
56 namespace dynamicgraph {
57 namespace sot {
62 } // namespace sot
63 } // namespace dynamicgraph
64 
66 
67 #ifdef WIN32
68 #define SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_WIN32(sotClassType, sotType, \
69  className) \
70  sotClassType##sotType## ::sotClassType##sotType##(const std::string &name) \
71  : sotClassType<sotType>(name){};
72 
73 typedef double Double;
74 SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_WIN32(Derivator, Double, "Derivator")
75 SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_WIN32(Derivator, Vector, "Derivator")
76 SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_WIN32(Derivator, Matrix, "Derivator")
77 SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_WIN32(Derivator, VectorQuaternion,
78  "Derivator")
79 #endif
dynamicgraph::sot::VectorQuaternion
Eigen::Quaternion< double > SOT_CORE_EXPORT VectorQuaternion
Definition: matrix-geometry.hh:78
factory.hh
dynamicgraph
derivator.hh
Matrix
Eigen::MatrixXd Matrix
derivator-impl.hh
dynamicgraph::sot::SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(FIRFilter, double, double, double_double, "FIRFilter") SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN(FIRFilter
Vector
Eigen::VectorXd Vector
dynamicgraph::sot::Derivator
Definition: derivator.hh:39
dynamicgraph::sot


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31