iso::flock::ParameterList Class Reference

list of parameters More...

#include <iso_flock_parameter_list.h>

List of all members.

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
Parameterparameter (unsigned int pIndex) throw (FlockException)
 get parameter
Parameterparameter (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


Detailed Description

list of parameters

parameters

Created by Daniel Bisig on 3/29/07. Copyright 2006 Daniel Bisig All rights reserved.


Constructor & Destructor Documentation

ParameterList::ParameterList (  ) 

default constructor

ParameterList::~ParameterList (  ) 

destructor


Member Function Documentation

unsigned int ParameterList::parameterCount (  )  const

return number of parameters this list contains

Returns:
number of parameters this list contains

bool ParameterList::contains ( const base::String &  pName  )  const

checks if parameter list contains parameter

Parameters:
pName parameter name
Returns:
true, if parameter name exists

unsigned int ParameterList::parameterIndex ( const base::String &  pName  )  const throw (FlockException)

return index of parameter

Parameters:
pName parameter name
Returns:
index of parameter
Exceptions:
FlockException parameter not found

Parameter & ParameterList::parameter ( unsigned int  pIndex  )  throw (FlockException)

get parameter

Parameters:
pIndex parameter index
Returns:
parameter
Exceptions:
FlockException parameter not found

Parameter & ParameterList::parameter ( const base::String &  pName  )  throw (FlockException)

get parameter

Parameters:
pName parameter name
Returns:
parameter
Exceptions:
FlockException parameter not found

void ParameterList::addParameter ( Parameter pParameter  )  throw (FlockException)

add parameter

Parameters:
pParameter parameter
Exceptions:
FlockException parameter already exists

void ParameterList::addParameter ( Agent pAgent,
const base::String &  pName,
unsigned int  pDim 
) throw (FlockException)

add parameter

Parameters:
pAgent agent this parameter list belongs to
pName parameter name
pDim dimension of parameter
Exceptions:
FlockException parameter already exists

void ParameterList::removeParameter ( const base::String &  pName  )  throw (FlockException)

remove parameter

Parameters:
pName parameter name
Exceptions:
FlockException parameter not found

math::Vector< flock::real > & ParameterList::values ( const base::String &  pName  )  throw (FlockException)

return parameter values

Parameters:
pName parameter name
Returns:
parameter values
Exceptions:
FlockException parameter not found

void ParameterList::setValue ( const base::String &  pName,
real  pValue 
) throw (FlockException)

set parameter value

Parameters:
pName parameter name
pValue parameter value
Exceptions:
FlockException parameter not found

void ParameterList::setValues ( const base::String &  pName,
const math::Vector< real > &  pValues 
) throw (FlockException)

set parameter values

Parameters:
pName parameter name
pValues parameter values
Exceptions:
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

Parameters:
pPropagationLevel how far the propagation method proceeds through composite classes (-1: unlimited, 0: no proceeding, >0: limited proceeding)


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const ParameterList pParameterList 
) [friend]

print parameter list information


Member Data Documentation

const base::String ParameterList::sClassName [static]

default name

data::IndexHash<base::String, Parameter> iso::flock::ParameterList::mParameters [protected]

parameters


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 15:28:04 2011 for iso_flock by  doxygen 1.5.1