OpenWalker Project
Documentation of the ROS Packages
|
The ClassCreator class. More...
#include <class_creator.h>
Public Types | |
typedef ow_core::IGenericClass | IGenericClass |
Public Member Functions | |
ClassCreator (const std::string &libFilePath, bool *ok=0) | |
Default constructor. More... | |
virtual | ~ClassCreator () |
Deconstructor. | |
IGenericClass * | genericClassPtr () |
Generic pointer to the created class. More... | |
template<class IClass > | |
IClass * | classPtr () |
Interface class pointer to the created class. More... | |
Protected Attributes | |
ClassLoader | loader_ |
class loader | |
IGenericClass * | c_ptr_ |
the pointer to the created class | |
The ClassCreator class.
This class can load shared libs at runtime and can create classes from the loaded lib. In contrast to the class loader, this class creates only one instance of the loaded class and manages its pointer.
ow_plugin_loader::ClassCreator::ClassCreator | ( | const std::string & | libFilePath, |
bool * | ok = 0 |
||
) |
Default constructor.
libFilePath | the file path to the .so shared library to use. |
ok | optional flag that is set to true on success or set to false on error. |
|
inline |
Interface class pointer to the created class.
This pointer is 0 on error.
NOTE: the creation and deletion of the created class is managed by this class. You should not delete the class to which this pointer is pointing.
IGenericClass* ow_plugin_loader::ClassCreator::genericClassPtr | ( | ) |
Generic pointer to the created class.
This pointer is 0 on error.
NOTE: the creation and deletion of the created class is managed by this class. You should not delete the class to which this pointer is pointing.