OpenWalker Project
Documentation of the ROS Packages
Public Types | Public Member Functions | Protected Attributes | List of all members
ow_plugin_loader::ClassCreator Class Reference

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.
 
IGenericClassgenericClassPtr ()
 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
 
IGenericClassc_ptr_
 the pointer to the created class
 

Detailed Description

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.

Constructor & Destructor Documentation

ow_plugin_loader::ClassCreator::ClassCreator ( const std::string &  libFilePath,
bool *  ok = 0 
)

Default constructor.

Parameters
libFilePaththe file path to the .so shared library to use.
okoptional flag that is set to true on success or set to false on error.

Member Function Documentation

template<class IClass >
IClass* ow_plugin_loader::ClassCreator::classPtr ( )
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.


The documentation for this class was generated from the following file: