NeuroLab
Parametric Class Reference

Class describing objects which can be parametrized. More...

Inheritance diagram for Parametric:

Public Member Functions

string getType () const
 Type of object.
 
string getName () const
 Name of object.
 
void setName (const string &name)
 Name of object.
 
string getConfiguration () const
 Returns the configuration of the object. More...
 
string getAllParameters () const
 String with all parameter settings.
 
void addParameter (const string &name)
 Add a parameter. More...
 
void rmParameter (const string &name)
 Remove a parameter. More...
 
virtual void setParameter (const string &name, const string &value)
 Set parameter. More...
 
virtual string getParameter (const string &name) const
 Get parameter. More...
 

Protected Member Functions

 Parametric (const string &name, const string &type)
 Create object of type and name.
 
virtual ~Parametric ()
 Destroy object.
 

Detailed Description

Class describing objects which can be parametrized.

Objects of this class (such as stochastic variables) can be parametrized in various ways. A paremeter (const Property&) is an integer constant which identifies the parameter.

Member Function Documentation

void Parametric::addParameter ( const string &  name)

Add a parameter.

Adds another string definition to the class. If the parameter already exists, it is not added.

string Parametric::getConfiguration ( ) const

Returns the configuration of the object.

This includes object type and name, and a list with all settings.

virtual string Parametric::getParameter ( const string &  name) const
virtual

Get parameter.

In a derived class, override this to handle every parameter you implement. If a parameter is described using multiple strings separated by space, this indicates a parameter of a parameter.

Parameters
namename of parameter

Reimplemented in Regular, Poisson, DifferentialEquation, VoltageDependance, SimpleSynapse, MlNeuron, Product, WienerCpp, Noise, Scalar, MlPotassiumChannel, IfNeuron, Synapse, Wiener, and MlCalciumChannel.

void Parametric::rmParameter ( const string &  name)

Remove a parameter.

Removes the string from the parameter list.

virtual void Parametric::setParameter ( const string &  name,
const string &  value 
)
virtual

Set parameter.

Sets the value of a parameter using strings. If a parameter is described using multiple strings separated by space, this indicates a parameter of a parameter (not implemented yet).

Parameters
namename of parameter
valuevalue of parameter (used with operator<<)

Reimplemented in Regular, Poisson, DifferentialEquation, VoltageDependance, MlNeuron, SimpleSynapse, Product, WienerCpp, Noise, IfNeuron, Scalar, MlPotassiumChannel, Wiener, Synapse, and MlCalciumChannel.