COPASI API
4.40.278
|
#include <CRootContainer.h>
Public Member Functions | |
virtual | ~CRootContainer () |
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 CObjectInterface * | getObject (const CCommonName &cn) const override |
virtual objectMap & | getObjects () |
virtual const objectMap & | getObjects () const |
virtual const std::string | getUnits () const override |
virtual const CDataObject * | getValueObject () const override |
virtual CUndoObjectInterface * | insert (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 CDataObject * | getDataObject () const override |
virtual const std::string & | getKey () const |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const CValidity & | getValidity () 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 () |
Static Public Member Functions | |
static CDataModel * | addDatamodel () |
static void | destroy () |
static void | functionDefinitionChanged (const CFunction *pFunction) |
static CConfigurationFile * | getConfiguration () |
static CDataVector< CDataModel > * | getDatamodelList () |
static CFunctionDB * | getFunctionList () |
static CKeyFactory * | getKeyFactory () |
static const char * | getLicenseHTML () |
static const char * | getLicenseTxt () |
static const CDataContainer * | getRoot () |
static CFunction * | getUndefinedFunction () |
static const CUnitDefinition * | getUnitDefFromSymbol (const std::string symbol) |
static CUnitDefinitionDB * | getUnitList () |
static const CMIRIAMResource & | getUnknownMiriamResource () |
static void | init (int argc, char *argv[], const bool &withGui=false) |
static std::string | quoteUnitDefSymbol (const std::string &symbol) |
static bool | removeDatamodel (const CDataModel *pDatamodel) |
static bool | removeDatamodel (const unsigned C_INT32 index) |
static void | replaceSymbol (const std::string &oldSymbol, const std::string &newSymbol) |
Static Public Member Functions inherited from CDataContainer | |
static CDataContainer * | fromData (const CData &data, CUndoObjectInterface *pParent) |
Static Public Member Functions inherited from CDataObject | |
static CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName) |
Static Public Member Functions inherited from CUndoObjectInterface | |
template<class CType > | |
static CType * | fromData (const CData &, CUndoObjectInterface *) |
Protected Attributes | |
CKeyFactory | mKeyFactory |
CConfigurationFile * | mpConfiguration |
CDataVector< CDataModel > * | mpDataModelList |
CFunctionDB * | mpFunctionList |
CFunction * | mpUndefined |
CUnitDefinitionDB * | mpUnitDefinitionList |
CMIRIAMResource * | mpUnknownResource |
bool | mWithGUI |
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 |
Private Member Functions | |
CRootContainer (const bool &withGUI=false) | |
CRootContainer (const CRootContainer &src) | |
void | initializeChildren () |
CRootContainer & | operator= (const CRootContainer &src) |
Additional Inherited Members | |
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 |
Static Public Attributes inherited from CDataContainer | |
static const CObjectInterface::ContainerList | EmptyList |
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) | |
This is the new root container class. It will hold some attributes that are used by all datamodels, e.g.the global function database and the configuration, and it will hold a list of datamodels. Currently all methods to create new instances of CRootContainer are declared private. This ensures that there can be only one root container which is initialized by the init method. If this is necessary or not needs to be discussed.
|
private |
The default constructor should be private so that nobody can create new instances of the root container. The only way to create a root container is through the static init method. Maybe this restriction is not necessary. We have to discuss this later.
The default constructor should be private so that nobody can create new instances of the root container. The only way to create a root container is through the static init method.
Referenced by init().
|
private |
The copy constructor is private as well to make sure that there is only one root container that can be initialized through the init call.
const | CRootContainer & src |
|
virtual |
|
static |
Creates a new datamodel instance and adds it to the list. The new instance is returned by the method.
References CDataVector< CType >::add(), mpDataModelList, mWithGUI, and pRootContainer.
Referenced by CDataModel::addModel(), CDataModel::loadModelParameterSets(), Copasi2SBMLTranslator::translate(), Copasi2SBMLTranslator::translateFileToSBML(), and Copasi2SBMLTranslator::translateToSBML().
|
static |
|
static |
References CDataVector< CType >::begin(), CDataVector< CType >::end(), mpDataModelList, and pRootContainer.
Referenced by CFunction::setInfix().
|
static |
Returns the a pointer to the configuration.
References mpConfiguration, and pRootContainer.
Referenced by CMIRIAMInfo::addDefaultCreator(), SBMLImporter::checkValidityOfSourceDocument(), CMIRIAMResources::isCitation(), CJitCompiler::JitEnabled(), CInfo::update(), CProvenanceXMLWriter::updateCurrentSessionProvenance(), and CProvenanceXMLWriter::updateOrigionOfProvenance().
|
static |
Returns a pointer to the list of data models.
References mpDataModelList, and pRootContainer.
Referenced by CDataModel::addModel(), CDataModel::loadModelParameterSets(), CFunctionDB::purgeUnusedUserDefinedFunctions(), removeDatamodel(), and CFunctionDB::removeFunction().
|
static |
Returns a pointer to the global function database.
References mpFunctionList, and pRootContainer.
Referenced by CCopasiXML::buildFunctionList(), CEvaluationNodeCall::calls(), CSBMLExporter::checkForPiecewiseFunctions(), CSBMLExporter::collectIds(), CEvaluationNodeCall::compile(), CFunction::completeFunctionList(), CModel::convert2NonReversible(), SBMLImporter::createCFunctionFromFunctionDefinition(), SBMLImporter::createCModelFromSBMLDocument(), SBMLImporter::createCReactionFromReaction(), CSBMLExporter::createEvent(), CSBMLExporter::createFunctionDefinitions(), CReaction::createFunctionFromExpression(), CSBMLExporter::createInitialAssignment(), CSBMLExporter::createRule(), COptProblem::elevateChildren(), CSBMLExporter::exportEventAssignments(), CODEExporter::exportSingleFunction(), CODEExporterC::exportSingleFunction(), SBMLImporter::findCorrespondingFunction(), SBMLImporter::findFunctionCalls(), CODEExporter::findFunctionsCalls(), CEvaluationNodeCall::getCalledTree(), CReactionInterface::getListOfPossibleFunctions(), CEvaluationTree::getNodeObject(), SBMLImporter::isConstantFlux(), CModel::load(), CDataModel::loadModel(), CODEExporter::modifyTreeForMassAction(), CDataModel::removeSBMLIdFromFunctions(), SBMLImporter::removeUnusedFunctions(), SBMLImporter::restoreFunctionDB(), CODEExporterC::setExportNameOfFunction(), CReaction::setFunction(), CReactionInterface::setFunctionAndDoMapping(), CReaction::setFunctionFromExpressionTree(), CSBMLExporter::setFunctionSBMLIds(), CReactionInterface::setFunctionWithEmptyMapping(), and CEvaluationNodeCall::toAST().
|
static |
Returns a pointer to the KeyFactory.
References mKeyFactory, and pRootContainer.
Referenced by CModelAdd::addCompartmentsExpressions(), CModelAdd::addMetabolitesExpressions(), CModelAdd::addModelValuesExpressions(), CModel::applyActiveParameterSet(), CEvent::CEvent(), CEventAssignment::CEventAssignment(), CFunction::CFunction(), CLColorDefinition::CLColorDefinition(), COutputDefinitionVector::cleanup(), CReportDefinition::cleanup(), CReportDefinitionVector::cleanup(), CLEllipse::CLEllipse(), CLGlobalRenderInformation::CLGlobalRenderInformation(), CLGlobalStyle::CLGlobalStyle(), CLGradientStop::CLGradientStop(), CLGroup::CLGroup(), CLImage::CLImage(), CLLinearGradient::CLLinearGradient(), CLLineEnding::CLLineEnding(), CLLocalRenderInformation::CLLocalRenderInformation(), CLLocalStyle::CLLocalStyle(), CLPolygon::CLPolygon(), CLRadialGradient::CLRadialGradient(), CLRectangle::CLRectangle(), CLRenderCurve::CLRenderCurve(), CLText::CLText(), CModelEntity::CModelEntity(), CModelExpansion::SetOfModelElements::contains(), CModelAdd::copyDelayExpression(), CModelAdd::copyEventAssignmentExpression(), CModelAdd::copyExpression(), CModelAdd::copyInitialExpression(), CModelAdd::copyTriggerExpression(), CReaction::CReaction(), CUnitDefinition::CUnitDefinition(), CEvent::deleteAssignment(), CModelExpansion::ElementsMap::exists(), CODEExporterC::exportTitleData(), CFitItem::getCrossValidations(), CMetabNameInterface::getDisplayName(), CFitItem::getExperiments(), CLTextGlyph::getGraphicalObject(), CLMetabReferenceGlyph::getMetabGlyph(), CChemEqElement::getMetabolite(), CLGraphicalObject::getModelObject(), CTimeSeries::getSBMLId(), CLNAProblem::getSubTask(), CMCAProblem::getSubTask(), CLReferenceGlyph::getTargetGlyph(), CLGraphicalObject::hasValidModelReference(), CExperiment::initializeParameter(), CExperimentSet::keyToIndex(), CModelMerging::mergeInExpression(), SBMLDocumentLoader::postprocessTextGlyph(), CFitProblem::printResult(), COPASIHandler::processEnd(), CModel::removeCompartment(), CModel::removeEvent(), CFunctionDB::removeFunction(), CDataModel::removeLayout(), CModel::removeLocalReactionParameter(), CModel::removeMetabolite(), CModel::removeModelValue(), COutputDefinitionVector::removePlotSpec(), CModel::removeReaction(), CReportDefinitionVector::removeReportDefinition(), CSlider::setAssociatedEntityKey(), CChemEqElement::setMetabolite(), CUnitDefinition::setup(), CMMLOutput::writeDifferentialEquations(), CAnnotation::~CAnnotation(), CBiologicalDescription::~CBiologicalDescription(), CCompartment::~CCompartment(), CCopasiParameter::~CCopasiParameter(), CCopasiTask::~CCopasiTask(), CCreator::~CCreator(), CEvent::~CEvent(), CFunction::~CFunction(), CFunctionParameter::~CFunctionParameter(), CLayout::~CLayout(), CLColorDefinition::~CLColorDefinition(), CLEllipse::~CLEllipse(), CLGradientBase::~CLGradientBase(), CLGraphicalObject::~CLGraphicalObject(), CLGroup::~CLGroup(), CLImage::~CLImage(), CListOfLayouts::~CListOfLayouts(), CLPolygon::~CLPolygon(), CLRectangle::~CLRectangle(), CLRenderCurve::~CLRenderCurve(), CLRenderInformationBase::~CLRenderInformationBase(), CLStyle::~CLStyle(), CLText::~CLText(), CMetab::~CMetab(), CModel::~CModel(), CModelParameterSet::~CModelParameterSet(), CModification::~CModification(), CMoiety::~CMoiety(), CReaction::~CReaction(), CReference::~CReference(), CSlider::~CSlider(), and CUnitDefinition::~CUnitDefinition().
|
static |
References CopasiLicenseHtml.
|
static |
References CopasiLicenseTxt.
|
static |
Retrieve the root container
References pRootContainer.
Referenced by CEvaluationNodeCall::compile(), CModelExpansion::ElementsMap::getDuplicateFromCN(), CDataContainer::getObject(), CObjectInterface::GetObjectFromCN(), CUndoData::getParent(), CUnitDefinitionDB::replaceSymbol(), and CCopasiParameter::~CCopasiParameter().
|
static |
Retrieve the pointer for the function used for importing kinetics without a kinetic law
References mpUndefined, and pRootContainer.
Referenced by CReaction::compile(), CReaction::CReaction(), CSBMLExporter::createReaction(), CReactionInterface::getFunction(), KineticLawHandler::processStart(), CCopasiXML::saveModel(), CReaction::setFunction(), CReactionInterface::setFunctionAndDoMapping(), and CReactionInterface::setFunctionWithEmptyMapping().
|
static |
Retrieve the unit for the given symbol
References CDataVector< CType >::begin(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), CUnitDefinitionDB::getUnitDefFromSymbol(), getUnitList(), mpUnitDefinitionList, and pRootContainer.
|
static |
Returns a pointer to the list of units.
References mpUnitDefinitionList, and pRootContainer.
Referenced by CUnit::buildExpression(), SBMLUnitSupport::createUnitExpressionFor(), getUnitDefFromSymbol(), CCopasiXML::mergeUnitDefinitions(), and CCopasiXML::saveUnitDefinitionList().
|
static |
References mpUnknownResource, and pRootContainer.
Referenced by CMIRIAMResources::getMIRIAMResource().
|
static |
This method creates the only root container.
References CRootContainer(), COptions::init(), initializeChildren(), pRootContainer, and CCopasiMessage::setIsGUI().
Referenced by Copasi2SBMLTranslator::translate(), Copasi2SBMLTranslator::translateFileToSBML(), and Copasi2SBMLTranslator::translateToSBML().
|
private |
This method needs to be called after a new root container is constructed. Since many of the children of the root container need to access the key factory through the global Root instance, the global root instance need to be created before the children can be initialized. Calling this Method initializes the children. This method must be protected since it can only be called once by the global init method.
References CEvaluationTree::compile(), CConfigurationFile::load(), CFunctionDB::load(), mpConfiguration, mpDataModelList, mpFunctionList, mpUndefined, mpUnitDefinitionList, mpUnknownResource, CFunction::setInfix(), CMIRIAMResource::setMIRIAMDisplayName(), CMIRIAMResource::setMIRIAMURI(), and CUnitDefinition::updateSIUnitDefinitions().
Referenced by init().
|
private |
The assignment operator is private as well to make sure that there is only one root container that can be initialized through the init call.
const | CRootContainer & src |
|
static |
Quote the given symbol if needed
const | std::string & symbol |
References mpUnitDefinitionList, pRootContainer, and CUnitDefinitionDB::quoteSymbol().
Referenced by CUnit::buildExpression().
|
static |
References mpDataModelList, pdelete, pRootContainer, and CDataVector< CType >::remove().
Referenced by CDataModel::addModel(), CDataModel::loadModelParameterSets(), and removeDatamodel().
|
static |
References getDatamodelList(), and removeDatamodel().
|
static |
Replace all old symbols with new symbols in the unit definition DB and in all models
const | std::string & oldSymbol |
const | std::string & newSymbol |
References CDataVector< CType >::begin(), CDataVector< CType >::end(), mpDataModelList, and pRootContainer.
Referenced by CUnitDefinitionDB::replaceSymbol().
|
protected |
Referenced by getKeyFactory().
|
protected |
Referenced by getConfiguration(), initializeChildren(), and ~CRootContainer().
|
protected |
|
protected |
Referenced by getFunctionList(), initializeChildren(), and ~CRootContainer().
|
protected |
Referenced by getUndefinedFunction(), initializeChildren(), and ~CRootContainer().
|
protected |
Referenced by getUnitDefFromSymbol(), getUnitList(), initializeChildren(), quoteUnitDefSymbol(), and ~CRootContainer().
|
protected |
Referenced by getUnknownMiriamResource(), initializeChildren(), and ~CRootContainer().
|
protected |
Referenced by addDatamodel(), and ~CRootContainer().