libRoadRunner Plugin C++ API  1.0.0
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Protected Attributes | Friends | List of all members
rrp::PluginParameter Class Referenceabstract

#include <rrPluginParameter.h>

Public Member Functions

 PluginParameter (const string &name, const string &hint)
 
virtual ~PluginParameter ()
 
string asString () const
 
string getName () const
 
string getDescription () const
 
void setDescription (const string &descr)
 
void setHint (const string &hint)
 
string getHint () const
 
virtual string getValueAsString () const
 
virtual string getType () const
 
virtual void * getValueHandle ()
 
virtual void setValueFromString (const string &value)=0
 

Protected Attributes

string mName
 
string mDescription
 
string mHint
 

Friends

ostream & operator<< (ostream &stream, const PluginParameter &outMe)
 

Detailed Description

The PluginParameter class is an interface for derived Parameters, that can be of any type. A parameter has a name, description and a hint, encapsulating the the purpose of the actual parameter.

Constructor & Destructor Documentation

rrp::PluginParameter::PluginParameter ( const string &  name,
const string &  hint 
)

The constructor populates the parameters name and hint.

rrp::PluginParameter::~PluginParameter ( )
virtual

De-allocate any memory allocated.

Member Function Documentation

string rrp::PluginParameter::asString ( ) const

Return the parameter in a string representation

string rrp::PluginParameter::getDescription ( ) const

Return description of the parameter

string rrp::PluginParameter::getHint ( ) const

Return the parameters hint

string rrp::PluginParameter::getName ( ) const

Return the parameters name

string rrp::PluginParameter::getType ( ) const
virtual

Get the type of the parameter. This function need to be implemented in any derived class.

string rrp::PluginParameter::getValueAsString ( ) const
virtual

Get the value of the parameter, as a string. This function need to be implemented in any derived class.

Note
In the case of a complex type, such as RoadRunnerData for example, expect the returned string to be of considerate size.
void * rrp::PluginParameter::getValueHandle ( )
virtual

Get an opaque pointer to the value of the parameter. This function need to be implemented in any derived class.

void rrp::PluginParameter::setDescription ( const string &  descr)

Set the description of a parameter

void rrp::PluginParameter::setHint ( const string &  hint)

Set the hint of a parameter

virtual void rrp::PluginParameter::setValueFromString ( const string &  value)
pure virtual

Set the value of the parameter, using string representation. This function need to be implemented in any derived class.

Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const PluginParameter outMe 
)
friend

Ouput the parameter to an output stream. This function need to be implemented in any derived class.

Member Data Documentation

string rrp::PluginParameter::mDescription
protected

The description of a parameter.

string rrp::PluginParameter::mHint
protected

The hint of the parameter.

string rrp::PluginParameter::mName
protected

The name of the parameter.


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