OpenWalker Project
Documentation of the ROS Packages
Main Page
Related Pages
Classes
Files
File List
File Members
src
ow_core
include
ow_core
Plugins
class_export.h
Go to the documentation of this file.
1
34
#ifndef OPEN_WALKER_CORE_PLUGINS_CLASS_EXPORT_H
35
#define OPEN_WALKER_CORE_PLUGINS_CLASS_EXPORT_H
36
60
#define OW_PLUGIN_CLASS_CREATE(Class) \
61
extern "C" \
62
{ \
63
void* create() \
64
{ \
65
Class* ptr = new Class; \
66
return static_cast<ow_core::IGenericClass*>(ptr); \
67
} \
68
}
69
70
85
#define OW_PLUGIN_CLASS_DESTROY(Class) \
86
extern "C" \
87
{ \
88
void destroy(void* ptr) \
89
{ \
90
ow_core::IGenericClass* g = reinterpret_cast<ow_core::IGenericClass*>(ptr); \
91
Class* c = static_cast<Class*>(g); \
92
delete c; \
93
} \
94
}
95
101
#define OW_PLUGIN_CLASS(Class) \
102
OW_PLUGIN_CLASS_CREATE(Class) \
103
OW_PLUGIN_CLASS_CREATE(Class)
104
105
106
#endif // OPEN_WALKER_CORE_PLUGINS_CLASS_EXPORT_H
Generated on Fri Feb 14 2020 12:12:24 for OpenWalker Project by
1.8.11