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

The PluginContext class. More...

#include <PluginContext.h>

Classes

struct  Attribute
 Attribute struct. More...
 

Public Types

typedef std::multimap< std::string, osg::ref_ptr< osg::Referenced > > AttributeMap
 
typedef std::multimap< std::string, osg::ref_ptr< osg::Referenced > >::iterator AttributeMapIterator
 
typedef std::multimap< std::string, osg::ref_ptr< osg::Referenced > >::const_iterator AttributeMapConstIterator
 

Public Member Functions

 PluginContext ()
 Constructor. More...
 
 PluginContext (OpenIG::Base::ImageGenerator *ig)
 Constructor with reference to OpenIG::Base::ImageGenerator. More...
 
void setImageGenerator (OpenIG::Base::ImageGenerator *ig)
 Sets the OpenIG::Base::ImageGenerator reference. More...
 
OpenIG::Base::ImageGeneratorgetImageGenerator () const
 Returns the OpenIG::Base::ImageGenerator reference. More...
 
AttributeMap & getAttributes ()
 Gets a handle of all the igplugincore::PluginContext::Attribute present in the context. More...
 
void addAttribute (const std::string &name, osg::Referenced *attr)
 Adds an igplugincore::PluginContext::Attribute with a given name. More...
 
osg::Referenced * getAttribute (const std::string &name)
 Gets an igplugincore::PluginContext::Attribute by its name. More...
 
osg::ValueObject * getOrCreateValueObject ()
 Gets a value object to pass data to plugins. More...
 
void setValueObject (osg::ValueObject *valueObject)
 Sets a value object to pass data to plugins. More...
 

Protected Attributes

OpenIG::Base::ImageGenerator_ig
 
AttributeMap _attributes
 a reference to ImageGenerator
 
osg::ref_ptr< osg::ValueObject > _valueObject
 attrinute name based map
 

Detailed Description

The PluginContext class.

This class is represnting a context that is passed from the ImageGenerator to the plugin It has reference of the OpenIG::Base::ImageGenerator and igplugincore::PluginContext::Attribute

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::PluginContext::PluginContext ( )
inline

Constructor.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
OpenIG::PluginBase::PluginContext::PluginContext ( OpenIG::Base::ImageGenerator ig)
inline

Constructor with reference to OpenIG::Base::ImageGenerator.

Parameters
thereference to OpenIG::Base::ImageGenerator
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::PluginContext::addAttribute ( const std::string &  name,
osg::Referenced *  attr 
)
inline

Adds an igplugincore::PluginContext::Attribute with a given name.

Parameters
Thename of the igplugincore::PluginContext::Attribute
Thecustom igplugincore::PluginContext::Attribute
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
osg::Referenced* OpenIG::PluginBase::PluginContext::getAttribute ( const std::string &  name)
inline

Gets an igplugincore::PluginContext::Attribute by its name.

Parameters
Thename of the igplugincore::PluginContext::Attribute
Returns
0 on failure, the igplugincore::PluginContext::Attribute if found
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
AttributeMap& OpenIG::PluginBase::PluginContext::getAttributes ( )
inline

Gets a handle of all the igplugincore::PluginContext::Attribute present in the context.

Returns
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
OpenIG::Base::ImageGenerator* OpenIG::PluginBase::PluginContext::getImageGenerator ( ) const
inline

Returns the OpenIG::Base::ImageGenerator reference.

Returns
The OpenIG::Base::ImageGenerator reference
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
osg::ValueObject* OpenIG::PluginBase::PluginContext::getOrCreateValueObject ( )
inline

Gets a value object to pass data to plugins.

Returns
0 on failure, the ValueObject if successful
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Thu Jun 25 2015
void OpenIG::PluginBase::PluginContext::setImageGenerator ( OpenIG::Base::ImageGenerator ig)
inline

Sets the OpenIG::Base::ImageGenerator reference.

Parameters
igThe OpenIG::Base::ImageGenerator reference
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
void OpenIG::PluginBase::PluginContext::setValueObject ( osg::ValueObject *  valueObject)
inline

Sets a value object to pass data to plugins.

Parameters
valueObjectThe new ValueObject to be used
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Thu Jun 25 2015

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