COPASI API
4.40.278
|
#include <CDataModel.h>
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) |
CReportDefinition * | addReport (const CTaskEnum::Task &taskType) |
CCopasiTask * | addTask (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 CDataObject * | findObjectByDisplayName (const std::string &displayString) const |
const ContentType & | getContentType () 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 |
SCopasiXMLGUI * | getGUI () |
CListOfLayouts * | getListOfLayouts () |
const CListOfLayouts * | getListOfLayouts () const |
CModel * | getModel () |
const CModel * | getModel () const |
COutputDefinitionVector * | getPlotDefinitionList () |
const COutputDefinitionVector * | getPlotDefinitionList () const |
const std::string & | getReferenceDirectory () const |
CReportDefinitionVector * | getReportDefinitionList () |
const CReportDefinitionVector * | getReportDefinitionList () const |
const std::string & | getSBMLFileName () const |
const std::string & | getSEDMLFileName () const |
CDataVectorN< CCopasiTask > * | getTaskList () |
const CDataVectorN< CCopasiTask > * | getTaskList () const |
CUndoStack * | getUndoStack () |
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 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 | ~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 () |
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::ObjectSet & | getObjects () const |
virtual | ~COutputInterface () |
Static Public Member Functions | |
static bool | changeModelParameter (CDataObject *element, double value) |
static ContentType | contentType (std::istream &content) |
static CDataModel * | fromData (const CData &data, CUndoObjectInterface *pParent) |
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 *) |
Public Attributes | |
std::set< const CDataObject * > | mLastAddedObjects |
CDataVectorS< CMetabOld > * | pOldMetabolites |
Static Public Attributes | |
static const CEnumAnnotation< std::string, ContentType > | ContentTypeNames |
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 |
CInfo * | mpInfo |
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 CMathContainer * | mpContainer |
COutputHandler * | mpMaster |
CCore::CUpdateSequence | mUpdateSequence |
Protected Attributes inherited from COutputInterface | |
CObjectInterface::ObjectSet | mObjects |
|
strong |
CDataModel::CDataModel | ( | const bool | withGUI = false | ) |
References mpInfo, newModel(), CCopasiTimer::PROCESS, and CCopasiTimer::WALL.
Referenced by fromData().
CDataModel::CDataModel | ( | const std::string & | name, |
const CDataContainer * | pParent = NO_PARENT , |
||
const std::string & | type = "CN" , |
||
bool | withGUI = false |
||
) |
References newModel(), CCopasiTimer::PROCESS, and CCopasiTimer::WALL.
CDataModel::CDataModel | ( | const CDataModel & | src, |
const CDataContainer * | pParent | ||
) |
|
virtual |
References deleteOldData(), mData, mOldData, mTempFolders, pdelete, pOldMetabolites, and CRegisteredCommonName::setEnabled().
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
archive | the COMBINE archive |
targetName | the name and path that the COPASI file should have in the archive |
pProgressReport | optional pointer to the progress report |
References saveModelToString().
Referenced by exportCombineArchive(), and exportShinyArchive().
bool CDataModel::addDefaultReports | ( | ) |
References addReport(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), CCopasiTask::getReport(), CReport::getReportDefinition(), mData, CDataModel::CContent::pReportDefinitionList, CDataModel::CContent::pTaskList, CReport::setReportDefinition(), and CTaskEnum::TaskName.
Referenced by commonAfterLoad().
bool CDataModel::addDefaultTasks | ( | ) |
References addTask(), C_INVALID_INDEX, CDataVectorN< CType >::getIndex(), mData, CDataModel::CContent::pTaskList, and CTaskEnum::TaskName.
Referenced by commonAfterLoad().
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
fileName | the copasi file to add to this model |
pProcessReport | optional progress handler |
References CRootContainer::addDatamodel(), C_INT32, CCopasiMessage::clearDeque(), CModelExpansion::copyCompleteModel(), CRootContainer::getDatamodelList(), getModel(), importSBML(), isProbablySBML(), loadModel(), mLastAddedObjects, CRootContainer::removeDatamodel(), and CDataVector< CType >::size().
CReportDefinition * CDataModel::addReport | ( | const CTaskEnum::Task & | taskType | ) |
References CDataVectorN< CType >::add(), CTaskEnum::fluxMode, CReportDefinition::getBodyAddr(), CReportDefinition::getFooterAddr(), CReportDefinition::getHeaderAddr(), CTaskEnum::lna, CTaskEnum::lyap, CTaskEnum::mca, mData, CTaskEnum::moieties, CTaskEnum::optimization, CTaskEnum::parameterFitting, CDataModel::CContent::pReportDefinitionList, CTaskEnum::scan, CTaskEnum::sens, CReportDefinition::setComment(), CReportDefinition::setIsTable(), CReportDefinition::setSeparator(), CReportDefinition::setTaskType(), CReportDefinition::setTitle(), CTaskEnum::steadyState, CTaskEnum::TaskName, CTaskEnum::timeCourse, and CTaskEnum::tssAnalysis.
Referenced by addDefaultReports().
CCopasiTask * CDataModel::addTask | ( | const CTaskEnum::Task & | taskType | ) |
References CTaskFactory::create(), mData, and CDataModel::CContent::pTaskList.
Referenced by addDefaultTasks().
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.
CDataObject::ObjectSet | candidates |
CDataObject::DataObjectSet | & dependentTasks |
References CDataVector< CType >::begin(), CDataVector< CType >::end(), mData, and CDataModel::CContent::pTaskList.
|
virtual |
Apply the provided data to the object
const | CData & data |
Reimplemented from CDataContainer.
References fatalError.
CUndoData::CChangeSet CDataModel::applyData | ( | const CUndoData & | data | ) |
References changed(), CUndoData::empty(), mData, CDataModel::CContent::mpUndoStack, and CUndoStack::record().
bool CDataModel::autoSave | ( | ) |
References CDirEntry::baseName(), COptions::getValue(), CDataModel::CContent::mAutoSaveNeeded, mData, CDataModel::CContent::mSaveFileName, saveModel(), and CDirEntry::Separator.
Referenced by saveModel().
void CDataModel::changed | ( | const bool & | changed = true | ) |
References CDataModel::CContent::mAutoSaveNeeded, CDataModel::CContent::mChanged, and mData.
Referenced by applyData(), commonAfterLoad(), openCombineArchive(), and saveModel().
|
static |
changes the provided model element to the given double value
References getModel(), CDataObject::getObjectDataModel(), CDataObject::getObjectName(), CDataObjectReference< CType >::getValuePointer(), CCopasiParameter::getValuePointer(), and CModel::updateInitialValues().
Referenced by reparameterizeFromIniFile().
|
protected |
References CMIRIAMInfo::addDefaultCreatedDT(), CMIRIAMInfo::addDefaultCreator(), addDefaultReports(), addDefaultTasks(), CDataVector< CType >::begin(), changed(), CModel::compileIfNecessary(), deleteOldData(), CDataVector< CType >::end(), CModel::getActiveModelParameterSet(), CValidity::getIssueMessages(), CCopasiMessage::getLastMessage(), CModel::getMathContainer(), CDataObject::getValidity(), CMIRIAMInfo::load(), mData, mOldData, mpInfo, CDataModel::CContent::mpUndoStack, CDataModel::CContent::mWithGUI, CCopasiTask::NO_OUTPUT, CCore::ParticleNumbers, CDataModel::CContent::pCurrentSBMLDocument, CDataModel::CContent::pCurrentSEDMLDocument, CDataModel::CContent::pGUI, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, CDataModel::CContent::pPlotDefinitionList, CDataModel::CContent::pReportDefinitionList, CDataModel::CContent::pTaskList, CDataContainer::remove(), CMIRIAMInfo::save(), CDataObject::setObjectParent(), CModel::setObjectParent(), CCopasiMessage::size(), CInfo::update(), CModel::updateInitialValues(), CModelParameterSet::updateModel(), and CCopasiMessage::WARNING.
Referenced by importSBML(), importSBMLFromString(), importSEDML(), importSEDMLFromString(), loadModel(), and newModel().
|
static |
Determine the content type of the given content stream
std::istream | content |
References __SIZE, C_INT32, COPASI, GEPASI, CReadConfig::getVariable(), OMEX, SBML, and SEDML.
Referenced by loadFromFile(), and loadFromString().
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.
path | the 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().
void CDataModel::deleteOldData | ( | ) |
References mOldData, CDataModel::CContent::mpUndoStack, CDataModel::CContent::pCurrentSBMLDocument, CDataModel::CContent::pCurrentSEDMLDocument, pdelete, CDataModel::CContent::pGUI, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, CDataModel::CContent::pPlotDefinitionList, CDataModel::CContent::pReportDefinitionList, and CDataModel::CContent::pTaskList.
Referenced by commonAfterLoad(), importSBML(), importSBMLFromString(), importSEDML(), importSEDMLFromString(), loadFromFile(), loadFromString(), loadModel(), newModel(), openCombineArchive(), and ~CDataModel().
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
fileName | the archive filename to create |
includeCOPASI | whether to include COPASI models (defaults to true) |
includeSBML | whether to include SBML models (defaults to true) |
includeData | whether to include experimental data files (if any) |
includeSEDML | whether to include SEDML documents (defaults to false) |
overWriteFile | whether 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.
bool CDataModel::exportMathModel | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport, | ||
const std::string & | filter, | ||
bool | overwriteFile = false |
||
) |
References CDataVector< CType >::begin(), CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CDirEntry::dirName(), CDataVector< CType >::end(), CCopasiMessage::ERROR, CDirEntry::exist(), CODEExporter::exportToStream(), CLocaleString::fromUtf8(), CModel::getModelValues(), CDirEntry::isWritable(), MCDirEntry, MCODEExporter, mData, CDataModel::CContent::pModel, and CCopasiMessage::WARNING.
std::string CDataModel::exportMathModelToString | ( | CProcessReport * | pProcessReport, |
const std::string & | filter | ||
) |
bool CDataModel::exportSBML | ( | const std::string & | fileName, |
bool | overwriteFile = false , |
||
int | sbmlLevel = 2 , |
||
int | sbmlVersion = 1 , |
||
bool | exportIncomplete = false , |
||
bool | exportCOPASIMIRIAM = true , |
||
CProcessReport * | pProcessReport = NULL |
||
) |
References CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CSBMLExporter::disownSBMLDocument(), CCopasiMessage::ERROR, CCopasiMessage::EXCEPTION, CDirEntry::exist(), CSBMLExporter::exportModel(), CDirEntry::fileName(), CCopasiMessage::getAllMessageText(), CSBMLExporter::getCOPASI2SBMLMap(), CSBMLExporter::getSBMLDocument(), COptions::getValue(), CDirEntry::isRelativePath(), CDirEntry::isWritable(), CDirEntry::makePathAbsolute(), MCDirEntry, CDataModel::CContent::mCopasi2SBMLMap, mData, CDataModel::CContent::mSBMLFileName, CDataModel::CContent::pCurrentSBMLDocument, pdelete, CDataModel::CContent::pModel, CSBMLExporter::setExportCOPASIMIRIAM(), and CSBMLExporter::setHandler().
std::string CDataModel::exportSBMLToString | ( | CProcessReport * | pProcessReport, |
int | sbmlLevel, | ||
int | sbmlVersion | ||
) |
References CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CSBMLExporter::disownSBMLDocument(), CCopasiMessage::EXCEPTION, CSBMLExporter::exportModelToString(), CCopasiMessage::getAllMessageText(), CSBMLExporter::getCOPASI2SBMLMap(), CSBMLExporter::getSBMLDocument(), CDataModel::CContent::mCopasi2SBMLMap, mData, CDataModel::CContent::pCurrentSBMLDocument, pdelete, CDataModel::CContent::pModel, CSBMLExporter::setExportCOPASIMIRIAM(), and CSBMLExporter::setHandler().
Referenced by exportCombineArchive(), exportSEDML(), Copasi2SBMLTranslator::translateFileToSBML(), and Copasi2SBMLTranslator::translateToSBML().
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 |
||
) |
Exports the current model as SEDML document
fileName | the filename to create |
sedmlLevel | the level of the SEDML to export (defaults to 1) |
sedmlVersion | the version of SEDML to export (defaults to 4) |
References CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CCopasiMessage::ERROR, CCopasiMessage::EXCEPTION, CDirEntry::exist(), CSEDMLExporter::exportModelAndTasks(), exportSBMLToString(), CDirEntry::fileName(), CCopasiMessage::getAllMessageText(), COptions::getValue(), CDirEntry::isRelativePath(), CDirEntry::isWritable(), CDirEntry::makePathAbsolute(), MCDirEntry, mData, CDataModel::CContent::pModel, and CSEDMLExporter::setSBMLNamespaces().
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
pExportHandler | export handler |
sedmlLevel | the level to export |
sedmlVersion | the version to export |
modelLocation | the location where the SBML file has been written, defaults to 'model.xml' |
pAdditionalNamespaces | additional namespaces to be added to the SED-ML document |
References CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CCopasiMessage::EXCEPTION, CSEDMLExporter::exportModelAndTasksToString(), CCopasiMessage::getAllMessageText(), mData, CDataModel::CContent::pCurrentSEDMLDocument, CDataModel::CContent::pModel, and CSEDMLExporter::setSBMLNamespaces().
Referenced by exportCombineArchive().
bool CDataModel::exportShinyArchive | ( | std::string | fileName, |
bool | includeCOPASI = true , |
||
bool | includeData = true , |
||
bool | overwriteFile = false , |
||
CProcessReport * | pProcessReport = NULL |
||
) |
References addCopasiFileToArchive(), CDirEntry::baseName(), CCopasiMessage::clearDeque(), CCopasiMessage::ERROR, CDirEntry::exist(), 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, CExperiment::setFileName(), and CTaskEnum::TaskName.
const CDataObject * CDataModel::findObjectByDisplayName | ( | const std::string & | displayString | ) | const |
Resolves the provided display string and returns a data object for it if it can be found
displayString | the display name of the object to find |
References CDataVector< CType >::begin(), C_INVALID_INDEX, CMetabNameInterface::createUniqueDisplayName(), CDataVector< CType >::end(), CModel::getCompartments(), CMetab::getConcentrationRateReference(), CMetab::getConcentrationReference(), CReaction::getFluxReference(), CDataVectorN< CType >::getIndex(), CMetab::getInitialConcentrationReference(), CModelEntity::getInitialValueReference(), CModel::getMetabolites(), getModel(), CModel::getModelValues(), CDataContainer::getObject(), CDataObject::getObjectDisplayName(), CMetab::getObjectDisplayName(), CReaction::getParameterIndex(), CReaction::getParameterObjects(), CReaction::getParticleFluxReference(), CModelEntity::getRateReference(), CModel::getReactions(), and CModelEntity::getValueReference().
Referenced by CReactionInterface::getUnit(), CReactionInterface::getUnitVector(), and reparameterizeFromIniFile().
|
static |
Static method to create a CDataObject based on the provided data
const | CData & data |
References CDataModel(), CData::getProperty(), NO_PARENT, CData::OBJECT_NAME, and CDataValue::toString().
const CDataModel::ContentType & CDataModel::getContentType | ( | ) | const |
References CDataModel::CContent::isValid(), CDataModel::CContent::mContentType, mData, and mOldData.
std::map< const CDataObject *, SBase * > & CDataModel::getCopasi2SBMLMap | ( | ) |
References CDataModel::CContent::mCopasi2SBMLMap, and mData.
Referenced by CTimeSeries::getSBMLId(), and SEDMLImporter::importOutputs().
std::map< CDataObject *, SedBase * > & CDataModel::getCopasi2SEDMLMap | ( | ) |
References CDataModel::CContent::mCopasi2SEDMLMap, and mData.
SBMLDocument * CDataModel::getCurrentSBMLDocument | ( | ) |
References mData, and CDataModel::CContent::pCurrentSBMLDocument.
Referenced by CSBMLExporter::createSBMLDocument().
SedDocument * CDataModel::getCurrentSEDMLDocument | ( | ) |
References mData, and CDataModel::CContent::pCurrentSEDMLDocument.
std::string CDataModel::getDefaultFileName | ( | const std::string & | suffix | ) | const |
const std::string & CDataModel::getFileName | ( | ) | const |
References mData, and CDataModel::CContent::mSaveFileName.
Referenced by CModelVersionHierarchy::addVersion(), CModelVersionHierarchy::restoreVersion(), and CInfo::update().
SCopasiXMLGUI * CDataModel::getGUI | ( | ) |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pGUI.
CListOfLayouts * CDataModel::getListOfLayouts | ( | ) |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pListOfLayouts.
Referenced by CSBMLExporter::exportLayout().
const CListOfLayouts * CDataModel::getListOfLayouts | ( | ) | const |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pListOfLayouts.
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().
const CModel * CDataModel::getModel | ( | ) | const |
References mData, and CDataModel::CContent::pModel.
COutputDefinitionVector * CDataModel::getPlotDefinitionList | ( | ) |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pPlotDefinitionList.
const COutputDefinitionVector * CDataModel::getPlotDefinitionList | ( | ) | const |
const std::string & CDataModel::getReferenceDirectory | ( | ) | const |
References mData, and CDataModel::CContent::mReferenceDir.
Referenced by SBMLImporter::checkValidityOfSourceDocument(), CModelVersionHierarchy::getDiretory(), CReport::open(), and SEDMLImporter::resolveModelFile().
CReportDefinitionVector * CDataModel::getReportDefinitionList | ( | ) |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pReportDefinitionList.
const CReportDefinitionVector * CDataModel::getReportDefinitionList | ( | ) | const |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pReportDefinitionList.
Referenced by COutputAssistant::createTable(), and SEDMLImporter::importOutputs().
const std::string & CDataModel::getSBMLFileName | ( | ) | const |
References mData, and CDataModel::CContent::mSBMLFileName.
Referenced by CCopasiXML::saveSBMLReference().
const std::string & CDataModel::getSEDMLFileName | ( | ) | const |
References mData, and CDataModel::CContent::mSEDMLFileName.
Referenced by SEDMLImporter::resolveModelFile().
CDataVectorN< CCopasiTask > * CDataModel::getTaskList | ( | ) |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pTaskList.
Referenced by copyExperimentalDataTo(), COutputAssistant::createDefaultOutput(), CModel::createEventsForTimeseries(), CSEDMLExporter::createScanTask(), CSEDMLExporter::createSteadyStateTask(), CSEDMLExporter::createTasks(), CSEDMLExporter::createTimeCourseTask(), CFitProblem::elevateChildren(), exportCombineArchive(), exportShinyArchive(), ResultData::getFitTask(), ResultData::getOptTask(), CScanProblem::getSubTask(), CSensProblem::getSubTask(), CMCAProblem::getSubTask(), CNewtonMethod::initialize(), CTimeSensTask::initialize(), CTrajectoryTask::initialize(), CSensMethod::initialize(), CScanTask::initSubtask(), openCombineArchive(), CLNAProblem::setSteadyStateRequested(), and CMCAProblem::setSteadyStateRequested().
const CDataVectorN< CCopasiTask > * CDataModel::getTaskList | ( | ) | const |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::pTaskList.
CUndoStack * CDataModel::getUndoStack | ( | ) |
References CDataModel::CContent::isValid(), mData, mOldData, and CDataModel::CContent::mpUndoStack.
bool CDataModel::importSBML | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport = NULL , |
||
const bool & | deleteOldData = true |
||
) |
References CDataContainer::add(), CDirEntry::baseName(), CCopasiMessage::clearDeque(), commonAfterLoad(), SBMLImporter::deleteCopasiModel(), deleteOldData(), CDirEntry::dirName(), CDirEntry::fileName(), COptions::getValue(), CDirEntry::isRelativePath(), CDirEntry::makePathAbsolute(), CDataModel::CContent::mContentType, CDataModel::CContent::mCopasi2SBMLMap, mData, CDataModel::CContent::mReferenceDir, CDataModel::CContent::mSaveFileName, CDataModel::CContent::mSBMLFileName, CDirEntry::normalize(), CDataModel::CContent::pCurrentSBMLDocument, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, popData(), pushData(), SBMLImporter::readSBML(), SBMLImporter::restoreFunctionDB(), SBML, CDirEntry::Separator, CRegisteredCommonName::setEnabled(), SBMLImporter::setImportCOPASIMIRIAM(), SBMLImporter::setImportHandler(), and CDirEntry::suffix().
Referenced by addModel(), loadFromFile(), and openCombineArchive().
bool CDataModel::importSBMLFromString | ( | const std::string & | sbmlDocumentText, |
CProcessReport * | pProcessReport = NULL , |
||
const bool & | deleteOldData = true |
||
) |
References CDataContainer::add(), CCopasiMessage::clearDeque(), commonAfterLoad(), SBMLImporter::deleteCopasiModel(), deleteOldData(), CDataModel::CContent::mContentType, CDataModel::CContent::mCopasi2SBMLMap, mData, SBMLImporter::parseSBML(), CDataModel::CContent::pCurrentSBMLDocument, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, popData(), pushData(), SBMLImporter::restoreFunctionDB(), SBML, CRegisteredCommonName::setEnabled(), SBMLImporter::setImportCOPASIMIRIAM(), and SBMLImporter::setImportHandler().
Referenced by loadFromString(), and Copasi2SBMLTranslator::translate().
bool CDataModel::importSEDML | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport = NULL , |
||
const bool & | deleteOldData = true , |
||
const SedmlImportOptions * | pOptions = NULL |
||
) |
References CDirEntry::baseName(), CCopasiMessage::clearDeque(), commonAfterLoad(), SEDMLImporter::deleteCopasiModel(), deleteOldData(), CDirEntry::dirName(), CDirEntry::fileName(), CLocaleString::fromUtf8(), COptions::getValue(), CDirEntry::isRelativePath(), CDirEntry::makePathAbsolute(), mData, CDataModel::CContent::mReferenceDir, CDataModel::CContent::mSaveFileName, CDataModel::CContent::mSEDMLFileName, CDirEntry::normalize(), popData(), pushData(), SEDMLImporter::readSEDML(), SEDMLImporter::restoreFunctionDB(), CDirEntry::Separator, CRegisteredCommonName::setEnabled(), SEDMLImporter::setImportHandler(), CDirEntry::suffix(), and SEDMLImporter::updateContent().
Referenced by loadFromFile(), and openCombineArchive().
bool CDataModel::importSEDMLFromString | ( | const std::string & | sedmlDocumentText, |
std::string | referenceDir = "" , |
||
CProcessReport * | pProcessReport = NULL , |
||
const bool & | deleteOldData = true , |
||
const SedmlImportOptions * | pOptions = NULL |
||
) |
References CCopasiMessage::clearDeque(), commonAfterLoad(), SEDMLImporter::deleteCopasiModel(), deleteOldData(), mData, CDataModel::CContent::mReferenceDir, SEDMLImporter::parseSEDML(), popData(), pushData(), SEDMLImporter::restoreFunctionDB(), CRegisteredCommonName::setEnabled(), SEDMLImporter::setImportHandler(), and SEDMLImporter::updateContent().
Referenced by loadFromString().
bool CDataModel::isChanged | ( | ) | const |
References CDataModel::CContent::mChanged, and mData.
bool CDataModel::loadFromFile | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport = NULL , |
||
const bool & | deleteOldData = true |
||
) |
Load the model from the file which may be any supported type
const | std::string & fileName |
CProcessReport | *pProcessReport = NULL |
const | bool & deleteOldData = true |
References __SIZE, CDirEntry::baseName(), contentType(), COPASI, deleteOldData(), CDirEntry::dirName(), CCopasiMessage::ERROR, CDirEntry::fileName(), CLocaleString::fromUtf8(), GEPASI, COptions::getValue(), importSBML(), importSEDML(), CDirEntry::isRelativePath(), loadModel(), CDirEntry::makePathAbsolute(), mData, CDataModel::CContent::mReferenceDir, CDataModel::CContent::mSaveFileName, CDirEntry::normalize(), OMEX, openCombineArchive(), SBML, SEDML, CDirEntry::Separator, and CDirEntry::suffix().
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
const | std::string & content |
std::string | referenceDir = pwd() |
CProcessReport | *pProcessReport = NULL |
const | bool & 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.
bool CDataModel::loadModel | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport, | ||
const bool & | deleteOldData = true |
||
) |
References CDirEntry::baseName(), COPASI, deleteOldData(), CDirEntry::dirName(), fatalError, CDirEntry::fileName(), CLocaleString::fromUtf8(), GEPASI, COptions::getValue(), CDirEntry::isRelativePath(), loadModel(), CDirEntry::makePathAbsolute(), CDataModel::CContent::mContentType, mData, CDataModel::CContent::mReferenceDir, CDataModel::CContent::mSaveFileName, CDirEntry::normalize(), CCopasiMessage::RAW, CDirEntry::Separator, and CDirEntry::suffix().
bool CDataModel::loadModel | ( | std::istream & | in, |
const std::string & | pwd, | ||
CProcessReport * | pProcessReport, | ||
const bool & | deleteOldData = true |
||
) |
References CDataContainer::add(), CCopasiMessage::clearDeque(), commonAfterLoad(), COPASI, deleteOldData(), CCopasiMessage::ERROR, CCopasiXML::freeGUI(), CCopasiXML::freeLayoutList(), CCopasiXML::freeModel(), CCopasiXML::freePlotList(), CCopasiXML::freeReportList(), CCopasiXML::freeTaskList(), GEPASI, CRootContainer::getFunctionList(), CCopasiXML::getLayoutList(), CCopasiXML::getModel(), CCopasiXML::getPlotList(), CCopasiXML::getReportList(), CCopasiXML::getTaskList(), CReadConfig::getVersion(), CModel::load(), CSteadyStateTask::load(), CTrajectoryTask::load(), CCopasiXML::load(), CDataModel::CContent::mContentType, MCXML, mData, CDataModel::CContent::mReferenceDir, CDataModel::CContent::mWithGUI, newModel(), CDataModel::CContent::pGUI, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, popData(), CDataModel::CContent::pPlotDefinitionList, CDataModel::CContent::pReportDefinitionList, CDataModel::CContent::pTaskList, pushData(), CCopasiXML::setDatamodel(), CRegisteredCommonName::setEnabled(), CCopasiXML::setFunctionList(), and CCopasiXML::setGUI().
Referenced by addModel(), loadFromFile(), loadFromString(), loadModel(), loadModelParameterSets(), openCombineArchive(), Copasi2SBMLTranslator::translateFileToSBML(), and Copasi2SBMLTranslator::translateToSBML().
bool CDataModel::loadModelParameterSets | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport = NULL |
||
) |
References CDataVectorN< CType >::add(), CRootContainer::addDatamodel(), C_INT32, CDataVectorN< CType >::createUniqueName(), CModelParameterSet::diff(), CDataObject::getCN(), CRootContainer::getDatamodelList(), getModel(), CModelEntity::getModel(), CModel::getModelParameterSets(), CDataObject::getObjectName(), CModelParameter::Identical, loadModel(), CCore::ParticleNumbers, CRootContainer::removeDatamodel(), replaceCnInGroup(), CDataObject::setObjectName(), and CDataVector< CType >::size().
bool CDataModel::newModel | ( | CProcessReport * | pProcessReport, |
const bool & | deleteOldData | ||
) |
References commonAfterLoad(), COPASI, deleteOldData(), CDataModel::CContent::mContentType, mData, pushData(), and CRegisteredCommonName::setEnabled().
Referenced by CDataModel(), loadModel(), and openCombineArchive().
bool CDataModel::openCombineArchive | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport = NULL , |
||
const bool & | deleteOldData = true , |
||
const SedmlImportOptions * | pOptions = NULL |
||
) |
References addMessages(), CDataVector< CType >::begin(), changed(), CDirEntry::createDir(), CDirEntry::createTmpName(), deleteOldData(), CDirEntry::dirName(), CDataVector< CType >::end(), CCopasiMessage::ERROR, CDirEntry::exist(), CDirEntry::fileName(), CFitProblem::getCrossValidationSet(), CExperimentSet::getExperiment(), CExperimentSet::getExperimentCount(), CFitProblem::getExperimentSet(), CExperiment::getFileNameOnly(), CCopasiMessage::getLastMessage(), CDataObject::getObjectName(), getTaskList(), COptions::getValue(), importSBML(), importSEDML(), CDirEntry::isRelativePath(), CDirEntry::isWritable(), loadModel(), CDirEntry::makePathAbsolute(), mData, mNeedToSaveExperimentalData, CDataModel::CContent::mSaveFileName, CDataModel::CContent::mSBMLFileName, CDataModel::CContent::mSEDMLFileName, mTempFolders, newModel(), CTaskEnum::parameterFitting, CDirEntry::remove(), CCopasiMessage::size(), CTaskEnum::TaskName, and CCopasiMessage::WARNING.
Referenced by loadFromFile(), and loadFromString().
|
protected |
References mData, mOldData, CDataModel::CContent::mWithGUI, CDataModel::CContent::pGUI, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, CDataModel::CContent::pPlotDefinitionList, CDataModel::CContent::pReportDefinitionList, and CDataModel::CContent::pTaskList.
Referenced by importSBML(), importSBMLFromString(), importSEDML(), importSEDMLFromString(), and loadModel().
|
protected |
References mData, mOldData, CDataModel::CContent::mWithGUI, CDataModel::CContent::pCurrentSEDMLDocument, CDataModel::CContent::pGUI, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, CDataModel::CContent::pPlotDefinitionList, CDataModel::CContent::pReportDefinitionList, and CDataModel::CContent::pTaskList.
Referenced by importSBML(), importSBMLFromString(), importSEDML(), importSEDMLFromString(), loadModel(), and newModel().
CUndoData::CChangeSet CDataModel::recordData | ( | const CUndoData & | data | ) |
References CUndoData::empty(), mData, CDataModel::CContent::mpUndoStack, and CUndoStack::record().
bool CDataModel::removeLayout | ( | const std::string & | key | ) |
|
protected |
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.
fileName | the fileName of the ini file |
References changeModelParameter(), CModel::compileIfNecessary(), findObjectByDisplayName(), getModel(), ResultParser::saveToDouble(), CModel::setCompileFlag(), and ResultParser::trim().
|
protected |
Referenced by loadModelParameterSets().
bool CDataModel::saveModel | ( | const std::string & | fileName, |
CProcessReport * | pProcessReport, | ||
bool | overwriteFile = false , |
||
const bool & | autoSave = false |
||
) |
References autoSave(), changed(), CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), copyExperimentalDataTo(), CDirEntry::createTmpName(), CDirEntry::dirName(), CCopasiMessage::ERROR, CDirEntry::exist(), CDirEntry::fileName(), CModel::getActiveModelParameterSet(), COptions::getValue(), CDirEntry::isRelativePath(), CDirEntry::isWritable(), CDirEntry::makePathAbsolute(), MCDirEntry, mData, mNeedToSaveExperimentalData, CDirEntry::move(), CDataModel::CContent::mReferenceDir, CDataModel::CContent::mSaveFileName, CDirEntry::normalize(), CDataModel::CContent::pGUI, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, CDataModel::CContent::pPlotDefinitionList, CDataModel::CContent::pReportDefinitionList, CDataModel::CContent::pTaskList, CModelParameterSet::refreshFromModel(), CDirEntry::remove(), CCopasiXML::setDatamodel(), CCopasiXML::setGUI(), CCopasiXML::setLayoutList(), CCopasiXML::setModel(), CCopasiXML::setPlotList(), CCopasiXML::setReportList(), and CCopasiXML::setTaskList().
Referenced by autoSave(), and Copasi2SBMLTranslator::translate().
bool CDataModel::saveModelParameterSets | ( | const std::string & | fileName | ) |
std::string CDataModel::saveModelToString | ( | CProcessReport * | pProcessReport = NULL | ) |
References CCopasiMessage::clearDeque(), CModel::compileIfNecessary(), CModel::getActiveModelParameterSet(), COptions::getValue(), mData, CDataModel::CContent::pGUI, CDataModel::CContent::pListOfLayouts, CDataModel::CContent::pModel, CDataModel::CContent::pPlotDefinitionList, CDataModel::CContent::pReportDefinitionList, CDataModel::CContent::pTaskList, CModelParameterSet::refreshFromModel(), CCopasiXML::save(), CCopasiXML::setDatamodel(), CCopasiXML::setGUI(), CCopasiXML::setLayoutList(), CCopasiXML::setModel(), CCopasiXML::setPlotList(), CCopasiXML::setReportList(), and CCopasiXML::setTaskList().
Referenced by addCopasiFileToArchive().
void CDataModel::setFileName | ( | const std::string & | fileName | ) |
References mData, and CDataModel::CContent::mSaveFileName.
bool CDataModel::setSBMLFileName | ( | const std::string & | fileName | ) |
bool CDataModel::setSEDMLFileName | ( | const std::string & | fileName | ) |
|
virtual |
Retrieve the data describing the object
Reimplemented from CDataContainer.
References fatalError.
|
static |
String representation of the valid model types.
|
protected |
Referenced by addDefaultReports(), addDefaultTasks(), addReport(), addTask(), appendDependentTasks(), applyData(), autoSave(), changed(), commonAfterLoad(), exportMathModel(), exportMathModelToString(), exportSBML(), exportSBMLToString(), exportSEDML(), exportSEDMLToString(), getContentType(), getCopasi2SBMLMap(), getCopasi2SEDMLMap(), getCurrentSBMLDocument(), getCurrentSEDMLDocument(), getDefaultFileName(), getFileName(), getGUI(), getListOfLayouts(), getModel(), getPlotDefinitionList(), getReferenceDirectory(), getReportDefinitionList(), getSBMLFileName(), getSEDMLFileName(), getTaskList(), getUndoStack(), importSBML(), importSBMLFromString(), importSEDML(), importSEDMLFromString(), isChanged(), loadFromFile(), loadFromString(), loadModel(), newModel(), openCombineArchive(), popData(), pushData(), recordData(), removeLayout(), saveModel(), saveModelToString(), setFileName(), setSBMLFileName(), setSEDMLFileName(), and ~CDataModel().
std::set< const CDataObject * > CDataModel::mLastAddedObjects |
Referenced by addModel().
|
protected |
Referenced by openCombineArchive(), and saveModel().
|
protected |
|
protected |
Referenced by CDataModel(), and commonAfterLoad().
|
protected |
Referenced by openCombineArchive(), and ~CDataModel().
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().