copasi API  0.1
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Friends
CCopasiParameter Class Reference

#include <CCopasiParameter.h>

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

List of all members.

Classes

union  Value

Public Types

enum  Type {
  DOUBLE = 0, UDOUBLE, INT, UINT,
  BOOL, GROUP, STRING, CN,
  KEY, FILE, EXPRESSION, INVALID
}

Public Member Functions

 CCopasiParameter (const CCopasiParameter &src, const CCopasiContainer *pParent=NULL)
 CCopasiParameter (const std::string &name, const Type &type, const void *pValue=NULL, const CCopasiContainer *pParent=NULL, const std::string &objectType="Parameter")
virtual ~CCopasiParameter ()
CCopasiParameteroperator= (const CCopasiParameter &rhs)
virtual const std::string & getKey () const
template<class CType >
bool setValue (const CType &value)
bool setValue (const std::vector< CCopasiParameter * > &value)
const ValuegetValue () const
ValuegetValue ()
const CCopasiParameter::TypegetType () const
bool isValidValue (const C_FLOAT64 &value) const
bool isValidValue (const C_INT32 &value) const
bool isValidValue (const unsigned C_INT32 &value) const
bool isValidValue (const bool &value) const
bool isValidValue (const std::string &value) const
bool isValidValue (const CCopasiObjectName &value) const
bool isValidValue (const std::vector< CCopasiParameter * > &value) const
virtual void print (std::ostream *ostream) const
virtual void * getValuePointer () const
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const

Static Public Attributes

static const std::string TypeName []
static const char * XMLType []

Protected Attributes

std::string mKey
unsigned C_INT32 mSize
Value mValue

Friends

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

Detailed Description

CCopasiParameter 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 Enumeration Documentation

Enumerator:
DOUBLE 
UDOUBLE 
INT 
UINT 
BOOL 
GROUP 
STRING 
CN 
KEY 
FILE 
EXPRESSION 
INVALID 

Reimplemented in CPlotItem, CExperiment, and CScanProblem.


Constructor & Destructor Documentation

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

Copy constructor

Parameters:
constCCopasiParameter & src
constCCopasiContainer * pParent (default: NULL)
CCopasiParameter::CCopasiParameter ( const std::string &  name,
const Type type,
const void *  pValue = NULL,
const CCopasiContainer pParent = NULL,
const std::string &  objectType = "Parameter" 
)

Specific constructor

Parameters:
conststring & name
constCCopasiParameter::Type & type
constvoid * pValue (default: NULL)
constCCopasiContainer * pParent (default: NULL)
conststd::string & objectType (default: "Parameter")
CCopasiParameter::~CCopasiParameter ( ) [virtual]

Destructor


Member Function Documentation

const std::string & CCopasiParameter::getKey ( ) const [virtual]

Return the key of this model

Returns:
string key

Reimplemented from CCopasiObject.

std::string CCopasiParameter::getObjectDisplayName ( bool  regular = true,
bool  richtext = false 
) const [virtual]

Overload display name. Special treatment for reaction parameters to provide a shorter display.

Reimplemented from CCopasiObject.

const CCopasiParameter::Type & CCopasiParameter::getType ( void  ) const

Retrieve the type of the parameter.

Returns:
CCopasiParameter::Type & type

Reimplemented in CCopasiMethod, CPlotItem, and CCopasiProblem.

const CCopasiParameter::Value & CCopasiParameter::getValue ( ) const

Retrieve the private value of the parameter.

Returns:
const CCopasiParameter::Value & Value
CCopasiParameter::Value & CCopasiParameter::getValue ( )

Retrieve the private value of the parameter.

Returns:
CCopasiParameter::Value & Value
void * CCopasiParameter::getValuePointer ( ) const [virtual]

Reimplemented from CCopasiObject.

bool CCopasiParameter::isValidValue ( const C_FLOAT64 &  value) const

Check whether the value corresponds to the type

Parameters:
constC_FLOAT64 & value
Returns:
bool isValidValue
bool CCopasiParameter::isValidValue ( const C_INT32 &  value) const

Check whether the value corresponds to the type

Parameters:
constC_INT32 & value
Returns:
bool isValidValue
bool CCopasiParameter::isValidValue ( const unsigned C_INT32 &  value) const

Check whether the value corresponds to the type

Parameters:
constunsigned C_INT32 & value
Returns:
bool isValidValue
bool CCopasiParameter::isValidValue ( const bool &  value) const

Check whether the value corresponds to the type

Parameters:
constbool & value
Returns:
bool isValidValue
bool CCopasiParameter::isValidValue ( const std::string &  value) const

Check whether the value corresponds to the type

Parameters:
conststd::string & value
Returns:
bool isValidValue
bool CCopasiParameter::isValidValue ( const CCopasiObjectName value) const

Check whether the value corresponds to the type

Parameters:
constCRegisteredObjectName & value
Returns:
bool isValidValue
bool CCopasiParameter::isValidValue ( const std::vector< CCopasiParameter * > &  value) const

Check whether the value corresponds to the type

Parameters:
constCCopasiParameterGroup::parameterGroup & value
Returns:
bool isValidValue
CCopasiParameter & CCopasiParameter::operator= ( const CCopasiParameter rhs)

Assignment operator

Parameters:
constCCopasiParameter & rhs
Returns:
CCopasiParameter & lhs
void CCopasiParameter::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 CCopasiObject.

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

template<class CType >
bool CCopasiParameter::setValue ( const CType &  value) [inline]

Set the value of the parameter

Parameters:
constunsigned C_INT32 & value
Returns:
bool isValidValue
bool CCopasiParameter::setValue ( const std::vector< CCopasiParameter * > &  value)

Set the value of the parameter when the origin is a parameter group. This function is currently not implemented and creates a fatalError when called.

Parameters:
constCCopasiParameter::parameterGroup& value
Returns:
bool false

Friends And Related Function Documentation

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

Output stream operator

Parameters:
ostream& os
constCCopasiParameter & A
Returns:
ostream & os
bool operator== ( const CCopasiParameter lhs,
const CCopasiParameter rhs 
) [friend]

Comparison operator

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

Member Data Documentation

std::string CCopasiParameter::mKey [protected]

The key of the parameter.

unsigned C_INT32 CCopasiParameter::mSize [protected]

The size allocated for the value of the parameter.

A pointer to the value of the parameter.

const std::string CCopasiParameter::TypeName [static]
Initial value:
{
  "float",
  "unsigned float",
  "integer",
  "unsigned integer",
  "bool",
  "group",
  "string",
  "common name",
  "key",
  "file",
  "expression",
  ""
}

String literals for the GUI to display type names of parameters known to COPASI.

CCopasiParameter class. This class is used to describe method paramters. This class is intended to be used with integration or optimization methods.

Created for Copasi by Stefan Hoops 2002

Reimplemented in CPlotItem, CExperiment, and CFitMethod.

const char * CCopasiParameter::XMLType [static]
Initial value:
{
  "float",
  "unsignedFloat",
  "integer",
  "unsignedInteger",
  "bool",
  "group",
  "string",
  "cn",
  "key",
  "file",
  "expression",
  NULL
}

XML type names of parameters known to COPASI.

Reimplemented in CPlotItem, and CExperiment.


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