ContRap-Core
Public Member Functions | Protected Attributes

crp::Parameter Class Reference

Class Parameter is an identifier type for representing parameters of functions. More...

#include <identifier.h>

Inheritance diagram for crp::Parameter:
crp::Identifier crp::Object

Public Member Functions

 Parameter (const std::string &name="", const std::string &type="", const SPtr< Scope > &scope=0)
 Creates a new parameter.
virtual ~Parameter ()
 Releases memory.
const std::string & get_parameter_id () const
 Returns the type of the parameter.
std::string get_parameter_type () const
 Returns the type of the parameter.
void set_property (const std::string &value)
 Sets the parameter type property.
const DPtrget_value () const
 Returns the default value of the parameter.
const std::string & get_string_value () const
 Returns the string default value of the parameter.
void set_value (const DPtr &value)
 Sets the value property of the parameter.
void set_value (const std::string &value)
 Sets the value property from string.
void parse_value (Engine *engine)
 Parses the parameter value.

Protected Attributes

std::string type
 Type of the parameter.
std::string type_name
 Real type name of the parameter.
DPtr value
 Default value of the parameter.
std::string str_value
 String value of the parameter.

Detailed Description

Class Parameter is an identifier type for representing parameters of functions.


Constructor & Destructor Documentation

crp::Parameter::Parameter ( const std::string &  name = "",
const std::string &  type = "",
const SPtr< Scope > &  scope = 0 
)

Creates a new parameter.

Parameters:
nameName of the identifier
typeType identifier of the parameter
virtual crp::Parameter::~Parameter ( ) [inline, virtual]

Releases memory.


Member Function Documentation

const std::string& crp::Parameter::get_parameter_id ( ) const [inline]

Returns the type of the parameter.

Parameters:
Typeof the parameter
std::string crp::Parameter::get_parameter_type ( ) const

Returns the type of the parameter.

Parameters:
Typeof the parameter
const std::string& crp::Parameter::get_string_value ( ) const [inline]

Returns the string default value of the parameter.

Returns:
Default value
const DPtr& crp::Parameter::get_value ( ) const [inline]

Returns the default value of the parameter.

Returns:
Default value
void crp::Parameter::parse_value ( Engine engine)

Parses the parameter value.

Parameters:
engineEngine
void crp::Parameter::set_property ( const std::string &  value) [inline]

Sets the parameter type property.

Parameters:
propertyNew property
void crp::Parameter::set_value ( const std::string &  value) [inline]

Sets the value property from string.

void crp::Parameter::set_value ( const DPtr value) [inline]

Sets the value property of the parameter.

Parameters:
propertyNew property

Field Documentation

std::string crp::Parameter::str_value [protected]

String value of the parameter.

std::string crp::Parameter::type [protected]

Type of the parameter.

std::string crp::Parameter::type_name [mutable, protected]

Real type name of the parameter.

Default value of the parameter.


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