COPASI API
4.40.278
|
#include <CModelParameterGroup.h>
Public Types | |
typedef std::vector< CModelParameter * >::const_iterator | const_iterator |
typedef std::vector< CModelParameter * >::iterator | iterator |
Public Types inherited from CModelParameter | |
enum class | CompareResult { Obsolete , Missing , Modified , Conflict , Identical , __SIZE } |
enum class | Type { Model , Compartment , Species , ModelValue , ReactionParameter , Reaction , Group , Set , unknown , __SIZE } |
Public Member Functions | |
virtual void | add (CModelParameter *pModelParameter) |
CModelParameter * | add (const CModelParameter::Type &type) |
virtual bool | applyData (const CData &data, CUndoData::CChangeSet &changes) |
void | assignGroupContent (const CModelParameterGroup &src, const bool &createMissing) |
iterator | begin () |
const_iterator | begin () const |
void | clear () |
CModelParameterGroup (CModelParameterGroup *pParent, const CModelParameter::Type &type=CModelParameter::Type::Group) | |
CModelParameterGroup (const CModelParameterGroup &src, CModelParameterGroup *pParent, const bool &createMissing) | |
virtual void | compile () |
virtual void | createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const |
virtual const CompareResult & | diff (const CModelParameter &other, const CCore::Framework &framework, const bool &createMissing=false) |
iterator | end () |
const_iterator | end () const |
virtual const CModelParameter * | getChild (const size_t &index) const |
CModelParameter * | getModelParameter (const std::string &cn) const |
CModelParameter * | getModelParameter (const std::string &name, const CModelParameter::Type &type) const |
virtual size_t | getNumChildren () const |
const CValidatedUnit & | getObjectUnit (const CModelParameter *pModelParameter) const |
virtual CUndoObjectInterface * | insert (const CData &data) |
virtual bool | refreshFromModel (const bool &modifyExistence) |
void | remove (CModelParameter *pModelParameter) |
void | remove (const size_t &index) |
size_t | size () const |
virtual CData | toData () const |
virtual void | updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject) |
virtual bool | updateModel () |
virtual | ~CModelParameterGroup () |
Public Member Functions inherited from CModelParameter | |
CModelParameter (CModelParameterGroup *pParent, const CModelParameter::Type &type) | |
CModelParameter (const CModelParameter &src, CModelParameterGroup *pParent) | |
virtual void | destruct () |
const CCommonName & | getCN () const |
const CompareResult & | getCompareResult () const |
virtual size_t | getIndex () const |
std::string | getInitialExpression () const |
const CExpression * | getInitialExpressionPtr () const |
CModel * | getModel () const |
virtual std::string | getName () const |
CDataObject * | getObject () const |
CModelParameterGroup * | getParent () const |
CModelParameterSet * | getSet () const |
const CModelEntity::Status & | getSimulationType () const |
const Type & | getType () const |
CValidatedUnit | getUnit (const CCore::Framework &framework) const |
virtual const double & | getValue (const CCore::Framework &framework) const |
bool | isInitialExpressionValid () const |
bool | isReadOnly () const |
bool | operator< (const CModelParameter &rhs) const |
virtual void | setCN (const CCommonName &cn) |
void | setCompareResult (const CompareResult &compareResult) |
void | setInitialExpression (const std::string &initialExpression) |
void | setParent (CModelParameterGroup *pParent) |
bool | setSimulationType (const CModelEntity::Status &simulationType) |
virtual void | setValue (const C_FLOAT64 &value, const CCore::Framework &framework, bool updateModelIfActive=true) |
virtual CModelParameterSet * | toSet () |
virtual const CModelParameterSet * | toSet () const |
virtual | ~CModelParameter () |
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 | ~CUndoObjectInterface () |
Protected Member Functions | |
CModelParameter * | copy (const CModelParameter &src, const bool &createMissing) |
Private Attributes | |
std::vector< CModelParameter * > | mModelParameters |
std::map< CObjectInterface *, CValidatedUnit > | mValidatedUnits |
Additional Inherited Members | |
Static Public Member Functions inherited from CModelParameter | |
static CModelParameter * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Static Public Attributes inherited from CModelParameter | |
static const CEnumAnnotation< std::string, CompareResult > | CompareResultNames |
static const CEnumAnnotation< std::string, Type > | TypeNames |
Protected Attributes inherited from CModelParameter | |
CRegisteredCommonName | mCN |
CompareResult | mCompareResult |
bool | mIsInitialExpressionValid |
CExpression * | mpInitialExpression |
CDataObject * | mpObject |
CModelParameterGroup * | mpParent |
CModelEntity::Status | mSimulationType |
Type | mType |
double | mValue |
typedef std::vector< CModelParameter * >::const_iterator CModelParameterGroup::const_iterator |
typedef std::vector< CModelParameter * >::iterator CModelParameterGroup::iterator |
CModelParameterGroup::CModelParameterGroup | ( | CModelParameterGroup * | pParent, |
const CModelParameter::Type & | type = CModelParameter::Type::Group |
||
) |
Constructor
CModelParameterGroup | * pParent |
const | CModelParameter::Type & type (default: CModelParameter::Group) |
CModelParameterGroup::CModelParameterGroup | ( | const CModelParameterGroup & | src, |
CModelParameterGroup * | pParent, | ||
const bool & | createMissing | ||
) |
Copy constructor
const | CModelParameterGroup & src |
CModelParameterGroup | * pParent |
const | bool & createMissing |
References assignGroupContent().
|
virtual |
Destructor
References clear().
|
virtual |
Add the given parameter to the group. Note, the parent of the parameter is not updated
CModelParameter | * pModelParameter |
Reimplemented in CModelParameterSet.
References mModelParameters, and CModelParameter::setParent().
CModelParameter * CModelParameterGroup::add | ( | const CModelParameter::Type & | type | ) |
Add parameter of the given type to the group and return a pointer to it
const | CModelParameter::Type & type |
References CModelParameter::CModelParameter(), CModelParameterGroup(), CModelParameter::Compartment, CModelParameter::Group, CModelParameter::Model, CModelParameter::ModelValue, CModelParameter::Reaction, CModelParameter::ReactionParameter, and CModelParameter::Species.
Referenced by CModelParameterSet::add(), CModelParameterSet::CModelParameterSet(), CModelParameterSet::createFromModel(), and CModelParameterSet::insert().
|
virtual |
Apply the provided data to the object
const | CData & data |
Reimplemented from CModelParameter.
Reimplemented in CModelParameterSet.
References CModelParameter::applyData(), CDataValue::DATA_VECTOR, end(), getModelParameter(), CData::getProperty(), CModelParameter::getSet(), CDataValue::getType(), insert(), CModelParameterSet::insert(), CData::isSetProperty(), CData::OBJECT_NAME, CData::PARAMETER_VALUE, and CDataValue::toDataVector().
Referenced by CModelParameterSet::applyData().
void CModelParameterGroup::assignGroupContent | ( | const CModelParameterGroup & | src, |
const bool & | createMissing | ||
) |
Assign the content of the source group to this, i.e., copy all contained parameters.
const | CModelParameterGroup & src |
const | bool & createMissing |
References begin(), clear(), copy(), end(), and CModelParameter::Missing.
Referenced by CModelParameterSet::assignSetContent(), and CModelParameterGroup().
CModelParameterGroup::iterator CModelParameterGroup::begin | ( | ) |
Retrieve the iterator pointing to the first contained parameter.
References mModelParameters.
Referenced by assignGroupContent(), CModelParameterSet::begin(), clear(), compile(), diff(), CModelParameter::getIndex(), getModelParameter(), refreshFromModel(), remove(), and updateModel().
CModelParameterGroup::const_iterator CModelParameterGroup::begin | ( | ) | const |
Retrieve the const_iterator pointing to the first contained parameter.
References mModelParameters.
void CModelParameterGroup::clear | ( | ) |
Clear the contained parameters and delete them.
References begin(), end(), mModelParameters, CModelParameter::mType, pdelete, and CModelParameter::Set.
Referenced by assignGroupContent(), CModelParameterSet::createFromModel(), and ~CModelParameterGroup().
|
virtual |
Compile the parameter
Reimplemented from CModelParameter.
Reimplemented in CModelParameterSet.
References begin(), CModelParameter::compile(), end(), and mValidatedUnits.
Referenced by CModelParameterSet::compile(), and CModelParameterReactionParameter::setGlobalQuantityCN().
|
protected |
Copy the existing parameter and add it to the group
const | CModelParameter & src |
const | bool & createMissing |
Copy the existing parameter and add it to the group
const | CModelParameter & src |
References CModelParameter::CModelParameter(), CModelParameterGroup(), CModelParameter::Compartment, CModelParameter::getType(), CModelParameter::Group, mModelParameters, CModelParameter::Model, CModelParameter::ModelValue, CModelParameter::Reaction, CModelParameter::ReactionParameter, and CModelParameter::Species.
Referenced by assignGroupContent(), and diff().
|
virtual |
Create the undo data which represents the changes recording the differences between the provided oldData and the current data.
CUndoData | & undoData |
const | CUndoData::Type & type |
const | CData & oldData (default: empty data) |
const | CCore::Framework & framework (default: CCore::Framework::ParticleNumbers) |
Reimplemented from CModelParameter.
Reimplemented in CModelParameterSet.
References CUndoData::addPostProcessData(), CUndoData::addPreProcessData(), CUndoData::addProperty(), CUndoData::CHANGE, CModelParameter::Compartment, CModelParameter::createUndoData(), CUndoData::empty(), CUndoData::getNewData(), CUndoData::getOldData(), CData::getProperty(), CUndoData::INSERT, mModelParameters, CModelParameter::Model, CModelParameter::ModelValue, CData::OBJECT_NAME, CData::PARAMETER_VALUE, CModelParameter::ReactionParameter, CUndoData::REMOVE, CModelParameter::Species, and CDataValue::toDataVector().
Referenced by CModelParameterSet::createUndoData().
|
virtual |
Compare the parameter to an other
const | CModelParameter & other |
const | CCore::Framework & framework |
const | bool & createMissing = false |
Reimplemented from CModelParameter.
References begin(), copy(), end(), CModelParameter::getType(), CModelParameter::Group, CModelParameter::Identical, CModelParameter::mCompareResult, CModelParameter::Missing, CModelParameter::Modified, CModelParameter::Obsolete, CModelParameter::Reaction, CModelParameter::Set, and CModelParameter::setCompareResult().
Referenced by CModelParameterSet::diff().
CModelParameterGroup::iterator CModelParameterGroup::end | ( | ) |
Retrieve the iterator pointing past the last contained parameter.
References mModelParameters.
Referenced by applyData(), assignGroupContent(), clear(), compile(), diff(), CModelParameterSet::end(), CModelParameter::getIndex(), getModelParameter(), refreshFromModel(), remove(), and updateModel().
CModelParameterGroup::const_iterator CModelParameterGroup::end | ( | ) | const |
Retrieve the const_iterator pointing past the last contained parameter.
References mModelParameters.
|
virtual |
Reimplemented from CModelParameter.
References mModelParameters, and size().
CModelParameter * CModelParameterGroup::getModelParameter | ( | const std::string & | cn | ) | const |
Retrieve a pointer to the parameter with the given CN
const | std::string & cn |
References begin(), end(), and getModelParameter().
Referenced by applyData(), CModelParameterSet::CModelParameterSet(), CModelParameterSpecies::compile(), CModelParameterReactionParameter::compile(), getModelParameter(), CModelParameterSet::getModelParameter(), CModelParameterSet::insert(), and CModelParameterSpecies::setValue().
CModelParameter * CModelParameterGroup::getModelParameter | ( | const std::string & | name, |
const CModelParameter::Type & | type | ||
) | const |
Retrieve a pointer to the parameter with the given name and type
const | std::string & name |
const | CModelParameter::Type & type |
References begin(), end(), and getModelParameter().
|
virtual |
Reimplemented from CModelParameter.
References size().
const CValidatedUnit & CModelParameterGroup::getObjectUnit | ( | const CModelParameter * | pModelParameter | ) | const |
Retrieve the validated unit of the object units
const | CModelParameter * pModelParameter |
References CMathObject::getExpressionPtr(), CReaction::getFluxReference(), CModelParameterReactionParameter::getGlobalQuantityCN(), CModel::getMathContainer(), CMathContainer::getMathObject(), CModelParameter::getModel(), CModelParameter::getName(), CModelParameter::getObject(), CMathContainer::getObject(), CUnitValidator::getObjectUnits(), CReaction::getParameterIndex(), CModelParameter::getType(), CDataObject::getUnits(), CModelEntity::getValueReference(), CCopasiParameter::getValueReference(), CReaction::isLocalParameter(), CModelParameter::mpObject, mValidatedUnits, CModelParameter::Reaction, and CUnitValidator::validateUnits().
Referenced by CModelParameter::getUnit().
|
virtual |
Create and insert an undo object based on the given data. This method needs to be re-implemented in container which support INSERT and REMOVE
const | CData & data |
Reimplemented from CUndoObjectInterface.
Reimplemented in CModelParameterSet.
References CModelParameter::fromData(), CData::getProperty(), min, mModelParameters, CData::OBJECT_INDEX, CModelParameter::setParent(), and CDataValue::toSizeT().
Referenced by applyData().
|
virtual |
Refresh the parameter from the corresponding model object
const | bool & modifyExistence |
Reimplemented from CModelParameter.
Reimplemented in CModelParameterSet.
References begin(), end(), CModelParameter::Identical, CModelParameter::mCompareResult, CModelParameter::Missing, and CModelParameter::Obsolete.
Referenced by CModelParameterSet::refreshFromModel().
void CModelParameterGroup::remove | ( | CModelParameter * | pModelParameter | ) |
Remove the given parameter from the group. Note, the parameter is not deleted.
CModelParameter | * pModelParameter |
References begin(), end(), and mModelParameters.
Referenced by CModelParameter::~CModelParameter().
void CModelParameterGroup::remove | ( | const size_t & | index | ) |
Remove the indexed parameter from the group and delete it
const | size_t & index |
References mModelParameters, and pdelete.
size_t CModelParameterGroup::size | ( | ) | const |
Retrieve the size of the group
References mModelParameters.
Referenced by getChild(), and getNumChildren().
|
virtual |
Retrieve the data describing the object
Reimplemented from CModelParameter.
Reimplemented in CModelParameterSet.
References CData::addProperty(), mModelParameters, CData::PARAMETER_VALUE, and CModelParameter::toData().
Referenced by CModelParameterSet::toData().
|
virtual |
Update the index of a contained object This method needs to be re-implemented in container which care about the order of contained objects
const | size_t & index |
const | CUndoObjectInterface * pUndoObject |
Reimplemented from CUndoObjectInterface.
Reimplemented in CModelParameterSet.
References min, and mModelParameters.
Referenced by CModelParameter::applyData().
|
virtual |
Update the corresponding model object with the current parameter settings
Reimplemented from CModelParameter.
Reimplemented in CModelParameterSet.
References begin(), and end().
Referenced by CModelParameterSet::updateModel().
|
private |
A vector of pointer to the contained parameters.
Referenced by add(), begin(), clear(), copy(), createUndoData(), end(), getChild(), insert(), remove(), size(), toData(), and updateIndex().
|
mutableprivate |
A map of model objects and their validated units
Referenced by compile(), and getObjectUnit().