OpenIG  2.0.4
cross-platform open-source OpenSceneGraph Image Generator
Public Member Functions | List of all members
OpenIG::PluginBase::PluginOperation Class Referenceabstract

The PluginOperation class. More...

#include <PluginOperation.h>

Inheritance diagram for OpenIG::PluginBase::PluginOperation:

Public Member Functions

 PluginOperation ()
 Constructor. More...
 
virtual void apply (OpenIG::PluginBase::Plugin *plugin)=0
 Apply this operation on a plugin. Obviouselly call some plugin method. More...
 

Detailed Description

The PluginOperation class.

Convinient class to apply operation of plugins. Obviouselly the OpenIG::PluginBase::PluginHost is calling these to call plugin hooks in the ImageGenerator. Here is an example of a plugin operation that will print the plugin name :

class PrintPluginNamePluginOperation : public OpenIG::PluginBase::PluginOperation
{
public:
virtual void apply(igplugincore::Plugin* plugin)
{
osg::notify(osg::NOTICE) << "Plugin : " << plugin->getName() << std::endl;
}
};
// Apply this operation to all the plugins sorted by their order number
osg::ref_ptr<PrintPluginNamePluginOperation> printPluginOperation(new PrintPluginNamePluginOperation);
PluginHost::applyPluginOperation(printPluginOperation.get());
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::PluginOperation::PluginOperation ( )
inline

Constructor.

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

Member Function Documentation

virtual void OpenIG::PluginBase::PluginOperation::apply ( OpenIG::PluginBase::Plugin plugin)
pure virtual

Apply this operation on a plugin. Obviouselly call some plugin method.

Parameters
pluginThe plugin
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: