COPASI API  4.40.278
CModelParameterSpecies Class Reference

#include <CModelParameter.h>

Inheritance diagram for CModelParameterSpecies:
[legend]

Public Member Functions

 CModelParameterSpecies (CModelParameterGroup *pParent, const CModelParameter::Type &type=CModelParameter::Type::Species)
 
 CModelParameterSpecies (const CModelParameterSpecies &src, CModelParameterGroup *pParent)
 
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 std::string getName () const
 
virtual const C_FLOAT64getValue (const CCore::Framework &framework) const
 
virtual void setCN (const CCommonName &cn)
 
virtual void setValue (const C_FLOAT64 &value, const CCore::Framework &framework, bool updateModelIfActive=true)
 
virtual CData toData () const
 
virtual bool updateModel ()
 
virtual ~CModelParameterSpecies ()
 
- Public Member Functions inherited from CModelParameter
virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes)
 
 CModelParameter (CModelParameterGroup *pParent, const CModelParameter::Type &type)
 
 CModelParameter (const CModelParameter &src, CModelParameterGroup *pParent)
 
virtual void destruct ()
 
virtual const CompareResultdiff (const CModelParameter &other, const CCore::Framework &framework=CCore::Framework::ParticleNumbers, const bool &createMissing=false)
 
virtual const CModelParametergetChild (const size_t &index) const
 
const CCommonNamegetCN () const
 
const CompareResultgetCompareResult () const
 
virtual size_t getIndex () const
 
std::string getInitialExpression () const
 
const CExpressiongetInitialExpressionPtr () const
 
CModelgetModel () const
 
virtual size_t getNumChildren () const
 
CDataObjectgetObject () const
 
CModelParameterGroupgetParent () const
 
CModelParameterSetgetSet () const
 
const CModelEntity::StatusgetSimulationType () const
 
const TypegetType () const
 
CValidatedUnit getUnit (const CCore::Framework &framework) const
 
bool isInitialExpressionValid () const
 
bool isReadOnly () const
 
bool operator< (const CModelParameter &rhs) const
 
virtual bool refreshFromModel (const bool &modifyExistence)
 
void setCompareResult (const CompareResult &compareResult)
 
void setInitialExpression (const std::string &initialExpression)
 
void setParent (CModelParameterGroup *pParent)
 
bool setSimulationType (const CModelEntity::Status &simulationType)
 
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
 
virtual CUndoObjectInterfaceinsert (const CData &data)
 
bool setUuid (const std::string &uuid)
 
bool setUuid (const xg::Guid &uuid)
 
virtual void updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject)
 
virtual ~CUndoObjectInterface ()
 

Private Member Functions

friend CModelParameterCompartment::~CModelParameterCompartment ()
 
CCommonName getCompartmentCN () const
 

Private Attributes

CRegisteredCommonName mCompartmentCN
 
C_FLOAT64 mConcentration
 
CModelParameterCompartmentmpCompartment
 

Additional Inherited Members

- 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
}
 
- 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
 

Constructor & Destructor Documentation

◆ CModelParameterCompartment::~CModelParameterCompartment()

CModelParameterSpecies::CModelParameterCompartment::~CModelParameterCompartment ( )
private

◆ CModelParameterSpecies() [1/2]

CModelParameterSpecies::CModelParameterSpecies ( CModelParameterGroup pParent,
const CModelParameter::Type type = CModelParameter::Type::Species 
)

Constructor

◆ CModelParameterSpecies() [2/2]

CModelParameterSpecies::CModelParameterSpecies ( const CModelParameterSpecies src,
CModelParameterGroup pParent 
)

Copy constructor

◆ ~CModelParameterSpecies()

CModelParameterSpecies::~CModelParameterSpecies ( )
virtual

Member Function Documentation

◆ compile()

◆ createUndoData()

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

Create the undo data which represents the changes recording the differences between the provided oldData and the current data.

Parameters
CUndoData& undoData
constCUndoData::Type & type
constCData & oldData (default: empty data)
constCCore::Framework & framework (default: CCore::Framework::ParticleNumbers)
Returns
CUndoData undoData

Reimplemented from CModelParameter.

References CUndoData::addProperty(), CData::addProperty(), CUndoData::CHANGE, CCore::Concentration, CModelParameter::createUndoData(), CData::FRAMEWORK, CCore::FrameworkNames, CData::getProperty(), CData::INITIAL_INTENSIVE_VALUE, CData::INITIAL_VALUE, mConcentration, CModelParameter::mValue, CData::PARAMETER_VALUE, and CDataValue::toData().

◆ getCompartmentCN()

CCommonName CModelParameterSpecies::getCompartmentCN ( ) const
private

Retrieve the CN of the compartment the species is contained in.

Returns
CCommonName compartmentCN

References mCompartmentCN.

◆ getName()

std::string CModelParameterSpecies::getName ( ) const
virtual

◆ getValue()

const C_FLOAT64 & CModelParameterSpecies::getValue ( const CCore::Framework framework) const
virtual

Retrieve the value of the parameter based on the current framework

Parameters
constFramework & framework
Returns
const double & value

Reimplemented from CModelParameter.

References CCore::Concentration, mConcentration, and CModelParameter::mValue.

◆ setCN()

void CModelParameterSpecies::setCN ( const CCommonName cn)
virtual

Set the CN of the object represented by the parameter

Parameters
constCCommonName & cn

Reimplemented from CModelParameter.

References CModelParameter::mCN, mCompartmentCN, and CModelParameter::setCN().

◆ setValue()

void CModelParameterSpecies::setValue ( const C_FLOAT64 value,
const CCore::Framework framework,
bool  updateModelIfActive = true 
)
virtual

Set the value of the parameter based on the current framework

Parameters
constdouble & value
constFramework & framework
updateModelIfActiveif this is the active parameter set, write the changes back to the model

Reimplemented from CModelParameter.

References CModelParameterCompartment::addSpecies(), CCore::Concentration, CModelParameter::getModel(), CModelParameterGroup::getModelParameter(), CModel::getNumber2QuantityFactor(), CModel::getQuantity2NumberFactor(), CModelParameter::getSet(), CModelParameter::getValue(), CModelParameterSet::isActive(), mCompartmentCN, mConcentration, mpCompartment, CModelParameter::mValue, CCore::ParticleNumbers, CModelParameterSet::toGroup(), and updateModel().

Referenced by compile().

◆ toData()

CData CModelParameterSpecies::toData ( ) const
virtual

◆ updateModel()

bool CModelParameterSpecies::updateModel ( )
virtual

Update the corresponding model object with the current parameter settings

Reimplemented from CModelParameter.

References CModelEntity::ASSIGNMENT, CModelEntity::getStatus(), mConcentration, CModelParameter::mpObject, CMetab::setInitialConcentration(), and CModelParameter::updateModel().

Referenced by setValue().

Member Data Documentation

◆ mCompartmentCN

CRegisteredCommonName CModelParameterSpecies::mCompartmentCN
private

The CN of the compartment the species is contained in.

Referenced by compile(), getCompartmentCN(), getName(), setCN(), and setValue().

◆ mConcentration

C_FLOAT64 CModelParameterSpecies::mConcentration
private

The concentration value of the species.

Referenced by createUndoData(), getValue(), setValue(), toData(), and updateModel().

◆ mpCompartment

CModelParameterCompartment* CModelParameterSpecies::mpCompartment
private

A pointer to the parameter representing the compartment the species is contained in.

Referenced by compile(), setValue(), and ~CModelParameterSpecies().


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