OpenIG  2.0.4
cross-platform open-source OpenSceneGraph Image Generator
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OpenIG::PluginBase::PluginHost Class Reference

The PluginHost class. More...

#include <PluginHost.h>

Inheritance diagram for OpenIG::PluginBase::PluginHost:
OpenIG::Engine

Public Types

typedef std::map< int, osg::ref_ptr< OpenIG::PluginBase::Plugin > > PluginsMap
 
typedef std::map< int, osg::ref_ptr< OpenIG::PluginBase::Plugin > >::iterator PluginsMapIterator
 
typedef std::map< int, osg::ref_ptr< OpenIG::PluginBase::Plugin > >::const_iterator PluginsMapConstIterator
 

Public Member Functions

 PluginHost ()
 Constructor. More...
 
 ~PluginHost ()
 Destructor. More...
 
void loadPlugins (const std::string &path, const std::string &configFileName="")
 Loads all the plugins. More...
 
void unloadPlugins ()
 Unloads all plugins. More...
 
void applyPluginOperation (OpenIG::PluginBase::PluginOperation *operation)
 Apply plugin operation on all the plugins in a sorted fashion. More...
 
const PluginsMap & getPlugins () const
 Gets all the plugins in order number based std::map. More...
 

Protected Types

typedef std::map< std::string, osg::ref_ptr< osgDB::DynamicLibrary > > PluginLibrariesMap
 The plugin order number based std::map.
 
typedef std::map< std::string, osg::ref_ptr< osgDB::DynamicLibrary > >::iterator PluginLibrariesMapIterator
 
typedef std::map< std::string, osg::ref_ptr< osgDB::DynamicLibrary > >::const_iterator PluginLibrariesMapConstIterator
 

Protected Member Functions

bool isPlugin (const std::string &fileName) const
 Filename based std::map of the plugins shared libraries. More...
 

Protected Attributes

PluginsMap _plugins
 
PluginLibrariesMap _pluginLibraries
 

Detailed Description

The PluginHost class.

The PluginHost class. It is managing plugins

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015

Constructor & Destructor Documentation

OpenIG::PluginBase::PluginHost::PluginHost ( )

Constructor.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
OpenIG::PluginBase::PluginHost::~PluginHost ( )

Destructor.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015

Member Function Documentation

void OpenIG::PluginBase::PluginHost::applyPluginOperation ( OpenIG::PluginBase::PluginOperation operation)

Apply plugin operation on all the plugins in a sorted fashion.

Apply plugin operation on all the plugins in a sorted fashion. The plugins are orderd by ther order number. See OpenIG::PluginBase::Plugin::getOrderNumber

Parameters
operationThe plugin operation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
const PluginsMap& OpenIG::PluginBase::PluginHost::getPlugins ( ) const
inline

Gets all the plugins in order number based std::map.

Returns
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
bool OpenIG::PluginBase::PluginHost::isPlugin ( const std::string &  fileName) const
protected

Filename based std::map of the plugins shared libraries.

Performs if a file match the plugin naming convention

Parameters
fileNameThe file name of a file
Returns
true if the file is plugin, false otherwise
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
void OpenIG::PluginBase::PluginHost::loadPlugins ( const std::string &  path,
const std::string &  configFileName = "" 
)

Loads all the plugins.

Parameters
Thepath where the plugins are located
configFileNameThe plugin configuration file. openig::OpenIG is expecting it in: Windows in igdata/openig.xml, Linux and MacOS in /usr/local/lib/igdata/openig.xml or Linux 64bit in /usr/local/lib64/igdata/openig.xml
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
void OpenIG::PluginBase::PluginHost::unloadPlugins ( )

Unloads all plugins.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015

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