Skip to content
Snippets Groups Projects
Commit f3aa1b46 authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Clean DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN macro.

parent 5fdc2e93
No related branches found
No related tags found
No related merge requests found
...@@ -108,17 +108,17 @@ class DYNAMIC_GRAPH_DLLAPI EntityRegisterer ...@@ -108,17 +108,17 @@ class DYNAMIC_GRAPH_DLLAPI EntityRegisterer
* of classType to the g_factory. It is then possible to create it * of classType to the g_factory. It is then possible to create it
* with the g_factory. * with the g_factory.
*/ */
#define DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(classType, className) \ #define DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(CLASSTYPE, CLASSNAME) \
const std::string classType::CLASS_NAME = className; \ const std::string CLASSTYPE::CLASS_NAME = CLASSNAME; \
extern "C" { \ extern "C" { \
::dynamicgraph::Entity* \ ::dynamicgraph::Entity* \
EntityMaker##_##classType(const std::string& objname) \ EntityMaker_##CLASSTYPE(const std::string& objname) \
{ \ { \
return new classType (objname); \ return new CLASSTYPE (objname); \
} \ } \
::dynamicgraph::EntityRegisterer \ ::dynamicgraph::EntityRegisterer \
reg##_##classType (className, \ reg_##CLASSTYPE (CLASSNAME, \
&EntityMaker##_##classType); \ &EntityMaker_##CLASSTYPE); \
} \ } \
struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n struct e_n_d__w_i_t_h__s_e_m_i_c_o_l_o_n
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment