COPASI API
4.40.278
|
#include <CCallParameters.h>
Public Member Functions | |
CIssue | addCallParameter (const std::string paramName, const CDataObject *obj) |
CFunctionParameterMap () | |
CFunctionParameterMap (const CFunctionParameterMap &src) | |
void | clearCallParameter (const std::string paramName) |
size_t | findParameterByName (const std::string &name, const CFunctionParameter **ppFunctionParameter=NULL) const |
const CFunctionParameters & | getFunctionParameters () const |
CCallParameters< CDataObject > & | getObjects () |
const CCallParameters< CDataObject > & | getObjects () const |
std::vector< const CDataObject * > | getObjects (const size_t &index) const |
CCallParameters< C_FLOAT64 > & | getPointers () |
const CCallParameters< C_FLOAT64 > & | getPointers () const |
void | initializeFromFunctionParameters (const CFunctionParameters &src) |
void | removeCallParameter (const std::string paramName, const CDataObject *obj) |
CIssue | setCallParameter (const std::string paramName, const CDataObject *obj) |
~CFunctionParameterMap () | |
Static Public Attributes | |
static CDataObject * | pUnmappedObject = NULL |
Private Member Functions | |
void | checkCallParameters () const |
void | clearCallParameters () |
void | initCallParameters () |
Private Attributes | |
CCallParameters< CDataObject > | mObjects |
CFunctionParameters * | mpFunctionParameters |
CCallParameters< C_FLOAT64 > | mPointers |
This class describes how a reaction fills the call parameters of a function. It is generated from a CFunctionParameters object. The reaction provides what exactly is to be passed as function parameters.
CFunctionParameterMap::CFunctionParameterMap | ( | ) |
References C_FLOAT64, and pUnmappedObject.
CFunctionParameterMap::CFunctionParameterMap | ( | const CFunctionParameterMap & | src | ) |
References mObjects, mpFunctionParameters, mPointers, CFunctionParameters::size(), and CFunctionParameter::VINT32.
CFunctionParameterMap::~CFunctionParameterMap | ( | ) |
Destructor();
References clearCallParameters(), mpFunctionParameters, and pdelete.
CIssue CFunctionParameterMap::addCallParameter | ( | const std::string | paramName, |
const CDataObject * | obj | ||
) |
Adds an object to a specific parameter vector. Works only if the parameter is a vector
References C_FLOAT64, C_INVALID_INDEX, CIssue::Error, fatalError, findParameterByName(), CFunctionParameter::getType(), CFunctionParameter::getUsage(), CDataObject::getValuePointer(), CDataObject::hasFlag(), mObjects, CFunctionParameter::MODIFIER, mPointers, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CCallParameters< Type >::push_back(), CFunctionParameter::SUBSTRATE, CFunctionParameter::TEMPORARY, CFunctionParameter::TIME, CDataObject::ValueDbl, CFunctionParameter::VARIABLE, CIssue::VariablesMismatch, CFunctionParameter::VINT32, and CFunctionParameter::VOLUME.
Referenced by CReaction::compileFunctionParameters().
|
private |
Check if all pointers are !=NULL.
References fatalError, mObjects, mpFunctionParameters, mPointers, CCallParameters< Type >::size(), CFunctionParameters::size(), and CFunctionParameter::VINT32.
void CFunctionParameterMap::clearCallParameter | ( | const std::string | paramName | ) |
Removes all objects from a specific parameter vector. Works only if the parameter is a vector.
References C_INVALID_INDEX, CCallParameters< Type >::clear(), fatalError, findParameterByName(), CFunctionParameter::getType(), mObjects, mPointers, and CFunctionParameter::VINT32.
Referenced by CReaction::compileFunctionParameters().
|
private |
Clear the mPointers and mObjects vectors.
References CCallParameters< Type >::clear(), mObjects, mpFunctionParameters, mPointers, CFunctionParameters::size(), and CFunctionParameter::VINT32.
Referenced by initializeFromFunctionParameters(), and ~CFunctionParameterMap().
size_t CFunctionParameterMap::findParameterByName | ( | const std::string & | name, |
const CFunctionParameter ** | ppFunctionParameter = NULL |
||
) | const |
References CFunctionParameters::findParameterByName(), and mpFunctionParameters.
Referenced by addCallParameter(), clearCallParameter(), CReaction::getParameterIndex(), and setCallParameter().
const CFunctionParameters & CFunctionParameterMap::getFunctionParameters | ( | ) | const |
CCallParameters<CDataObject>& CFunctionParameterMap::getObjects | ( | ) |
Referenced by CModel::prepareElasticity().
const CCallParameters< CDataObject > & CFunctionParameterMap::getObjects | ( | ) | const |
References mObjects.
std::vector< const CDataObject * > CFunctionParameterMap::getObjects | ( | const size_t & | index | ) | const |
CCallParameters< C_FLOAT64 > & CFunctionParameterMap::getPointers | ( | ) |
References mPointers.
Referenced by CReaction::getCallParameters().
const CCallParameters< C_FLOAT64 > & CFunctionParameterMap::getPointers | ( | ) | const |
References mPointers.
|
private |
Create the mPointers and mObjects vectors with type information from the CFunctionParameters object.
References mObjects, mpFunctionParameters, mPointers, CCallParameters< Type >::resize(), CFunctionParameters::size(), and CFunctionParameter::VINT32.
Referenced by initializeFromFunctionParameters().
void CFunctionParameterMap::initializeFromFunctionParameters | ( | const CFunctionParameters & | src | ) |
Initializes a CallParameters object from a CFunctionParameters object.
References clearCallParameters(), initCallParameters(), mpFunctionParameters, NO_PARENT, and pdelete.
Referenced by CReaction::setFunction().
void CFunctionParameterMap::removeCallParameter | ( | const std::string | paramName, |
const CDataObject * | obj | ||
) |
Removes an object from a specific parameter vector. Works only if the parameter is a vector
CIssue CFunctionParameterMap::setCallParameter | ( | const std::string | paramName, |
const CDataObject * | obj | ||
) |
Sets a specific parameter. Works only if the parameter is no vector
References C_FLOAT64, C_INVALID_INDEX, CIssue::Error, fatalError, findParameterByName(), CFunctionParameter::getType(), CFunctionParameter::getUsage(), CDataObject::getValuePointer(), CDataObject::hasFlag(), mObjects, CFunctionParameter::MODIFIER, mPointers, CFunctionParameter::PARAMETER, CFunctionParameter::PRODUCT, CFunctionParameter::SUBSTRATE, CFunctionParameter::TEMPORARY, CFunctionParameter::TIME, CDataObject::ValueDbl, CFunctionParameter::VARIABLE, CIssue::VariablesMismatch, CFunctionParameter::VINT32, and CFunctionParameter::VOLUME.
Referenced by CReaction::compileFunctionParameters().
|
private |
This is a vector of pointers to objects. Each objects needs to have a value that can be passed to a function
Referenced by addCallParameter(), CFunctionParameterMap(), checkCallParameters(), clearCallParameter(), clearCallParameters(), getObjects(), initCallParameters(), and setCallParameter().
|
private |
The CFunctionParameters object provides the data types of the call parameters
Referenced by CFunctionParameterMap(), checkCallParameters(), clearCallParameters(), findParameterByName(), getFunctionParameters(), getObjects(), initCallParameters(), initializeFromFunctionParameters(), and ~CFunctionParameterMap().
|
private |
This is a vector of pointers to the data that is passed to a function
Referenced by addCallParameter(), CFunctionParameterMap(), checkCallParameters(), clearCallParameter(), clearCallParameters(), getPointers(), initCallParameters(), and setCallParameter().
|
static |