34 #ifndef OPEN_WALKER_PLUGIN_LOADER_CLASS_LOADER_H 35 #define OPEN_WALKER_PLUGIN_LOADER_CLASS_LOADER_H 77 bool open(
const std::string& libFilePath =
"");
86 bool isOpened()
const;
87 bool isClosed()
const;
104 template<
class IClass>
133 #endif // OPEN_WALKER_PLUGIN_LOADER_CLASS_LOADER_H Definition: class_creator.h:42
The IGenericClass class.
Definition: i_generic_class.h:54
virtual ~ClassLoader()
Deconstructor.
IClass * createClass()
Create a new class of the loaded library with the specified type.
Definition: class_loader.h:105
The ClassLoader class.
Definition: class_loader.h:51
void destroyClass(IGenericClass *ptr)
Destroy a created class using the loaded lib to avoid memory leaks.
void * handle_
the handle for shared library
Definition: class_loader.h:57
IGenericClass * createClassGeneric()
Create a new class of the loaded library and return a generic pointer.
bool open(const std::string &libFilePath="")
Open and load the shared lib which contains the desired class to create.
bool close()
Unload and close the shared lib.
std::string libFilePath_
file path to .so library
Definition: class_loader.h:59
ClassLoader(const std::string &libFilePath="")
Default constructor.
bool opened_
opened/closed flag
Definition: class_loader.h:58