COPASI API
4.16.103
|
#include <CModelParameterSet.h>
Public Member Functions | |
void | assignSetContent (const CModelParameterSet &src, const bool &createMissing) |
CModelParameterSet (const std::string &name, const CCopasiContainer *pParent=NULL) | |
CModelParameterSet (const CModelParameterSet &src, const CCopasiContainer *pParent, const bool &createMissing=false) | |
bool | compareWithModel (const CModelParameter::Framework &framework) |
void | createFromModel () |
virtual const std::string & | getKey () const |
CModel * | getModel () const |
virtual std::string | getName () const |
bool | isActive () const |
bool | saveToStream (std::ostream &os, const CModelParameter::Framework &framework, const std::string &mode, const std::string &separator) |
void | setModel (const CModel *pModel) |
virtual bool | setObjectParent (const CCopasiContainer *pParent) |
virtual bool | updateModel () |
virtual | ~CModelParameterSet () |
![]() | |
virtual bool | add (CCopasiObject *pObject, const bool &adopt=true) |
CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container) | |
CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL) | |
virtual std::string | getChildObjectUnits (const CCopasiObject *pObject) const |
virtual const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
virtual const objectMap & | getObjects () const |
virtual std::string | getUnits () const |
virtual const CCopasiObject * | getValueObject () const |
virtual bool | remove (CCopasiObject *pObject) |
virtual | ~CCopasiContainer () |
![]() | |
void | addDirectDependency (const CCopasiObject *pObject) |
CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL) | |
void | clearDirectDependencies () |
void | clearRefresh () |
bool | dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const |
void | getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const |
virtual CCopasiObjectName | getCN () const |
virtual const DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
UpdateMethod * | getUpdateMethod () const |
virtual void * | getValuePointer () const |
bool | hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const |
bool | hasUpdateMethod () const |
bool | isArray () const |
bool | isContainer () const |
bool | isDataModel () const |
bool | isMatrix () const |
bool | isNameVector () const |
bool | isNonUniqueName () const |
virtual bool | isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const |
bool | isReference () const |
bool | isRoot () const |
bool | isSeparator () const |
bool | isStaticString () const |
bool | isValueBool () const |
bool | isValueDbl () const |
bool | isValueInt () const |
bool | isValueInt64 () const |
bool | isValueString () const |
bool | isVector () const |
virtual bool | mustBeDeleted (const DataObjectSet &deletedObjects) const |
virtual void | print (std::ostream *ostream) const |
void | removeDirectDependency (const CCopasiObject *pObject) |
void | setDirectDependencies (const DataObjectSet &directDependencies) |
bool | setObjectName (const std::string &name) |
void | setObjectValue (const C_FLOAT64 &value) |
void | setObjectValue (const C_INT32 &value) |
void | setObjectValue (const bool &value) |
template<class CType > | |
void | setRefresh (CType *pType, void(CType::*method)(void)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &)) |
template<class CType > | |
void | setUpdateMethod (CType *pType, void(CType::*method)(const bool &)) |
virtual | ~CCopasiObject () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
![]() | |
CModelParameter * | add (const CModelParameter::Type &type) |
void | add (CModelParameter *pModelParameter) |
iterator | begin () |
const_iterator | begin () const |
void | clear () |
CModelParameterGroup (CModelParameterGroup *pParent, const CModelParameter::Type &type=CModelParameter::Group) | |
CModelParameterGroup (const CModelParameterGroup &src, CModelParameterGroup *pParent, const bool &createMissing) | |
virtual void | compile () |
virtual const CompareResult & | diff (const CModelParameter &other, const CModelParameter::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 |
virtual bool | refreshFromModel (const bool &modifyExistence) |
void | remove (CModelParameter *pModelParameter) |
void | remove (const size_t &index) |
size_t | size () const |
virtual | ~CModelParameterGroup () |
![]() | |
CModelParameter (CModelParameterGroup *pParent, const CModelParameter::Type &type) | |
CModelParameter (const CModelParameter &src, CModelParameterGroup *pParent) | |
const CCopasiObjectName & | getCN () const |
const CompareResult & | getCompareResult () const |
size_t | getIndex () const |
std::string | getInitialExpression () const |
const CExpression * | getInitialExpressionPtr () const |
CModel * | getModel () const |
CCopasiObject * | getObject () const |
CModelParameterGroup * | getParent () const |
CModelParameterSet * | getSet () const |
const CModelEntity::Status & | getSimulationType () const |
const Type & | getType () const |
const std::string | getUnit (const Framework &framework) const |
virtual const double & | getValue (const Framework &framework) const |
bool | isInitialExpressionValid () const |
bool | isReadOnly () const |
virtual void | setCN (const CCopasiObjectName &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 double &value, const Framework &framework) |
virtual | ~CModelParameter () |
![]() | |
bool | addUnsupportedAnnotation (const std::string &name, const std::string &xml) |
CAnnotation () | |
CAnnotation (const CAnnotation &src) | |
const std::string & | getMiriamAnnotation () const |
const std::string & | getNotes () const |
UnsupportedAnnotation & | getUnsupportedAnnotations () |
const UnsupportedAnnotation & | getUnsupportedAnnotations () const |
bool | operator== (const CAnnotation &rhs) const |
bool | removeUnsupportedAnnotation (const std::string &name) |
bool | replaceUnsupportedAnnotation (const std::string &name, const std::string &xml) |
void | setMiriamAnnotation (const std::string &miriamAnnotation, const std::string &newId, const std::string &oldId) |
void | setNotes (const std::string ¬es) |
virtual | ~CAnnotation () |
Private Attributes | |
std::string | mKey |
CModel * | mpModel |
Additional Inherited Members | |
![]() | |
typedef std::multimap < std::string, CCopasiObject * > | objectMap |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
![]() | |
typedef std::vector < CModelParameter * > ::const_iterator | const_iterator |
typedef std::vector < CModelParameter * > ::iterator | iterator |
![]() | |
enum | CompareResult { Obsolete, Missing, Modified, Conflict, Identical } |
enum | Framework { Concentration = 0, ParticleNumbers } |
enum | Type { Model, Compartment, Species, ModelValue, ReactionParameter, Reaction, Group, Set, unknown } |
![]() | |
typedef std::map< std::string, std::string > | UnsupportedAnnotation |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
static CAnnotation * | castObject (CCopasiObject *pObject) |
static const CAnnotation * | castObject (const CCopasiObject *pObject) |
![]() | |
static const std::vector < CCopasiContainer * > | EmptyList |
![]() | |
static const char * | TypeNames [] |
![]() | |
enum | Flag { Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8, Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80, ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800, Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000, Root = 0x10000, Gui = 0x20000 } |
![]() | |
template<class CType > | |
CCopasiObject * | addMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
template<class CType > | |
CCopasiObject * | addVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0) |
void | initObjects () |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
void | assignGroupContent (const CModelParameterGroup &src, const bool &createMissing) |
CModelParameter * | copy (const CModelParameter &src, const bool &createMissing) |
![]() | |
static std::string | nameFromCN (const CCopasiObjectName &cn) |
![]() | |
objectMap | mObjects |
![]() | |
CRegisteredObjectName | mCN |
CompareResult | mCompareResult |
bool | mIsInitialExpressionValid |
CExpression * | mpInitialExpression |
CCopasiObject * | mpObject |
CModelParameterGroup * | mpParent |
CModelEntity::Status | mSimulationType |
Type | mType |
double | mValue |
![]() | |
std::string | mKey |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Definition at line 17 of file CModelParameterSet.h.
CModelParameterSet::CModelParameterSet | ( | const std::string & | name, |
const CCopasiContainer * | pParent = NULL |
||
) |
Constructor
const | std::string & name |
const | CCopasiContainer * pParent (default: NULL) |
Definition at line 15 of file CModelParameterSet.cpp.
References setObjectParent().
CModelParameterSet::CModelParameterSet | ( | const CModelParameterSet & | src, |
const CCopasiContainer * | pParent, | ||
const bool & | createMissing = false |
||
) |
Copy constructor
const | CModelParameterSet & src |
const | CCopasiContainer * pParent |
const | bool & createMissing (default: false) |
Definition at line 26 of file CModelParameterSet.cpp.
References CModelParameterGroup::compile(), getModel(), mpModel, and setObjectParent().
|
virtual |
Destructor
Definition at line 46 of file CModelParameterSet.cpp.
References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().
void CModelParameterSet::assignSetContent | ( | const CModelParameterSet & | src, |
const bool & | createMissing | ||
) |
Assign the content of the source set to this, i.e., copy all contained parameters and groups.
const | CModelParameterSet & src |
const | bool & createMissing |
Definition at line 231 of file CModelParameterSet.cpp.
References CModelParameterGroup::assignGroupContent(), and CModelParameterGroup::compile().
Referenced by CCopasiXMLParser::ListOfModelParameterSetsElement::end(), CQParameterOverviewWidget::leave(), CQParameterOverviewWidget::slotBtnNew(), and CQParameterOverviewWidget::slotBtnSaveAs().
bool CModelParameterSet::compareWithModel | ( | const CModelParameter::Framework & | framework | ) |
Compare the parameter set with the assigned model
Definition at line 185 of file CModelParameterSet.cpp.
References createFromModel(), CModelParameterGroup::diff(), CModelParameter::Identical, and mpModel.
Referenced by CQParameterOverviewWidget::enterProtected(), CQParameterOverviewWidget::setFramework(), and CQParameterOverviewWidget::slotResolve().
void CModelParameterSet::createFromModel | ( | ) |
Create the parameter set from the assigned model
Definition at line 75 of file CModelParameterSet.cpp.
References CModelParameterGroup::add(), CModelEntity::ASSIGNMENT, CCopasiVector< T >::begin(), CModelParameterGroup::clear(), CModelParameter::Compartment, CModelParameterGroup::compile(), CCopasiVector< T >::end(), fatalError, CModelEntity::FIXED, CKeyFactory::get(), CModelParameter::getCN(), CCopasiObject::getCN(), CModel::getCompartments(), CModel::getInitialTime(), CModelEntity::getInitialValue(), CModelEntity::getInitialValueReference(), CCopasiRootContainer::getKeyFactory(), CModel::getMetabolites(), CModel::getModelValues(), CModel::getReactions(), CModelParameter::Group, CModelParameter::Model, CModelParameter::ModelValue, mpModel, CModelParameter::ParticleNumbers, CModelParameter::Reaction, CModelParameter::ReactionParameter, CModelParameter::setCN(), CModelParameter::setInitialExpression(), CModelParameter::setSimulationType(), CModelParameter::setValue(), and CModelParameter::Species.
Referenced by CModel::applyActiveParameterSet(), compareWithModel(), CModel::compile(), and createParameterSetsForExperiment().
|
virtual |
Retrieve the unique key of the set.
Reimplemented from CAnnotation.
Definition at line 52 of file CModelParameterSet.cpp.
References mKey.
Referenced by CModel::applyActiveParameterSet(), CCopasiXMLParser::ModelParameterSetElement::end(), isActive(), CQBrowserPaneDM::load(), CCopasiXML::saveModel(), CQParameterOverviewWidget::slotBtnCopy(), CQParameterOverviewWidget::slotBtnNew(), and CQParameterOverviewWidget::slotBtnSaveAs().
CModel * CModelParameterSet::getModel | ( | ) | const |
Retrieve the model the parameter set is storing values for
Definition at line 68 of file CModelParameterSet.cpp.
References mpModel.
Referenced by CModelParameterSet(), CModelParameter::getModel(), CModelParameterSpecies::getName(), CQParameterOverviewWidget::slotBtnCopy(), CQParameterOverviewWidget::slotBtnDelete(), CQParameterOverviewWidget::slotBtnNew(), and CQParameterOverviewWidget::slotBtnSaveAs().
|
virtual |
Retrieve the name of the parameter set
Reimplemented from CModelParameter.
Definition at line 199 of file CModelParameterSet.cpp.
References CCopasiObject::getObjectName().
bool CModelParameterSet::isActive | ( | ) | const |
Determine whether this is parameter set is currently active, i.e., it is synchronized with the model.
Definition at line 221 of file CModelParameterSet.cpp.
References getKey(), CModel::getModelParameterSet(), mKey, and mpModel.
Referenced by CQParameterOverviewWidget::enterProtected(), CQParameterOverviewWidget::leave(), CQParameterOverviewWidget::setFramework(), and CModelParameter::setValue().
bool CModelParameterSet::saveToStream | ( | std::ostream & | os, |
const CModelParameter::Framework & | framework, | ||
const std::string & | mode, | ||
const std::string & | separator | ||
) |
Save the parameter set to a stream
std::ostream | & os |
const | CModelParameter::Framework & framework |
const | std::string & mode (report or table) |
const | std::string & separator |
Definition at line 238 of file CModelParameterSet.cpp.
References CNodeIteratorMode::After, CNodeIteratorMode::Before, CNodeContextIterator< Node, int >::end(), CModelParameter::getName(), CModelParameter::getType(), CModelParameter::getUnit(), CModelParameter::getValue(), CModelParameter::Group, CNodeContextIterator< Node, int >::level(), CNodeContextIterator< Node, int >::next(), CModelParameter::Set, and CNodeContextIterator< Node, int >::setProcessingModes().
Referenced by CQParameterOverviewWidget::slotBtnSaveToFile().
Set the model the parameter set is storing values for
const | CModel * pModel |
|
virtual |
Set the object parent
const | CCopasiContainer * pParent |
Reimplemented from CCopasiObject.
Definition at line 58 of file CModelParameterSet.cpp.
References CCopasiObject::getObjectAncestor(), mpModel, and CCopasiObject::setObjectParent().
Referenced by CModelParameterSet().
|
virtual |
Update the corresponding model object with the current parameter settings
Reimplemented from CModelParameterGroup.
Definition at line 205 of file CModelParameterSet.cpp.
References CModelParameterGroup::compile(), mpModel, CModel::updateInitialValues(), and CModelParameterGroup::updateModel().
Referenced by CModel::applyActiveParameterSet(), CCopasiDataModel::commonAfterLoad(), CQParameterOverviewWidget::leave(), and CQParameterOverviewWidget::slotBtnNew().
|
private |
The unique key of the set
Definition at line 121 of file CModelParameterSet.h.
Referenced by getKey(), isActive(), and ~CModelParameterSet().
|
private |
A pointer to the model the parameter set is storing values for
Definition at line 126 of file CModelParameterSet.h.
Referenced by CModelParameterSet(), compareWithModel(), createFromModel(), getModel(), isActive(), setObjectParent(), and updateModel().