#include <iso_flock_parameter_list.h>
Public Member Functions | |
ParameterList () | |
default constructor | |
~ParameterList () | |
destructor | |
unsigned int | parameterCount () const |
return number of parameters this list contains | |
bool | contains (const base::String &pName) const |
checks if parameter list contains parameter | |
unsigned int | parameterIndex (const base::String &pName) const throw (FlockException) |
return index of parameter | |
Parameter & | parameter (unsigned int pIndex) throw (FlockException) |
get parameter | |
Parameter & | parameter (const base::String &pName) throw (FlockException) |
get parameter | |
void | addParameter (Parameter *pParameter) throw (FlockException) |
add parameter | |
void | addParameter (Agent *pAgent, const base::String &pName, unsigned int pDim) throw (FlockException) |
add parameter | |
void | removeParameter (const base::String &pName) throw (FlockException) |
remove parameter | |
math::Vector< real > & | values (const base::String &pName) throw (FlockException) |
return parameter values | |
void | setValue (const base::String &pName, real pValue) throw (FlockException) |
set parameter value | |
void | setValues (const base::String &pName, const math::Vector< real > &pValues) throw (FlockException) |
set parameter values | |
void | flush () |
update all parameters | |
virtual base::String | info (int pPropagationLevel=0) const |
print parameter list information | |
Static Public Attributes | |
static const base::String | sClassName |
default name | |
Protected Attributes | |
data::IndexHash< base::String, Parameter > | mParameters |
parameters | |
Friends | |
std::ostream & | operator<< (std::ostream &pOstream, const ParameterList &pParameterList) |
print parameter list information |
parameters
Created by Daniel Bisig on 3/29/07. Copyright 2006 Daniel Bisig All rights reserved.
ParameterList::ParameterList | ( | ) |
default constructor
ParameterList::~ParameterList | ( | ) |
destructor
unsigned int ParameterList::parameterCount | ( | ) | const |
return number of parameters this list contains
bool ParameterList::contains | ( | const base::String & | pName | ) | const |
checks if parameter list contains parameter
pName | parameter name |
unsigned int ParameterList::parameterIndex | ( | const base::String & | pName | ) | const throw (FlockException) |
return index of parameter
pName | parameter name |
FlockException | parameter not found |
Parameter & ParameterList::parameter | ( | unsigned int | pIndex | ) | throw (FlockException) |
get parameter
pIndex | parameter index |
FlockException | parameter not found |
Parameter & ParameterList::parameter | ( | const base::String & | pName | ) | throw (FlockException) |
get parameter
pName | parameter name |
FlockException | parameter not found |
void ParameterList::addParameter | ( | Parameter * | pParameter | ) | throw (FlockException) |
void ParameterList::addParameter | ( | Agent * | pAgent, | |
const base::String & | pName, | |||
unsigned int | pDim | |||
) | throw (FlockException) |
add parameter
pAgent | agent this parameter list belongs to | |
pName | parameter name | |
pDim | dimension of parameter |
FlockException | parameter already exists |
void ParameterList::removeParameter | ( | const base::String & | pName | ) | throw (FlockException) |
math::Vector< flock::real > & ParameterList::values | ( | const base::String & | pName | ) | throw (FlockException) |
return parameter values
pName | parameter name |
FlockException | parameter not found |
void ParameterList::setValue | ( | const base::String & | pName, | |
real | pValue | |||
) | throw (FlockException) |
set parameter value
pName | parameter name | |
pValue | parameter value |
FlockException | parameter not found |
void ParameterList::setValues | ( | const base::String & | pName, | |
const math::Vector< real > & | pValues | |||
) | throw (FlockException) |
set parameter values
pName | parameter name | |
pValues | parameter values |
FlockException | parameter not found or incompatible dimension |
void ParameterList::flush | ( | ) |
update all parameters
copies their backup values into their current values
base::String ParameterList::info | ( | int | pPropagationLevel = 0 |
) | const [virtual] |
print parameter list information
pPropagationLevel | how far the propagation method proceeds through composite classes (-1: unlimited, 0: no proceeding, >0: limited proceeding) |
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const ParameterList & | pParameterList | |||
) | [friend] |
print parameter list information
const base::String ParameterList::sClassName [static] |
default name
data::IndexHash<base::String, Parameter> iso::flock::ParameterList::mParameters [protected] |
parameters