COPASI API  4.40.278
CFunctionParameters Class Reference

#include <CFunctionParameters.h>

Inheritance diagram for CFunctionParameters:
[legend]

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 &parameter)
 
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 CFunctionParametergetParameterByUsage (CFunctionParameter::Role usage, size_t &pos) const
 
CDataVectorNS< CFunctionParameter > & getParameters ()
 
bool isVector (CFunctionParameter::Role role) const
 
CFunctionParametersoperator= (const CFunctionParameters &src)
 
bool operator== (const CFunctionParameters &rhs) const
 
CFunctionParameteroperator[] (const std::string &name)
 
const CFunctionParameteroperator[] (const std::string &name) const
 
CFunctionParameteroperator[] (size_t index)
 
const CFunctionParameteroperator[] (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 CObjectInterfacegetObject (const CCommonName &cn) const override
 
virtual objectMapgetObjects ()
 
virtual const objectMapgetObjects () const
 
virtual const std::string getUnits () const override
 
virtual const CDataObjectgetValueObject () const override
 
virtual CUndoObjectInterfaceinsert (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 CDataObjectgetDataObject () const override
 
virtual const std::string & getKey () const
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName () const override
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const CValiditygetValidity () 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< CFunctionParametermParameters
 

Friends

std::ostream & operator<< (std::ostream &os, const CFunctionParameters &d)
 

Additional Inherited Members

- Static Public Member Functions inherited from CDataContainer
static CDataContainerfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (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
 

Detailed Description

CFunctionParameters

Created for COPASI by Stefan Hoops (C) Stefan Hoops 2001

Member Typedef Documentation

◆ const_iterator

◆ const_name_iterator

◆ iterator

◆ name_iterator

Constructor & Destructor Documentation

◆ CFunctionParameters() [1/3]

CFunctionParameters::CFunctionParameters ( const CFunctionParameters src)
protected

◆ CFunctionParameters() [2/3]

CFunctionParameters::CFunctionParameters ( const std::string &  name = "NoName",
const CDataContainer pParent = NO_PARENT 
)

Default constructor

Parameters
conststd::string & name (default: "NoName")
constCDataContainer * pParent (default: NULL)

CFunctionParameters

Created for Copasi by Stefan Hoops (C) Stefan Hoops 2001

References CONSTRUCTOR_TRACE.

◆ CFunctionParameters() [3/3]

CFunctionParameters::CFunctionParameters ( const CFunctionParameters src,
const CDataContainer pParent 
)

Copy constructor

Parameters
const CFunctionParameters &src
constCDataContainer * pParent (default: NULL)

References CONSTRUCTOR_TRACE.

◆ ~CFunctionParameters()

CFunctionParameters::~CFunctionParameters ( )

Destructor

References DESTRUCTOR_TRACE.

Member Function Documentation

◆ add() [1/3]

bool CFunctionParameters::add ( CFunctionParameter parameter,
const bool &  adopt = false 
)

Add a parameter to the parameter list

Parameters
CFunctionParameter *parameter
constbool & adopt (Default: false)
Returns
bool success

References CDataVectorN< CType >::add(), and mParameters.

◆ add() [2/3]

void CFunctionParameters::add ( const CFunctionParameter parameter)

Add a parameter to the parameter list

Parameters
const CFunctionParameter &parameter

References CDataVectorN< CType >::add(), and mParameters.

Referenced by CFunction::addVariable(), CKinFunction::createParameters(), CFunction::initVariables(), ParameterDescriptionHandler::processStart(), and CMassAction::setInfix().

◆ add() [3/3]

bool CFunctionParameters::add ( const std::string &  name,
const CFunctionParameter::DataType type,
CFunctionParameter::Role  usage 
)

Add a parameter to the parameter list

Parameters
"conststring & name
const CFunctionParameter::DataType &type
const string &usage
Returns
bool success

References CDataVectorN< CType >::add(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), and mParameters.

◆ begin() [1/2]

◆ begin() [2/2]

CFunctionParameters::const_iterator CFunctionParameters::begin ( ) const

◆ begin_name() [1/2]

CFunctionParameters::name_iterator CFunctionParameters::begin_name ( )

◆ begin_name() [2/2]

CFunctionParameters::const_name_iterator CFunctionParameters::begin_name ( ) const

◆ cleanup()

void CFunctionParameters::cleanup ( )

◆ end() [1/2]

◆ end() [2/2]

CFunctionParameters::const_iterator CFunctionParameters::end ( ) const

◆ end_name() [1/2]

CFunctionParameters::name_iterator CFunctionParameters::end_name ( )

◆ end_name() [2/2]

CFunctionParameters::const_name_iterator CFunctionParameters::end_name ( ) const

◆ findParameterByName()

size_t CFunctionParameters::findParameterByName ( const std::string &  name,
const CFunctionParameter **  ppFunctionParameter = NULL 
) const

◆ getNumberOfParametersByUsage()

◆ getParameterByUsage()

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.

Parameters
const string &usage
size_t &pos (first call should be with 0)
Returns
"CFunctionParameter &" usageRange

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().

◆ getParameters()

CDataVectorNS< CFunctionParameter > & CFunctionParameters::getParameters ( )

References mParameters.

◆ isVector()

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().

◆ operator=()

CFunctionParameters & CFunctionParameters::operator= ( const CFunctionParameters src)

Assignment operator. Performs deep copy.

References CDataVector< CType >::deepCopy(), and mParameters.

◆ operator==()

bool CFunctionParameters::operator== ( const CFunctionParameters rhs) const

◆ operator[]() [1/4]

CFunctionParameter * CFunctionParameters::operator[] ( const std::string &  name)

References mParameters.

◆ operator[]() [2/4]

const CFunctionParameter * CFunctionParameters::operator[] ( const std::string &  name) const

References mParameters.

◆ operator[]() [3/4]

CFunctionParameter * CFunctionParameters::operator[] ( size_t  index)

References mParameters.

◆ operator[]() [4/4]

const CFunctionParameter * CFunctionParameters::operator[] ( size_t  index) const

References mParameters.

◆ remove()

void CFunctionParameters::remove ( const std::string &  name)

Remove a parameter from the parameter list

Parameters
const CFunctionParameter &parameter

References mParameters, and CDataVectorN< CType >::remove().

Referenced by CFunction::initVariables(), and FunctionHandler::processEnd().

◆ size()

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().

◆ swap()

void CFunctionParameters::swap ( const size_t &  from,
const size_t &  to 
)

Swap parameters

Parameters
constsize_t & from
constsize_t & to

References mParameters, and CDataVector< CType >::swap().

Referenced by ParameterDescriptionHandler::processStart().

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CFunctionParameters d 
)
friend

insert operator

Member Data Documentation

◆ mParameters


The documentation for this class was generated from the following files: