cppexpose  1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cppexpose::PluginLibrary Class Reference

Represents a dynamic plugin library. More...

#include <cppexpose/include/cppexpose/plugin/PluginLibrary.h>

Public Member Functions

 PluginLibrary (const std::string &filePath)
 Constructor. More...
 
virtual ~PluginLibrary ()
 Destructor. More...
 
const std::string & filePath () const
 Get path to library file. More...
 
bool isValid () const
 Check if plugin library is valid. More...
 
const std::vector< AbstractComponent * > & components () const
 Get components that belong to the plugin library. More...
 

Protected Member Functions

void addComponent (AbstractComponent *component)
 Add component to library. More...
 

Protected Attributes

std::string m_filePath
 Path to the loaded library. More...
 
void * m_handle
 Library handle. More...
 
std::vector< AbstractComponent * > m_components
 List of components that belong to the plugin library. More...
 

Friends

class ComponentManager
 

Detailed Description

Represents a dynamic plugin library.

Constructor & Destructor Documentation

cppexpose::PluginLibrary::PluginLibrary ( const std::string &  filePath)

Constructor.

Parameters
[in]filePathPath to the loaded library
virtual cppexpose::PluginLibrary::~PluginLibrary ( )
virtual

Destructor.

Member Function Documentation

const std::string& cppexpose::PluginLibrary::filePath ( ) const

Get path to library file.

Returns
Path to the loaded library
bool cppexpose::PluginLibrary::isValid ( ) const

Check if plugin library is valid.

Returns
'true' if the plugin has been loaded successfully, else 'false'
const std::vector<AbstractComponent *>& cppexpose::PluginLibrary::components ( ) const

Get components that belong to the plugin library.

Returns
List of components that belong to the plugin library
void cppexpose::PluginLibrary::addComponent ( AbstractComponent component)
protected

Add component to library.

Parameters
[in]componentComponent (must NOT be null!)
Remarks
As components register themselves automatically, this function is called by the component manager to remember what components belong to a plugin library.

Friends And Related Function Documentation

friend class ComponentManager
friend

Member Data Documentation

std::string cppexpose::PluginLibrary::m_filePath
protected

Path to the loaded library.

void* cppexpose::PluginLibrary::m_handle
protected

Library handle.

std::vector<AbstractComponent *> cppexpose::PluginLibrary::m_components
protected

List of components that belong to the plugin library.


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