COPASI API
4.40.278
|
#include <CFunctionParameters.h>
Public Types | |
typedef CDataVector< CFunctionParameter >::const_iterator | const_iterator |
typedef CDataVectorN< CFunctionParameter >::const_name_iterator | const_name_iterator |
typedef CDataVector< CFunctionParameter >::iterator | iterator |
typedef CDataVectorN< CFunctionParameter >::name_iterator | name_iterator |
Public Types inherited from CDataContainer | |
typedef CDataObjectMap | objectMap |
Public Types inherited from CDataObject | |
typedef std::set< const CDataObject * > | DataObjectSet |
enum | Flag { Container , Vector , Matrix , NameVector , Reference , ValueBool , ValueInt , ValueInt64 , ValueDbl , NonUniqueName , StaticString , ValueString , Separator , DisplayName , ModelEntity , Array , DataModel , Root , Gui , __SIZE } |
Public Types inherited from CObjectInterface | |
typedef std::vector< const CDataContainer * > | ContainerList |
typedef std::set< const CObjectInterface * > | ObjectSet |
Public Member Functions | |
bool | add (CFunctionParameter *parameter, const bool &adopt=false) |
void | add (const CFunctionParameter ¶meter) |
bool | add (const std::string &name, const CFunctionParameter::DataType &type, CFunctionParameter::Role usage) |
iterator | begin () |
const_iterator | begin () const |
name_iterator | begin_name () |
const_name_iterator | begin_name () const |
CFunctionParameters (const CFunctionParameters &src, const CDataContainer *pParent) | |
CFunctionParameters (const std::string &name="NoName", const CDataContainer *pParent=NO_PARENT) | |
void | cleanup () |
iterator | end () |
const_iterator | end () const |
name_iterator | end_name () |
const_name_iterator | end_name () const |
size_t | findParameterByName (const std::string &name, const CFunctionParameter **ppFunctionParameter=NULL) const |
size_t | getNumberOfParametersByUsage (CFunctionParameter::Role usage) const |
const CFunctionParameter * | getParameterByUsage (CFunctionParameter::Role usage, size_t &pos) const |
CDataVectorNS< CFunctionParameter > & | getParameters () |
bool | isVector (CFunctionParameter::Role role) const |
CFunctionParameters & | operator= (const CFunctionParameters &src) |
bool | operator== (const CFunctionParameters &rhs) const |
CFunctionParameter * | operator[] (const std::string &name) |
const CFunctionParameter * | operator[] (const std::string &name) const |
CFunctionParameter * | operator[] (size_t index) |
const CFunctionParameter * | operator[] (size_t index) const |
void | remove (const std::string &name) |
size_t | size () const |
void | swap (const size_t &from, const size_t &to) |
~CFunctionParameters () | |
Public Member Functions inherited from CDataContainer | |
virtual bool | add (CDataObject *pObject, const bool &adopt=true) |
virtual bool | appendDeletedDependentData (CUndoData &undoData) const |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) override |
CDataContainer (const CDataContainer &src, const CDataContainer *pParent) | |
CDataContainer (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override |
virtual std::string | getChildObjectUnits (const CDataObject *pObject) const |
void | getDescendants (CDataObject::DataObjectSet &descendants, const bool &recursive=false) const |
virtual size_t | getIndex (const CDataObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
virtual CUndoObjectInterface * | insert (const CData &data) override |
void | objectRenamed (CDataObject *pObject, const std::string &oldName) |
virtual bool | remove (CDataObject *pObject) |
virtual CData | toData () const override |
virtual | ~CDataContainer () |
Public Member Functions inherited from CDataObject | |
void | addIssue (const CIssue &issue) |
void | addReference (const CDataContainer *pReference) |
virtual void | calculateValue () override |
CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL) | |
virtual void | destruct () override |
virtual CCommonName | getCN () const override |
virtual const CDataObject * | getDataObject () const override |
virtual const std::string & | getKey () const |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () const override |
virtual void * | getValuePointer () const override |
bool | hasFlag (const Flag &flag) const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override |
bool | prerequisitsContains (const DataObjectSet &objects) const |
virtual void | print (std::ostream *ostream) const override |
void | removeIssue (const CIssue &issue) |
void | removeReference (const CDataContainer *pReference) |
bool | setObjectName (const std::string &name) |
virtual bool | setObjectParent (const CDataContainer *pParent) |
void | validityChanged (const CValidity &changedValidity) override |
void | validityRemoved (const CValidity &changedValidity) |
virtual | ~CDataObject () |
Public Member Functions inherited from CObjectInterface | |
CObjectInterface () | |
CObjectInterface (const CObjectInterface &src) | |
virtual | ~CObjectInterface () |
Public Member Functions inherited from CUndoObjectInterface | |
CUndoObjectInterface () | |
CUndoObjectInterface (const CUndoObjectInterface &src) | |
bool | generateUuid () |
const xg::Guid & | getUuid () const |
bool | setUuid (const std::string &uuid) |
bool | setUuid (const xg::Guid &uuid) |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual | ~CUndoObjectInterface () |
Protected Member Functions | |
CFunctionParameters (const CFunctionParameters &src) | |
Protected Member Functions inherited from CDataContainer | |
template<class CType > | |
CDataMatrixReference< CType > * | addMatrixReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataObjectReference< CType > * | addObjectReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
template<class CType > | |
CDataVectorReference< CType > * | addVectorReference (const std::string &name, CType &reference, const CFlags< Flag > &flag=CFlags< Flag >::None) |
CDataContainer (const CDataContainer &src) | |
void | initObjects () |
Protected Member Functions inherited from CDataObject | |
CDataObject () | |
CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None) | |
Private Attributes | |
CDataVectorNS< CFunctionParameter > | mParameters |
Friends | |
std::ostream & | operator<< (std::ostream &os, const CFunctionParameters &d) |
Additional Inherited Members | |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
Protected Attributes inherited from CDataContainer | |
objectMap | mObjects |
Protected Attributes inherited from CDataObject | |
ObjectSet | mPrerequisits |
std::set< CDataContainer * > | mReferences |
Protected Attributes inherited from CObjectInterface | |
CValidity | mValidity |
Created for COPASI by Stefan Hoops (C) Stefan Hoops 2001
typedef CDataVectorN< CFunctionParameter >::const_name_iterator CFunctionParameters::const_name_iterator |
|
protected |
CFunctionParameters::CFunctionParameters | ( | const std::string & | name = "NoName" , |
const CDataContainer * | pParent = NO_PARENT |
||
) |
Default constructor
const | std::string & name (default: "NoName") |
const | CDataContainer * pParent (default: NULL) |
Created for Copasi by Stefan Hoops (C) Stefan Hoops 2001
References CONSTRUCTOR_TRACE.
CFunctionParameters::CFunctionParameters | ( | const CFunctionParameters & | src, |
const CDataContainer * | pParent | ||
) |
Copy constructor
const CFunctionParameters & | src |
const | CDataContainer * pParent (default: NULL) |
References CONSTRUCTOR_TRACE.
CFunctionParameters::~CFunctionParameters | ( | ) |
Destructor
References DESTRUCTOR_TRACE.
bool CFunctionParameters::add | ( | CFunctionParameter * | parameter, |
const bool & | adopt = false |
||
) |
Add a parameter to the parameter list
CFunctionParameter * | parameter |
const | bool & adopt (Default: false) |
References CDataVectorN< CType >::add(), and mParameters.
void CFunctionParameters::add | ( | const CFunctionParameter & | parameter | ) |
Add a parameter to the parameter list
const CFunctionParameter & | parameter |
References CDataVectorN< CType >::add(), and mParameters.
Referenced by CFunction::addVariable(), CKinFunction::createParameters(), CFunction::initVariables(), ParameterDescriptionHandler::processStart(), and CMassAction::setInfix().
bool CFunctionParameters::add | ( | const std::string & | name, |
const CFunctionParameter::DataType & | type, | ||
CFunctionParameter::Role | usage | ||
) |
Add a parameter to the parameter list
"const | string & name |
const CFunctionParameter::DataType & | type |
const string & | usage |
References CDataVectorN< CType >::add(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), and mParameters.
CFunctionParameters::iterator CFunctionParameters::begin | ( | ) |
References CDataVector< CType >::begin(), and mParameters.
Referenced by CReaction::createFunctionFromExpression(), CReaction::createUndoData(), and CReaction::toData().
CFunctionParameters::const_iterator CFunctionParameters::begin | ( | ) | const |
References CDataVector< CType >::begin(), and mParameters.
CFunctionParameters::name_iterator CFunctionParameters::begin_name | ( | ) |
References CDataVector< CType >::beginName(), and mParameters.
CFunctionParameters::const_name_iterator CFunctionParameters::begin_name | ( | ) | const |
References CDataVector< CType >::beginName(), and mParameters.
void CFunctionParameters::cleanup | ( | ) |
Cleanup
References CDataVector< CType >::cleanup(), and mParameters.
Referenced by CKinFunction::createParameters(), and CMassAction::setInfix().
CFunctionParameters::iterator CFunctionParameters::end | ( | ) |
References CDataVector< CType >::end(), and mParameters.
Referenced by CReaction::createFunctionFromExpression().
CFunctionParameters::const_iterator CFunctionParameters::end | ( | ) | const |
References CDataVector< CType >::end(), and mParameters.
CFunctionParameters::name_iterator CFunctionParameters::end_name | ( | ) |
References CDataVector< CType >::endName(), and mParameters.
CFunctionParameters::const_name_iterator CFunctionParameters::end_name | ( | ) | const |
References CDataVector< CType >::endName(), and mParameters.
size_t CFunctionParameters::findParameterByName | ( | const std::string & | name, |
const CFunctionParameter ** | ppFunctionParameter = NULL |
||
) | const |
find a parameter by its name and return its index
References C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), mParameters, and CDataVector< CType >::size().
Referenced by CReactionInterface::copyMapping(), CFunctionParameterMap::findParameterByName(), CFunction::getVariableIndex(), CFunction::initVariables(), ParameterDescriptionHandler::processStart(), and CReaction::setParameterValue().
size_t CFunctionParameters::getNumberOfParametersByUsage | ( | CFunctionParameter::Role | usage | ) | const |
gets the number of Parameters with a specific usage
References mParameters, and CDataVector< CType >::size().
Referenced by CFunctionAnalyzer::checkKineticFunction(), CReactionInterface::connectFromScratch(), CReaction::initializeParameters(), CReactionInterface::isLocked(), CFunction::isSuitable(), CReaction::loadOld(), CReaction::loadOneRole(), and CReactionInterface::setMapping().
const CFunctionParameter * CFunctionParameters::getParameterByUsage | ( | CFunctionParameter::Role | usage, |
size_t & | pos | ||
) | const |
Retrieves the first parameter with the specified usage after pos In a normal situation pos is set to 0 for the first call. It is increment by the method to allow subsequent searches to start after the last found item. This is usefull if several parameters with the same usage exist.
const string & | usage |
size_t & | pos (first call should be with 0) |
References MCFunctionParameters, mParameters, CFunctionParameter::RoleNameDisplay, CDataVector< CType >::size(), and CCopasiMessage::WARNING.
Referenced by CReactionInterface::connectFromScratch(), CReaction::initializeParameters(), CReactionInterface::isLocked(), CReaction::loadOld(), CReaction::loadOneRole(), and CReactionInterface::setMapping().
CDataVectorNS< CFunctionParameter > & CFunctionParameters::getParameters | ( | ) |
References mParameters.
bool CFunctionParameters::isVector | ( | CFunctionParameter::Role | role | ) | const |
tells whether there is a parameter with vector type and the given role (if there is one it is assumed it is the only one with this role)
References mParameters, CDataVector< CType >::size(), and CFunctionParameter::VINT32.
Referenced by CFunction::isSuitable(), and CReaction::loadOneRole().
CFunctionParameters & CFunctionParameters::operator= | ( | const CFunctionParameters & | src | ) |
Assignment operator. Performs deep copy.
References CDataVector< CType >::deepCopy(), and mParameters.
bool CFunctionParameters::operator== | ( | const CFunctionParameters & | rhs | ) | const |
CFunctionParameter * CFunctionParameters::operator[] | ( | const std::string & | name | ) |
References mParameters.
const CFunctionParameter * CFunctionParameters::operator[] | ( | const std::string & | name | ) | const |
References mParameters.
CFunctionParameter * CFunctionParameters::operator[] | ( | size_t | index | ) |
References mParameters.
const CFunctionParameter * CFunctionParameters::operator[] | ( | size_t | index | ) | const |
References mParameters.
void CFunctionParameters::remove | ( | const std::string & | name | ) |
Remove a parameter from the parameter list
const CFunctionParameter & | parameter |
References mParameters, and CDataVectorN< CType >::remove().
Referenced by CFunction::initVariables(), and FunctionHandler::processEnd().
size_t CFunctionParameters::size | ( | ) | const |
number of parameters
References mParameters, and CDataVector< CType >::size().
Referenced by CMathEvent::CTrigger::allocate(), SBMLImporter::areEqualFunctions(), CFunctionParameterMap::CFunctionParameterMap(), CFunctionParameterMap::checkCallParameters(), CFunctionAnalyzer::checkKineticFunction(), CModelAnalyzer::checkReaction(), CFunctionParameterMap::clearCallParameters(), CReaction::compileFunctionParameters(), CFunctionAnalyzer::constructCallParameters(), CFunctionAnalyzer::constructCallParametersActualValues(), CModel::convert2NonReversible(), SBMLImporter::createCReactionFromReaction(), SBMLImporter::createExpressionFromFunction(), CSBMLExporter::createFunctionDefinition(), CSBMLExporter::createKineticExpression(), CSBMLExporter::createKineticLaw(), CFunction::createListOfParametersForMathML(), CMMLOutput::createParameterMapping(), SBMLImporter::doMapping(), CModelExpansion::duplicateReaction(), CFunctionAnalyzer::evaluateNode(), CODEExporterC::exportSingleFunction(), CODEExporterC::exportTitleData(), SBMLImporter::findCorrespondingFunction(), CReactionInterface::getDeletedParameters(), CObjectLists::getListOfConstObjects(), CFunctionParameterMap::initCallParameters(), CReaction::initializeParameterMapping(), CFunction::initVariables(), CODEExporterC::KineticFunction2ODEmember(), CModelMerging::mergeMetabolites(), operator==(), FunctionHandler::processEnd(), ParameterDescriptionHandler::processStart(), CModelExpansion::replaceInReaction(), CCopasiXML::saveFunctionList(), CCopasiXML::saveModel(), CReactionInterface::size(), CFunction::splitFunction(), CEvaluationNodeCall::verifyParameters(), and CFunction::writeMathML().
void CFunctionParameters::swap | ( | const size_t & | from, |
const size_t & | to | ||
) |
Swap parameters
const | size_t & from |
const | size_t & to |
References mParameters, and CDataVector< CType >::swap().
Referenced by ParameterDescriptionHandler::processStart().
|
friend |
insert operator
|
private |
A vector of parameters @supplierCardinality 0..* @associates <{CFunctionParameter}>
Referenced by add(), begin(), begin_name(), cleanup(), end(), end_name(), findParameterByName(), getNumberOfParametersByUsage(), getParameterByUsage(), getParameters(), isVector(), operator=(), operator==(), operator[](), remove(), size(), and swap().