copasi API  0.1
Public Types | Public Member Functions | Protected Member Functions | Friends
CCopasiParameterGroup Class Reference

#include <CCopasiParameterGroup.h>

Inheritance diagram for CCopasiParameterGroup:
CCopasiParameter CCopasiContainer CCopasiObject CConfigurationFile CCopasiMethod CCopasiProblem CExperiment CExperimentObjectMap CExperimentObjectMap::CDataColumn CExperimentSet CMIRIAMResource CMIRIAMResources COptItem CPlotItem CRecentFiles

List of all members.

Public Types

typedef std::vector
< CCopasiParameter * > 
parameterGroup
typedef parameterGroup::iterator index_iterator
typedef
CCopasiContainer::objectMap::iterator 
name_iterator

Public Member Functions

 CCopasiParameterGroup (const CCopasiParameterGroup &src, const CCopasiContainer *pParent=NULL)
 CCopasiParameterGroup (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &objectType="ParameterGroup")
virtual ~CCopasiParameterGroup ()
virtual bool elevateChildren ()
CCopasiParameterGroupoperator= (const CCopasiParameterGroup &rhs)
name_iterator beginName () const
name_iterator endName () const
index_iterator beginIndex () const
index_iterator endIndex () const
bool addParameter (const CCopasiParameter &parameter)
bool addParameter (const std::string &name, const CCopasiParameter::Type type)
template<class CType >
bool addParameter (const std::string &name, const CCopasiParameter::Type type, const CType &value)
template<class CType >
CCopasiParameterassertParameter (const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
bool addGroup (const std::string &name)
CCopasiParameterGroupassertGroup (const std::string &name)
bool removeParameter (const std::string &name)
bool removeParameter (const unsigned C_INT32 &index)
CCopasiParametergetParameter (const std::string &name)
const CCopasiParametergetParameter (const std::string &name) const
CCopasiParametergetParameter (const unsigned C_INT32 &index)
const CCopasiParametergetParameter (const unsigned C_INT32 &index) const
CCopasiParameterGroupgetGroup (const std::string &name)
const CCopasiParameterGroupgetGroup (const std::string &name) const
CCopasiParameterGroupgetGroup (const unsigned C_INT32 &index)
const CCopasiParameterGroupgetGroup (const unsigned C_INT32 &index) const
const CCopasiParameter::ValuegetValue (const std::string &name) const
const CCopasiParameter::ValuegetValue (const unsigned C_INT32 &index) const
CCopasiParameter::ValuegetValue (const std::string &name)
CCopasiParameter::ValuegetValue (const unsigned C_INT32 &index)
CCopasiParameter::Type getType (const std::string &name) const
CCopasiParameter::Type getType (const unsigned C_INT32 &index) const
std::string getKey (const std::string &name) const
std::string getKey (const unsigned C_INT32 &index) const
virtual const std::string & getName (const unsigned C_INT32 &index) const
template<class CType >
bool setValue (const std::string &name, const CType &value)
template<class CType >
bool setValue (const unsigned C_INT32 &index, const CType &value)
bool swap (const unsigned C_INT32 &iFrom, const unsigned C_INT32 &iTo)
bool swap (index_iterator &from, index_iterator &to)
unsigned C_INT32 size () const
void clear ()
unsigned C_INT32 getIndex (const std::string &name) const
virtual void print (std::ostream *ostream) const
void addParameter (CCopasiParameter *pParameter)

Protected Member Functions

 CCopasiParameterGroup ()

Friends

std::ostream & operator<< (std::ostream &os, const CCopasiParameterGroup &o)
bool operator== (const CCopasiParameterGroup &lhs, const CCopasiParameterGroup &rhs)

Detailed Description

CCopasiParameterGroup class. This class is used to describe parameters. This class is intended to be used with integration or optimization methods or reactions.

Created for COPASI by Stefan Hoops 2002


Member Typedef Documentation

typedef parameterGroup::iterator CCopasiParameterGroup::index_iterator
typedef CCopasiContainer::objectMap::iterator CCopasiParameterGroup::name_iterator

Constructor & Destructor Documentation

CCopasiParameterGroup::CCopasiParameterGroup ( ) [protected]

Default constructor

CCopasiParameterGroup class. This class is used to describe parameters. This class is intended to be used with integration or optimization methods or reactions.

Created for Copasi by Stefan Hoops 2002

CCopasiParameterGroup::CCopasiParameterGroup ( const CCopasiParameterGroup src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters:
const CCopasiParameterGroup &src
constCCopasiContainer * pParent (default: NULL)
CCopasiParameterGroup::CCopasiParameterGroup ( const std::string &  name,
const CCopasiContainer pParent = NULL,
const std::string &  objectType = "ParameterGroup" 
)

Specific constructor

Parameters:
conststring & name
constCCopasiContainer * pParent (default: NULL)
conststd::string & objectType (default: "ParameterGroup")
CCopasiParameterGroup::~CCopasiParameterGroup ( ) [virtual]

Destructor


Member Function Documentation

bool CCopasiParameterGroup::addGroup ( const std::string &  name)

Add a subgroup to the group

Parameters:
conststd::string & name
Returns:
bool success
bool CCopasiParameterGroup::addParameter ( const CCopasiParameter parameter)

Add a parameter

Parameters:
constCCopasiParameter & parameter
Returns:
bool success
bool CCopasiParameterGroup::addParameter ( const std::string &  name,
const CCopasiParameter::Type  type 
)

Add a parameter to the group

Parameters:
conststd::string & name
constCCopasiParameter::Type type
Returns:
bool success
template<class CType >
bool CCopasiParameterGroup::addParameter ( const std::string &  name,
const CCopasiParameter::Type  type,
const CType &  value 
) [inline]

Add a parameter to the group

Parameters:
conststd::string & name
constCCopasiParameter::Type type
constCType & value
Returns:
bool success
void CCopasiParameterGroup::addParameter ( CCopasiParameter pParameter)

Add a parameter

Parameters:
CCopasiParameter* pParameter
CCopasiParameterGroup * CCopasiParameterGroup::assertGroup ( const std::string &  name)

Assert that a group with the given name is present. If not the group is created as empty group.

Parameters:
conststd::string & name
Returns:
CCopasiParameterGroup * pGroup
template<class CType >
CCopasiParameter* CCopasiParameterGroup::assertParameter ( const std::string &  name,
const CCopasiParameter::Type  type,
const CType &  defaultValue 
) [inline]

Assert that a parameter with the given name and type is present. If not the parameter is created with the default value.

Parameters:
conststd::string & name
constCCopasiParameter::Type type
constCType & Value
Returns:
CCopasiParameter * pParameter
CCopasiParameterGroup::index_iterator CCopasiParameterGroup::beginIndex ( ) const

Retrieve the begin of unsorted iterator Note: the swap function may be used to change the order

Returns:
name_iterator begin
CCopasiParameterGroup::name_iterator CCopasiParameterGroup::beginName ( ) const

Retrieve the begin of an alphabetically sorted iterator

Returns:
name_iterator begin
void CCopasiParameterGroup::clear ( )

Clear all parameters and subgroups

bool CCopasiParameterGroup::elevateChildren ( ) [virtual]
CCopasiParameterGroup::index_iterator CCopasiParameterGroup::endIndex ( ) const

Retrieve the end of unsorted iterator Note: the swap function may be used to change the order

Returns:
name_iterator end
CCopasiParameterGroup::name_iterator CCopasiParameterGroup::endName ( ) const

Retrieve the end of an alphabetically sorted iterator

Returns:
name_iterator end
CCopasiParameterGroup * CCopasiParameterGroup::getGroup ( const std::string &  name)

Retrieve a subgroup from the group

Parameters:
conststd::string & name
Returns:
CCopasiParameterGroup * group
const CCopasiParameterGroup * CCopasiParameterGroup::getGroup ( const std::string &  name) const

Retrieve a subgroup from the group

Parameters:
conststd::string & name
Returns:
const CCopasiParameterGroup * group
CCopasiParameterGroup * CCopasiParameterGroup::getGroup ( const unsigned C_INT32 &  index)

Retrieve a subgroup from the group

Parameters:
constunsigned C_INT32 & index
Returns:
CCopasiParameterGroup * parameter
const CCopasiParameterGroup * CCopasiParameterGroup::getGroup ( const unsigned C_INT32 &  index) const

Retrieve a subgroup from the group

Parameters:
constunsigned C_INT32 & index
Returns:
const CCopasiParameterGroup * parameter
unsigned C_INT32 CCopasiParameterGroup::getIndex ( const std::string &  name) const

Retrieve the index of a parameter or subgroup with a given name

Parameters:
conststd::string & name
Returns:
unsigned C_INT32 index
std::string CCopasiParameterGroup::getKey ( const std::string &  name) const

Retrieve the key of a parameter or subgroup

Parameters:
conststd::string & name
Returns:
std::string key
std::string CCopasiParameterGroup::getKey ( const unsigned C_INT32 &  index) const

Retrieve the key of a parameter or subgroup

Parameters:
constunsigned C_INT32 & index
Returns:
std::string key
const std::string & CCopasiParameterGroup::getName ( const unsigned C_INT32 &  index) const [virtual]

Retrieve the name of a parameter or subgroup

Parameters:
constunsigned C_INT32 & index
Returns:
std::string name

Reimplemented in CExperimentObjectMap.

CCopasiParameter * CCopasiParameterGroup::getParameter ( const std::string &  name)

Retrieve a parameter or subgroup from the group

Parameters:
conststd::string & name
Returns:
CCopasiParameter * parameter
const CCopasiParameter * CCopasiParameterGroup::getParameter ( const std::string &  name) const

Retrieve a parameter or subgroup from the group

Parameters:
conststd::string & name
Returns:
const CCopasiParameter * parameter
CCopasiParameter * CCopasiParameterGroup::getParameter ( const unsigned C_INT32 &  index)

Retrieve a parameter or subgroup from the group

Parameters:
constunsigned C_INT32 & index
Returns:
CCopasiParameter * parameter
const CCopasiParameter * CCopasiParameterGroup::getParameter ( const unsigned C_INT32 &  index) const

Retrieve a parameter or subgroup from the group

Parameters:
constunsigned C_INT32 & index
Returns:
const CCopasiParameter * parameter
CCopasiParameter::Type CCopasiParameterGroup::getType ( const std::string &  name) const

Retrieve the type of a parameter or subgroup

Parameters:
conststd::string & name
Returns:
CCopasiParameter::Type
CCopasiParameter::Type CCopasiParameterGroup::getType ( const unsigned C_INT32 &  index) const

Retrieve the type of a parameter or subgroup

Parameters:
constunsigned C_INT32 & index
Returns:
CCopasiParameter::Type
const CCopasiParameter::Value & CCopasiParameterGroup::getValue ( const std::string &  name) const

Retrieve a pointer to the value of a parameter or subgroup

Parameters:
conststd::string & name
Returns:
const CCopasiParameter::Value & Value
const CCopasiParameter::Value & CCopasiParameterGroup::getValue ( const unsigned C_INT32 &  index) const

Retrieve a pointer to the value of a parameter or subgroup

Parameters:
constunsigned C_INT32 & index
Returns:
const CCopasiParameter::Value & Value
CCopasiParameter::Value & CCopasiParameterGroup::getValue ( const std::string &  name)

Retrieve a pointer to the value of a parameter or subgroup

Parameters:
conststd::string & name
Returns:
CCopasiParameter::Value & Value
CCopasiParameter::Value & CCopasiParameterGroup::getValue ( const unsigned C_INT32 &  index)

Retrieve a pointer to the value of a parameter or subgroup

Parameters:
constunsigned C_INT32 & index
Returns:
CCopasiParameter::Value & Value
CCopasiParameterGroup & CCopasiParameterGroup::operator= ( const CCopasiParameterGroup rhs)

Assignment operator

Parameters:
constCCopasiParameterGroup & rhs
Returns:
CCopasiParameterGroup & lhs
void CCopasiParameterGroup::print ( std::ostream *  ostream) const [virtual]

This is the output method for any object. The default implementation provided with CCopasiObject uses the ostream operator<< of the object to print the object.To override this default behavior one needs to reimplement the virtual print function.

Parameters:
std::ostream* ostream

Reimplemented from CCopasiParameter.

Reimplemented in COptProblem, CCopasiMethod, CCopasiProblem, CSensProblem, CMCAProblem, CFitProblem, and CCrossSectionProblem.

bool CCopasiParameterGroup::removeParameter ( const std::string &  name)

Remove a parameter or subgroup from the group

Parameters:
conststd::string & name
Returns:
bool success
bool CCopasiParameterGroup::removeParameter ( const unsigned C_INT32 &  index)

Remove a parameter or subgroup from the group

Parameters:
constunsigned C_INT32 & index
Returns:
bool success
template<class CType >
bool CCopasiParameterGroup::setValue ( const std::string &  name,
const CType &  value 
) [inline]

Set the value of a parameter or subgroup.

Parameters:
conststd::string & name
constCType & value
Returns:
bool success
template<class CType >
bool CCopasiParameterGroup::setValue ( const unsigned C_INT32 &  index,
const CType &  value 
) [inline]

Set the value of a parameter or subgroup.

Parameters:
constunsigned C_INT32 & index
constCType & value
Returns:
bool success
unsigned C_INT32 CCopasiParameterGroup::size ( ) const

The size of the parameter group @ return unsigned C_INT32 size

bool CCopasiParameterGroup::swap ( const unsigned C_INT32 &  iFrom,
const unsigned C_INT32 &  iTo 
)

Swap two parameters Note: This has effect on the index_iterator and index access methods.

Parameters:
constunsigned C_INT32 & iFrom
constunsigned C_INT32 & iTo
Returns:
bool success
bool CCopasiParameterGroup::swap ( index_iterator from,
index_iterator to 
)

Swap two parameters Note: This has effect on the iterator and index access methods.

Parameters:
index_iterator& from
index_iterator& to
Returns:
bool success

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CCopasiParameterGroup o 
) [friend]

Output stream operator

Parameters:
ostream& os
constCCopasiParameterGroup & o
Returns:
ostream & os
bool operator== ( const CCopasiParameterGroup lhs,
const CCopasiParameterGroup rhs 
) [friend]

Comparison operator

Parameters:
constCCopasiParameterGroup & lhs
constCCopasiParameterGroup & rhs
Returns:
bool equal

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines