COPASI API  4.40.278
CModelParameterGroup Class Reference

#include <CModelParameterGroup.h>

Inheritance diagram for CModelParameterGroup:
[legend]

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)
 
CModelParameteradd (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 CompareResultdiff (const CModelParameter &other, const CCore::Framework &framework, const bool &createMissing=false)
 
iterator end ()
 
const_iterator end () const
 
virtual const CModelParametergetChild (const size_t &index) const
 
CModelParametergetModelParameter (const std::string &cn) const
 
CModelParametergetModelParameter (const std::string &name, const CModelParameter::Type &type) const
 
virtual size_t getNumChildren () const
 
const CValidatedUnitgetObjectUnit (const CModelParameter *pModelParameter) const
 
virtual CUndoObjectInterfaceinsert (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 CCommonNamegetCN () const
 
const CompareResultgetCompareResult () const
 
virtual size_t getIndex () const
 
std::string getInitialExpression () const
 
const CExpressiongetInitialExpressionPtr () const
 
CModelgetModel () const
 
virtual std::string getName () const
 
CDataObjectgetObject () const
 
CModelParameterGroupgetParent () const
 
CModelParameterSetgetSet () const
 
const CModelEntity::StatusgetSimulationType () const
 
const TypegetType () 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 CModelParameterSettoSet ()
 
virtual const CModelParameterSettoSet () 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

CModelParametercopy (const CModelParameter &src, const bool &createMissing)
 

Private Attributes

std::vector< CModelParameter * > mModelParameters
 
std::map< CObjectInterface *, CValidatedUnitmValidatedUnits
 

Additional Inherited Members

- Static Public Member Functions inherited from CModelParameter
static CModelParameterfromData (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, CompareResultCompareResultNames
 
static const CEnumAnnotation< std::string, TypeTypeNames
 
- Protected Attributes inherited from CModelParameter
CRegisteredCommonName mCN
 
CompareResult mCompareResult
 
bool mIsInitialExpressionValid
 
CExpressionmpInitialExpression
 
CDataObjectmpObject
 
CModelParameterGroupmpParent
 
CModelEntity::Status mSimulationType
 
Type mType
 
double mValue
 

Member Typedef Documentation

◆ const_iterator

◆ iterator

Constructor & Destructor Documentation

◆ CModelParameterGroup() [1/2]

CModelParameterGroup::CModelParameterGroup ( CModelParameterGroup pParent,
const CModelParameter::Type type = CModelParameter::Type::Group 
)

Constructor

Parameters
CModelParameterGroup* pParent
constCModelParameter::Type & type (default: CModelParameter::Group)

Referenced by add(), and copy().

◆ CModelParameterGroup() [2/2]

CModelParameterGroup::CModelParameterGroup ( const CModelParameterGroup src,
CModelParameterGroup pParent,
const bool &  createMissing 
)

Copy constructor

Parameters
constCModelParameterGroup & src
CModelParameterGroup* pParent
constbool & createMissing

References assignGroupContent().

◆ ~CModelParameterGroup()

CModelParameterGroup::~CModelParameterGroup ( )
virtual

Destructor

References clear().

Member Function Documentation

◆ add() [1/2]

void CModelParameterGroup::add ( CModelParameter pModelParameter)
virtual

Add the given parameter to the group. Note, the parent of the parameter is not updated

Parameters
CModelParameter* pModelParameter

Reimplemented in CModelParameterSet.

References mModelParameters, and CModelParameter::setParent().

◆ add() [2/2]

◆ applyData()

bool CModelParameterGroup::applyData ( const CData data,
CUndoData::CChangeSet changes 
)
virtual

◆ assignGroupContent()

void CModelParameterGroup::assignGroupContent ( const CModelParameterGroup src,
const bool &  createMissing 
)

Assign the content of the source group to this, i.e., copy all contained parameters.

Parameters
constCModelParameterGroup & src
constbool & createMissing

References begin(), clear(), copy(), end(), and CModelParameter::Missing.

Referenced by CModelParameterSet::assignSetContent(), and CModelParameterGroup().

◆ begin() [1/2]

CModelParameterGroup::iterator CModelParameterGroup::begin ( )

Retrieve the iterator pointing to the first contained parameter.

Returns
iterator begin

References mModelParameters.

Referenced by assignGroupContent(), CModelParameterSet::begin(), clear(), compile(), diff(), CModelParameter::getIndex(), getModelParameter(), refreshFromModel(), remove(), and updateModel().

◆ begin() [2/2]

CModelParameterGroup::const_iterator CModelParameterGroup::begin ( ) const

Retrieve the const_iterator pointing to the first contained parameter.

Returns
const_iterator begin

References mModelParameters.

◆ clear()

void CModelParameterGroup::clear ( )

◆ compile()

void CModelParameterGroup::compile ( )
virtual

◆ copy()

CModelParameter * CModelParameterGroup::copy ( const CModelParameter src,
const bool &  createMissing 
)
protected

Copy the existing parameter and add it to the group

Parameters
constCModelParameter & src
constbool & createMissing
Returns
CModelParameter * pCopy

Copy the existing parameter and add it to the group

Parameters
constCModelParameter & src
Returns
CModelParameter * pCopy

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

◆ createUndoData()

void CModelParameterGroup::createUndoData ( CUndoData undoData,
const CUndoData::Type type,
const CData oldData = CData(),
const CCore::Framework framework = CCore::Framework::ParticleNumbers 
) const
virtual

◆ diff()

const CModelParameter::CompareResult & CModelParameterGroup::diff ( const CModelParameter other,
const CCore::Framework framework,
const bool &  createMissing = false 
)
virtual

◆ end() [1/2]

CModelParameterGroup::iterator CModelParameterGroup::end ( )

Retrieve the iterator pointing past the last contained parameter.

Returns
iterator end

References mModelParameters.

Referenced by applyData(), assignGroupContent(), clear(), compile(), diff(), CModelParameterSet::end(), CModelParameter::getIndex(), getModelParameter(), refreshFromModel(), remove(), and updateModel().

◆ end() [2/2]

CModelParameterGroup::const_iterator CModelParameterGroup::end ( ) const

Retrieve the const_iterator pointing past the last contained parameter.

Returns
const_iterator end

References mModelParameters.

◆ getChild()

const CModelParameter * CModelParameterGroup::getChild ( const size_t &  index) const
virtual

Reimplemented from CModelParameter.

References mModelParameters, and size().

◆ getModelParameter() [1/2]

CModelParameter * CModelParameterGroup::getModelParameter ( const std::string &  cn) const

◆ getModelParameter() [2/2]

CModelParameter * CModelParameterGroup::getModelParameter ( const std::string &  name,
const CModelParameter::Type type 
) const

Retrieve a pointer to the parameter with the given name and type

Parameters
conststd::string & name
constCModelParameter::Type & type
Returns
CModelParameter * pModelParameter

References begin(), end(), and getModelParameter().

◆ getNumChildren()

size_t CModelParameterGroup::getNumChildren ( ) const
virtual

Reimplemented from CModelParameter.

References size().

◆ getObjectUnit()

◆ insert()

CUndoObjectInterface * CModelParameterGroup::insert ( const CData data)
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

Parameters
constCData & data
Returns
CUndoObjectInterface * pUndoObject

Reimplemented from CUndoObjectInterface.

Reimplemented in CModelParameterSet.

References CModelParameter::fromData(), CData::getProperty(), min, mModelParameters, CData::OBJECT_INDEX, CModelParameter::setParent(), and CDataValue::toSizeT().

Referenced by applyData().

◆ refreshFromModel()

bool CModelParameterGroup::refreshFromModel ( const bool &  modifyExistence)
virtual

Refresh the parameter from the corresponding model object

Parameters
constbool & modifyExistence

Reimplemented from CModelParameter.

Reimplemented in CModelParameterSet.

References begin(), end(), CModelParameter::Identical, CModelParameter::mCompareResult, CModelParameter::Missing, and CModelParameter::Obsolete.

Referenced by CModelParameterSet::refreshFromModel().

◆ remove() [1/2]

void CModelParameterGroup::remove ( CModelParameter pModelParameter)

Remove the given parameter from the group. Note, the parameter is not deleted.

Parameters
CModelParameter* pModelParameter

References begin(), end(), and mModelParameters.

Referenced by CModelParameter::~CModelParameter().

◆ remove() [2/2]

void CModelParameterGroup::remove ( const size_t &  index)

Remove the indexed parameter from the group and delete it

Parameters
constsize_t & index

References mModelParameters, and pdelete.

◆ size()

size_t CModelParameterGroup::size ( ) const

Retrieve the size of the group

Returns
size_t size

References mModelParameters.

Referenced by getChild(), and getNumChildren().

◆ toData()

CData CModelParameterGroup::toData ( ) const
virtual

Retrieve the data describing the object

Returns
CData data

Reimplemented from CModelParameter.

Reimplemented in CModelParameterSet.

References CData::addProperty(), mModelParameters, CData::PARAMETER_VALUE, and CModelParameter::toData().

Referenced by CModelParameterSet::toData().

◆ updateIndex()

void CModelParameterGroup::updateIndex ( const size_t &  index,
const CUndoObjectInterface pUndoObject 
)
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

Parameters
constsize_t & index
constCUndoObjectInterface * pUndoObject

Reimplemented from CUndoObjectInterface.

Reimplemented in CModelParameterSet.

References min, and mModelParameters.

Referenced by CModelParameter::applyData().

◆ updateModel()

bool CModelParameterGroup::updateModel ( )
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().

Member Data Documentation

◆ mModelParameters

std::vector< CModelParameter * > CModelParameterGroup::mModelParameters
private

A vector of pointer to the contained parameters.

Referenced by add(), begin(), clear(), copy(), createUndoData(), end(), getChild(), insert(), remove(), size(), toData(), and updateIndex().

◆ mValidatedUnits

std::map< CObjectInterface *, CValidatedUnit > CModelParameterGroup::mValidatedUnits
mutableprivate

A map of model objects and their validated units

Referenced by compile(), and getObjectUnit().


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