COPASI API  4.40.278
CDataModel Class Reference

#include <CDataModel.h>

Inheritance diagram for CDataModel:
[legend]

Classes

class  CContent
 

Public Types

enum class  ContentType {
  COPASI , GEPASI , SBML , SEDML ,
  OMEX , __SIZE
}
 
- 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
 
- Public Types inherited from COutputInterface
enum  Activity { BEFORE = 0x01 , DURING = 0x02 , AFTER = 0x04 , MONITORING = 0x08 }
 

Public Member Functions

void addCopasiFileToArchive (LIBCOMBINE_CPP_NAMESPACE_QUALIFIER CombineArchive *archive, const std::string &targetName="./copasi/model.cps", CProcessReport *pProcessReport=NULL)
 
bool addDefaultReports ()
 
bool addDefaultTasks ()
 
bool addModel (const std::string &fileName, CProcessReport *pProcessReport=NULL)
 
CReportDefinitionaddReport (const CTaskEnum::Task &taskType)
 
CCopasiTaskaddTask (const CTaskEnum::Task &taskType)
 
bool appendDependentTasks (ObjectSet candidates, DataObjectSet &dependentTasks) const
 
virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes)
 
CUndoData::CChangeSet applyData (const CUndoData &data)
 
bool autoSave ()
 
 CDataModel (const bool withGUI=false)
 
 CDataModel (const CDataModel &src, const CDataContainer *pParent)
 
 CDataModel (const std::string &name, const CDataContainer *pParent=NO_PARENT, const std::string &type="CN", bool withGUI=false)
 
void changed (const bool &changed=true)
 
void copyExperimentalDataTo (const std::string &path)
 
void deleteOldData ()
 
bool exportCombineArchive (std::string fileName, bool includeCOPASI=true, bool includeSBML=true, bool includeData=true, bool includeSEDML=false, bool overwriteFile=false, CProcessReport *pProcessReport=NULL, int sbmlLevel=2, int sbmlVersion=4, int sedmlLevel=1, int sedmlVersion=4)
 
bool exportMathModel (const std::string &fileName, CProcessReport *pProcessReport, const std::string &filter, bool overwriteFile=false)
 
std::string exportMathModelToString (CProcessReport *pProcessReport, const std::string &filter)
 
bool exportSBML (const std::string &fileName, bool overwriteFile=false, int sbmlLevel=2, int sbmlVersion=1, bool exportIncomplete=false, bool exportCOPASIMIRIAM=true, CProcessReport *pProcessReport=NULL)
 
std::string exportSBMLToString (CProcessReport *pProcessReport, int sbmlLevel, int sbmlVersion)
 
bool exportSEDML (const std::string &fileName, bool overwriteFile=false, int sedmlLevel=1, int sedmlVersion=4, bool exportIncomplete=false, bool exportCOPASIMIRIAM=true, CProcessReport *pProcessReport=NULL)
 
std::string exportSEDMLToString (CProcessReport *pProcessReport, int sedmlLevel, int sedmlVersion, const std::string &modelLocation="model.xml", const XMLNamespaces *pAdditionalNamespaces=NULL)
 
bool exportShinyArchive (std::string fileName, bool includeCOPASI=true, bool includeData=true, bool overwriteFile=false, CProcessReport *pProcessReport=NULL)
 
const CDataObjectfindObjectByDisplayName (const std::string &displayString) const
 
const ContentTypegetContentType () const
 
std::map< const CDataObject *, SBase * > & getCopasi2SBMLMap ()
 
std::map< CDataObject *, SedBase * > & getCopasi2SEDMLMap ()
 
SBMLDocument * getCurrentSBMLDocument ()
 
SedDocument * getCurrentSEDMLDocument ()
 
std::string getDefaultFileName (const std::string &suffix) const
 
const std::string & getFileName () const
 
SCopasiXMLGUIgetGUI ()
 
CListOfLayoutsgetListOfLayouts ()
 
const CListOfLayoutsgetListOfLayouts () const
 
CModelgetModel ()
 
const CModelgetModel () const
 
COutputDefinitionVectorgetPlotDefinitionList ()
 
const COutputDefinitionVectorgetPlotDefinitionList () const
 
const std::string & getReferenceDirectory () const
 
CReportDefinitionVectorgetReportDefinitionList ()
 
const CReportDefinitionVectorgetReportDefinitionList () const
 
const std::string & getSBMLFileName () const
 
const std::string & getSEDMLFileName () const
 
CDataVectorN< CCopasiTask > * getTaskList ()
 
const CDataVectorN< CCopasiTask > * getTaskList () const
 
CUndoStackgetUndoStack ()
 
bool importSBML (const std::string &fileName, CProcessReport *pProcessReport=NULL, const bool &deleteOldData=true)
 
bool importSBMLFromString (const std::string &sbmlDocumentText, CProcessReport *pProcessReport=NULL, const bool &deleteOldData=true)
 
bool importSEDML (const std::string &fileName, CProcessReport *pProcessReport=NULL, const bool &deleteOldData=true, const SedmlImportOptions *pOptions=NULL)
 
bool importSEDMLFromString (const std::string &sedmlDocumentText, std::string referenceDir="", CProcessReport *pProcessReport=NULL, const bool &deleteOldData=true, const SedmlImportOptions *pOptions=NULL)
 
bool isChanged () const
 
bool loadFromFile (const std::string &fileName, CProcessReport *pProcessReport=NULL, const bool &deleteOldData=true)
 
bool loadFromString (const std::string &content, std::string referenceDir="", CProcessReport *pProcessReport=NULL, const bool &deleteOldData=true)
 
bool loadModel (const std::string &fileName, CProcessReport *pProcessReport, const bool &deleteOldData=true)
 
bool loadModel (std::istream &in, const std::string &pwd, CProcessReport *pProcessReport, const bool &deleteOldData=true)
 
bool loadModelParameterSets (const std::string &fileName, CProcessReport *pProcessReport=NULL)
 
bool newModel (CProcessReport *pProcessReport, const bool &deleteOldData)
 
bool openCombineArchive (const std::string &fileName, CProcessReport *pProcessReport=NULL, const bool &deleteOldData=true, const SedmlImportOptions *pOptions=NULL)
 
CUndoData::CChangeSet recordData (const CUndoData &data)
 
bool removeLayout (const std::string &key)
 
void reparameterizeFromIniFile (const std::string &fileName)
 
bool saveModel (const std::string &fileName, CProcessReport *pProcessReport, bool overwriteFile=false, const bool &autoSave=false)
 
bool saveModelParameterSets (const std::string &fileName)
 
std::string saveModelToString (CProcessReport *pProcessReport=NULL)
 
void setFileName (const std::string &fileName)
 
bool setSBMLFileName (const std::string &fileName)
 
bool setSEDMLFileName (const std::string &fileName)
 
virtual CData toData () const
 
virtual ~CDataModel ()
 
- Public Member Functions inherited from CDataContainer
virtual bool add (CDataObject *pObject, const bool &adopt=true)
 
virtual bool appendDeletedDependentData (CUndoData &undoData) const
 
 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 CObjectInterfacegetObject (const CCommonName &cn) const override
 
virtual objectMapgetObjects ()
 
virtual const objectMapgetObjects () const
 
virtual const std::string getUnits () const override
 
virtual const CDataObjectgetValueObject () const override
 
virtual CUndoObjectInterfaceinsert (const CData &data) override
 
void objectRenamed (CDataObject *pObject, const std::string &oldName)
 
virtual bool remove (CDataObject *pObject)
 
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 CDataObjectgetDataObject () const override
 
virtual const std::string & getKey () const
 
CDataContainergetObjectAncestor (const std::string &type) const
 
CDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName () const override
 
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
 
const std::string & getObjectName () const
 
CDataContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
 
virtual const CValiditygetValidity () 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 ()
 
- Public Member Functions inherited from COutputHandler
virtual void addInterface (COutputInterface *pInterface)
 
virtual bool compile (CObjectInterface::ContainerList listOfContainer)
 
 COutputHandler ()
 
 COutputHandler (const COutputHandler &src)
 
virtual void finish ()
 
std::set< COutputInterface * > getInterfaces () const
 
bool isMaster () const
 
virtual void output (const Activity &activity)
 
virtual void removeInterface (COutputInterface *pInterface)
 
virtual void separate (const Activity &activity)
 
void setMaster (COutputHandler *pMaster)
 
virtual ~COutputHandler ()
 
- Public Member Functions inherited from COutputInterface
virtual void close ()
 
 COutputInterface ()
 
 COutputInterface (const COutputInterface &src)
 
virtual const CObjectInterface::ObjectSetgetObjects () const
 
virtual ~COutputInterface ()
 

Static Public Member Functions

static bool changeModelParameter (CDataObject *element, double value)
 
static ContentType contentType (std::istream &content)
 
static CDataModelfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataContainer
static CDataContainerfromData (const CData &data, CUndoObjectInterface *pParent)
 
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
 
static void sanitizeObjectName (std::string &name)
 
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
 
static CObjectInterfaceGetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName)
 
- Static Public Member Functions inherited from CUndoObjectInterface
template<class CType >
static CType * fromData (const CData &, CUndoObjectInterface *)
 

Public Attributes

std::set< const CDataObject * > mLastAddedObjects
 
CDataVectorS< CMetabOld > * pOldMetabolites
 

Static Public Attributes

static const CEnumAnnotation< std::string, ContentTypeContentTypeNames
 
- Static Public Attributes inherited from CDataContainer
static const CObjectInterface::ContainerList EmptyList
 

Protected Member Functions

void commonAfterLoad (CProcessReport *pProcessReport, const bool &deleteOldData)
 
void popData ()
 
void pushData ()
 
void removeSBMLIdFromFunctions ()
 
void replaceCnInGroup (CModelParameter *pParam, const std::string &oldCn, const std::string &newCN)
 
- 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)
 
- Protected Member Functions inherited from COutputHandler
void applyUpdateSequence ()
 
bool compileUpdateSequence (const CObjectInterface::ContainerList &listOfContainer)
 

Protected Attributes

CContent mData
 
bool mNeedToSaveExperimentalData
 
CContent mOldData
 
CInfompInfo
 
std::vector< std::string > mTempFolders
 
- 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
 
- Protected Attributes inherited from COutputHandler
std::set< COutputInterface * > mInterfaces
 
const CMathContainermpContainer
 
COutputHandlermpMaster
 
CCore::CUpdateSequence mUpdateSequence
 
- Protected Attributes inherited from COutputInterface
CObjectInterface::ObjectSet mObjects
 

Member Enumeration Documentation

◆ ContentType

Enumerator
COPASI 
GEPASI 
SBML 
SEDML 
OMEX 
__SIZE 

Constructor & Destructor Documentation

◆ CDataModel() [1/3]

CDataModel::CDataModel ( const bool  withGUI = false)

◆ CDataModel() [2/3]

CDataModel::CDataModel ( const std::string &  name,
const CDataContainer pParent = NO_PARENT,
const std::string &  type = "CN",
bool  withGUI = false 
)

◆ CDataModel() [3/3]

CDataModel::CDataModel ( const CDataModel src,
const CDataContainer pParent 
)

◆ ~CDataModel()

CDataModel::~CDataModel ( )
virtual

Member Function Documentation

◆ addCopasiFileToArchive()

void CDataModel::addCopasiFileToArchive ( LIBCOMBINE_CPP_NAMESPACE_QUALIFIER CombineArchive *  archive,
const std::string &  targetName = "./copasi/model.cps",
CProcessReport pProcessReport = NULL 
)

adds the current COPASI model to the archive with the given target name

Parameters
archivethe COMBINE archive
targetNamethe name and path that the COPASI file should have in the archive
pProgressReportoptional pointer to the progress report

References saveModelToString().

Referenced by exportCombineArchive(), and exportShinyArchive().

◆ addDefaultReports()

◆ addDefaultTasks()

◆ addModel()

bool CDataModel::addModel ( const std::string &  fileName,
CProcessReport pProcessReport = NULL 
)

Loads the model contained in the specified file and adds it to the current one

Parameters
fileNamethe copasi file to add to this model
pProcessReportoptional progress handler
Returns
true, if a model was successfully added, false otherwise

References CRootContainer::addDatamodel(), C_INT32, CCopasiMessage::clearDeque(), CModelExpansion::copyCompleteModel(), CRootContainer::getDatamodelList(), getModel(), importSBML(), isProbablySBML(), loadModel(), mLastAddedObjects, CRootContainer::removeDatamodel(), and CDataVector< CType >::size().

◆ addReport()

◆ addTask()

CCopasiTask * CDataModel::addTask ( const CTaskEnum::Task taskType)

◆ appendDependentTasks()

bool CDataModel::appendDependentTasks ( CDataObject::ObjectSet  candidates,
CDataObject::DataObjectSet dependentTasks 
) const

Appends pointers to tasks, which are dependent on any of the candidates to the list dependentTasks.

Parameters
CDataObject::ObjectSetcandidates
CDataObject::DataObjectSet& dependentTasks
Returns
bool functionsAppended

References CDataVector< CType >::begin(), CDataVector< CType >::end(), mData, and CDataModel::CContent::pTaskList.

◆ applyData() [1/2]

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

Apply the provided data to the object

Parameters
constCData & data
Returns
bool success

Reimplemented from CDataContainer.

References fatalError.

◆ applyData() [2/2]

◆ autoSave()

◆ changed()

void CDataModel::changed ( const bool &  changed = true)

◆ changeModelParameter()

bool CDataModel::changeModelParameter ( CDataObject element,
double  value 
)
static

◆ commonAfterLoad()

◆ contentType()

CDataModel::ContentType CDataModel::contentType ( std::istream &  content)
static

Determine the content type of the given content stream

Parameters
std::istreamcontent
Returns
ContentType contentType

References __SIZE, C_INT32, COPASI, GEPASI, CReadConfig::getVariable(), OMEX, SBML, and SEDML.

Referenced by loadFromFile(), and loadFromString().

◆ copyExperimentalDataTo()

void CDataModel::copyExperimentalDataTo ( const std::string &  path)

Moves the experimental data referenced in the model to the specified path and update the referenced filenames to match it. Should the folder already have an experimental data file in there with the name, a new name will be chosen.

Parameters
paththe target directory for the experimental data.

References CDirEntry::baseName(), CDirEntry::exist(), CDirEntry::fileName(), CFitProblem::getCrossValidationSet(), CExperimentSet::getExperiment(), CExperimentSet::getExperimentCount(), CFitProblem::getExperimentSet(), CExperiment::getFileName(), CExperimentSet::getFileNames(), getTaskList(), CDirEntry::makePathAbsolute(), CTaskEnum::parameterFitting, CExperiment::setFileName(), and CTaskEnum::TaskName.

Referenced by saveModel().

◆ deleteOldData()

◆ exportCombineArchive()

bool CDataModel::exportCombineArchive ( std::string  fileName,
bool  includeCOPASI = true,
bool  includeSBML = true,
bool  includeData = true,
bool  includeSEDML = false,
bool  overwriteFile = false,
CProcessReport pProcessReport = NULL,
int  sbmlLevel = 2,
int  sbmlVersion = 4,
int  sedmlLevel = 1,
int  sedmlVersion = 4 
)

Exports the current model as COMBINE archive

Parameters
fileNamethe archive filename to create
includeCOPASIwhether to include COPASI models (defaults to true)
includeSBMLwhether to include SBML models (defaults to true)
includeDatawhether to include experimental data files (if any)
includeSEDMLwhether to include SEDML documents (defaults to false)
overWriteFilewhether to overwrite files if already present (false)

References addCopasiFileToArchive(), addMessagesToStream(), CCopasiMessage::clearDeque(), CCopasiMessage::ERROR, CDirEntry::exist(), exportSBMLToString(), exportSEDMLToString(), CDirEntry::fileName(), CFitProblem::getCrossValidationSet(), CExperimentSet::getExperiment(), CExperimentSet::getExperimentCount(), CFitProblem::getExperimentSet(), CExperiment::getFileName(), CExperiment::getFileNameOnly(), CExperimentSet::getFileNames(), getTaskList(), COptions::getValue(), CDirEntry::isRelativePath(), CDirEntry::isWritable(), CDirEntry::makePathAbsolute(), MCDirEntry, CTaskEnum::parameterFitting, CCopasiMessage::RAW, CExperiment::setFileName(), and CTaskEnum::TaskName.

◆ exportMathModel()

◆ exportMathModelToString()

◆ exportSBML()

◆ exportSBMLToString()

◆ exportSEDML()

bool CDataModel::exportSEDML ( const std::string &  fileName,
bool  overwriteFile = false,
int  sedmlLevel = 1,
int  sedmlVersion = 4,
bool  exportIncomplete = false,
bool  exportCOPASIMIRIAM = true,
CProcessReport pProcessReport = NULL 
)

◆ exportSEDMLToString()

std::string CDataModel::exportSEDMLToString ( CProcessReport pProcessReport,
int  sedmlLevel,
int  sedmlVersion,
const std::string &  modelLocation = "model.xml",
const XMLNamespaces *  pAdditionalNamespaces = NULL 
)

exports the SED-ML with given level and version to a string. NOTE: the SBML model will not be exported, instead it is assumed to be available at the location provided in modelLocation

Parameters
pExportHandlerexport handler
sedmlLevelthe level to export
sedmlVersionthe version to export
modelLocationthe location where the SBML file has been written, defaults to 'model.xml'
pAdditionalNamespacesadditional namespaces to be added to the SED-ML document
Returns
the SED-ML string.

References CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CCopasiMessage::EXCEPTION, CSEDMLExporter::exportModelAndTasksToString(), CCopasiMessage::getAllMessageText(), mData, CDataModel::CContent::pCurrentSEDMLDocument, CDataModel::CContent::pModel, and CSEDMLExporter::setSBMLNamespaces().

Referenced by exportCombineArchive().

◆ exportShinyArchive()

◆ findObjectByDisplayName()

◆ fromData()

CDataModel * CDataModel::fromData ( const CData data,
CUndoObjectInterface pParent 
)
static

Static method to create a CDataObject based on the provided data

Parameters
constCData & data
Returns
CDataModel * pDataObject

References CDataModel(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, and CDataValue::toString().

◆ getContentType()

const CDataModel::ContentType & CDataModel::getContentType ( ) const

◆ getCopasi2SBMLMap()

std::map< const CDataObject *, SBase * > & CDataModel::getCopasi2SBMLMap ( )

◆ getCopasi2SEDMLMap()

std::map< CDataObject *, SedBase * > & CDataModel::getCopasi2SEDMLMap ( )

◆ getCurrentSBMLDocument()

SBMLDocument * CDataModel::getCurrentSBMLDocument ( )

◆ getCurrentSEDMLDocument()

SedDocument * CDataModel::getCurrentSEDMLDocument ( )

◆ getDefaultFileName()

std::string CDataModel::getDefaultFileName ( const std::string &  suffix) const

◆ getFileName()

const std::string & CDataModel::getFileName ( ) const

◆ getGUI()

◆ getListOfLayouts() [1/2]

◆ getListOfLayouts() [2/2]

const CListOfLayouts * CDataModel::getListOfLayouts ( ) const

◆ getModel() [1/2]

CModel * CDataModel::getModel ( )

References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pModel.

Referenced by addModel(), addParticleNumberToInitialValueMap(), CDataContainer::appendDeletedDependentData(), CCopasiXML::buildFunctionList(), CExperiment::calculateStatistics(), changeModelParameter(), CSBMLExporter::checkForEvents(), CSBMLExporter::checkForInitialAssignments(), CSBMLExporter::checkForODESpeciesInNonfixedCompartment(), CSBMLExporter::checkForPiecewiseFunctions(), SBMLUnitSupport::checkForSpatialSizeUnits(), CSBMLExporter::checkForUnsupportedObjectReferences(), CSBMLExporter::collectIds(), CEvaluationNodeObject::compile(), CSBMLExporter::createAreaUnit(), CSBMLExporter::createAvogadroIfNeeded(), CSBMLExporter::createCompartments(), CSEDMLExporter::createDataGenerators(), CSBMLExporter::createEvents(), CSBMLExporter::createLengthUnit(), CSBMLExporter::createMetabolites(), CSBMLExporter::createParameters(), CSBMLExporter::createReactions(), CSBMLExporter::createSBMLDocument(), CSBMLExporter::createSubstanceUnit(), CSEDMLExporter::createTimeCourseTask(), CSBMLExporter::createTimeUnit(), CSBMLExporter::createVolumeUnit(), CSBMLExporter::exportEventAssignments(), CODEExporter::exportExpression(), CODEExporter::exportObjectNodesFromModel(), CODEExporter::exportToStream(), CSBMLExporter::findAvogadro(), findObjectByDisplayName(), getQuantityParameterOrValue(), CSensItem::getVariablesPointerList(), SEDMLUtils::getXPathForObject(), CSBMLExporter::hasVolumeAssignment(), CLsodaMethod::initializeParameter(), CCopasiTask::initObjects(), CSBMLExporter::isModelSBMLCompatible(), CSlider::isValid(), loadModelParameterSets(), SEDMLImporter::parseSEDML(), reparameterizeFromIniFile(), CSBMLExporter::replaceSpeciesReferences(), saveModelParameterSets(), CSEDMLExporter::setCurrentTime(), CReaction::setReactionScheme(), CSlider::setSliderObject(), and CSlider::writeToObject().

◆ getModel() [2/2]

const CModel * CDataModel::getModel ( ) const

◆ getPlotDefinitionList() [1/2]

◆ getPlotDefinitionList() [2/2]

◆ getReferenceDirectory()

◆ getReportDefinitionList() [1/2]

◆ getReportDefinitionList() [2/2]

◆ getSBMLFileName()

const std::string & CDataModel::getSBMLFileName ( ) const

◆ getSEDMLFileName()

const std::string & CDataModel::getSEDMLFileName ( ) const

◆ getTaskList() [1/2]

◆ getTaskList() [2/2]

const CDataVectorN< CCopasiTask > * CDataModel::getTaskList ( ) const

◆ getUndoStack()

◆ importSBML()

◆ importSBMLFromString()

◆ importSEDML()

◆ importSEDMLFromString()

bool CDataModel::importSEDMLFromString ( const std::string &  sedmlDocumentText,
std::string  referenceDir = "",
CProcessReport pProcessReport = NULL,
const bool &  deleteOldData = true,
const SedmlImportOptions pOptions = NULL 
)

◆ isChanged()

bool CDataModel::isChanged ( ) const

◆ loadFromFile()

bool CDataModel::loadFromFile ( const std::string &  fileName,
CProcessReport pProcessReport = NULL,
const bool &  deleteOldData = true 
)

◆ loadFromString()

bool CDataModel::loadFromString ( const std::string &  content,
std::string  referenceDir = "",
CProcessReport pProcessReport = NULL,
const bool &  deleteOldData = true 
)

Load the model from the content which may be any supported type

Parameters
conststd::string & content
std::stringreferenceDir = pwd()
CProcessReport*pProcessReport = NULL
constbool & deleteOldData = true

References __SIZE, contentType(), COPASI, CDirEntry::createTmpName(), deleteOldData(), CCopasiMessage::ERROR, GEPASI, COptions::getValue(), importSBMLFromString(), importSEDMLFromString(), loadModel(), mData, CDataModel::CContent::mReferenceDir, OMEX, openCombineArchive(), CDirEntry::remove(), SBML, and SEDML.

◆ loadModel() [1/2]

◆ loadModel() [2/2]

◆ loadModelParameterSets()

◆ newModel()

bool CDataModel::newModel ( CProcessReport pProcessReport,
const bool &  deleteOldData 
)

◆ openCombineArchive()

◆ popData()

◆ pushData()

◆ recordData()

◆ removeLayout()

bool CDataModel::removeLayout ( const std::string &  key)

◆ removeSBMLIdFromFunctions()

void CDataModel::removeSBMLIdFromFunctions ( )
protected

◆ reparameterizeFromIniFile()

void CDataModel::reparameterizeFromIniFile ( const std::string &  fileName)

updates the data model with values from the provided ini file. This file should have the simple syntax, of one of more statements:

name = value

where name is a valid DisplayName of a model object, and value a double value to be assigned. To indicate a comment, use the semicolon ';' after which the remaining line will be disregarded.

Parameters
fileNamethe fileName of the ini file

References changeModelParameter(), CModel::compileIfNecessary(), findObjectByDisplayName(), getModel(), ResultParser::saveToDouble(), CModel::setCompileFlag(), and ResultParser::trim().

◆ replaceCnInGroup()

void CDataModel::replaceCnInGroup ( CModelParameter pParam,
const std::string &  oldCn,
const std::string &  newCN 
)
protected

Referenced by loadModelParameterSets().

◆ saveModel()

◆ saveModelParameterSets()

bool CDataModel::saveModelParameterSets ( const std::string &  fileName)

◆ saveModelToString()

◆ setFileName()

void CDataModel::setFileName ( const std::string &  fileName)

◆ setSBMLFileName()

◆ setSEDMLFileName()

◆ toData()

CData CDataModel::toData ( ) const
virtual

Retrieve the data describing the object

Returns
CData data

Reimplemented from CDataContainer.

References fatalError.

Member Data Documentation

◆ ContentTypeNames

LIBCOMBINE_CPP_NAMESPACE_USE const CEnumAnnotation< std::string, CDataModel::ContentType > CDataModel::ContentTypeNames
static

String representation of the valid model types.

◆ mData

◆ mLastAddedObjects

std::set< const CDataObject * > CDataModel::mLastAddedObjects

Referenced by addModel().

◆ mNeedToSaveExperimentalData

bool CDataModel::mNeedToSaveExperimentalData
protected

Referenced by openCombineArchive(), and saveModel().

◆ mOldData

◆ mpInfo

CInfo* CDataModel::mpInfo
protected

Referenced by CDataModel(), and commonAfterLoad().

◆ mTempFolders

std::vector<std::string> CDataModel::mTempFolders
protected

Referenced by openCombineArchive(), and ~CDataModel().

◆ pOldMetabolites

CDataVectorS< CMetabOld >* CDataModel::pOldMetabolites

This is a hack at the moment to be able to read Gepasi model files

Referenced by CModel::load(), CReaction::loadOneRole(), and ~CDataModel().


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