COPASI API  4.16.103
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | List of all members
CCopasiRootContainer Class Reference

#include <CCopasiRootContainer.h>

Inheritance diagram for CCopasiRootContainer:
Inheritance graph
[legend]
Collaboration diagram for CCopasiRootContainer:
Collaboration graph
[legend]

Public Member Functions

virtual ~CCopasiRootContainer ()
 
- Public Member Functions inherited from CCopasiContainer
virtual bool add (CCopasiObject *pObject, const bool &adopt=true)
 
 CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container)
 
 CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL)
 
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
virtual const objectMapgetObjects () const
 
virtual std::string getUnits () const
 
virtual const CCopasiObjectgetValueObject () const
 
virtual bool remove (CCopasiObject *pObject)
 
virtual ~CCopasiContainer ()
 
- Public Member Functions inherited from CCopasiObject
void addDirectDependency (const CCopasiObject *pObject)
 
 CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL)
 
void clearDirectDependencies ()
 
void clearRefresh ()
 
bool dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const
 
void getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const
 
virtual CCopasiObjectName getCN () const
 
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
virtual const std::string & getKey () const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () const
 
virtual voidgetValuePointer () const
 
bool hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const
 
bool hasUpdateMethod () const
 
bool isArray () const
 
bool isContainer () const
 
bool isDataModel () const
 
bool isMatrix () const
 
bool isNameVector () const
 
bool isNonUniqueName () const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const
 
bool isReference () const
 
bool isRoot () const
 
bool isSeparator () const
 
bool isStaticString () const
 
bool isValueBool () const
 
bool isValueDbl () const
 
bool isValueInt () const
 
bool isValueInt64 () const
 
bool isValueString () const
 
bool isVector () const
 
virtual bool mustBeDeleted (const DataObjectSet &deletedObjects) const
 
virtual void print (std::ostream *ostream) const
 
void removeDirectDependency (const CCopasiObject *pObject)
 
void setDirectDependencies (const DataObjectSet &directDependencies)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CCopasiContainer *pParent)
 
void setObjectValue (const C_FLOAT64 &value)
 
void setObjectValue (const C_INT32 &value)
 
void setObjectValue (const bool &value)
 
template<class CType >
void setRefresh (CType *pType, void(CType::*method)(void))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const bool &))
 
virtual ~CCopasiObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
virtual ~CObjectInterface ()
 

Static Public Member Functions

static CCopasiDataModeladdDatamodel ()
 
static void destroy ()
 
static CConfigurationFilegetConfiguration ()
 
static CCopasiVector
< CCopasiDataModel > * 
getDatamodelList ()
 
static CFunctionDBgetFunctionList ()
 
static CKeyFactorygetKeyFactory ()
 
static const char * getLicenseHTML ()
 
static const char * getLicenseTxt ()
 
static const CCopasiContainergetRoot ()
 
static CFunctiongetUndefinedFunction ()
 
static const CMIRIAMResourcegetUnknownMiriamResource ()
 
static void init (int argc, char *argv[], const bool &withGui=false)
 
static bool removeDatamodel (const CCopasiDataModel *pDatamodel)
 
static bool removeDatamodel (const unsigned C_INT32 index)
 
- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
 
static void setRenameHandler (CRenameHandler *rh)
 

Protected Attributes

CKeyFactory mKeyFactory
 
CConfigurationFilempConfiguration
 
CCopasiVector< CCopasiDataModel > * mpDataModelList
 
CFunctionDBmpFunctionList
 
CFunctionmpUndefined
 
CMIRIAMResourcempUnknownResource
 
bool mWithGUI
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 

Private Member Functions

 CCopasiRootContainer (const bool &withGUI=false)
 
 CCopasiRootContainer (const CCopasiRootContainer &src)
 
void initializeChildren ()
 
CCopasiRootContaineroperator= (const CCopasiRootContainer &src)
 

Additional Inherited Members

- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
objectMap
 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
DataObjectSet
 
typedef std::vector< Refresh * > DataUpdateSequence
 
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
ObjectSet
 
typedef std::vector
< CObjectInterface * > 
UpdateSequence
 
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
EmptyList
 
- Protected Types inherited from CCopasiObject
enum  Flag {
  Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8,
  Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80,
  ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800,
  Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000,
  Root = 0x10000, Gui = 0x20000
}
 
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
void initObjects ()
 
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

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 CCopasiRootContainer 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.

Definition at line 41 of file CCopasiRootContainer.h.

Constructor & Destructor Documentation

CCopasiRootContainer::CCopasiRootContainer ( const bool &  withGUI = false)
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.

Definition at line 35 of file CCopasiRootContainer.cpp.

Referenced by init().

35  :
36  CCopasiContainer("Root", NULL, "CN", CCopasiObject::Root),
37  mKeyFactory(),
38  mpUnknownResource(NULL),
39  mpFunctionList(NULL),
40  mpConfiguration(NULL),
41  mpDataModelList(NULL),
42  mWithGUI(withGUI),
43  mpUndefined(NULL)
44 {}
CMIRIAMResource * mpUnknownResource
CCopasiVector< CCopasiDataModel > * mpDataModelList
CConfigurationFile * mpConfiguration
CCopasiRootContainer::CCopasiRootContainer ( const CCopasiRootContainer src)
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.

Parameters
constCCopasiRootContainer & src
CCopasiRootContainer::~CCopasiRootContainer ( )
virtual

Definition at line 47 of file CCopasiRootContainer.cpp.

References mpConfiguration, mpDataModelList, mpFunctionList, mpUndefined, mpUnknownResource, mWithGUI, pdelete, and CConfigurationFile::save().

48 {
49  // save and delete the configuration
50  if (mpConfiguration != NULL &&
51  mWithGUI)
52  {
54  }
55 
56  // delete the configuration
58 
59  // delete the unkown resource
61 
62  // delete the model list
64 
65  // delete the function list
67 
68  // delete the undefined and the unsupported delay function
70 
71  // delete other static variables
73 }
#define pdelete(p)
Definition: copasi.h:215
CMIRIAMResource * mpUnknownResource
CCopasiVector< CCopasiDataModel > * mpDataModelList
CCopasiVector< CLGlobalRenderInformation > * DEFAULT_STYLES
CConfigurationFile * mpConfiguration

Member Function Documentation

CCopasiDataModel * CCopasiRootContainer::addDatamodel ( )
static

Creates a new datamodel instance and adds it to the list. The new instance is returned by the method.

Definition at line 149 of file CCopasiRootContainer.cpp.

References CCopasiVector< T >::add(), mpDataModelList, and mWithGUI.

Referenced by Arguments::handleCommandLine(), main(), test000022::setUp(), test000030::setUp(), test000046::setUp(), test000047::setUp(), test000031::setUp(), test000048::setUp(), test000049::setUp(), test000023::setUp(), test000032::setUp(), test000050::setUp(), test000051::setUp(), test000033::setUp(), test000052::setUp(), test000090::setUp(), test000024::setUp(), test000034::setUp(), test000054::setUp(), test000055::setUp(), test000035::setUp(), test000056::setUp(), test000057::setUp(), test000025::setUp(), test000036::setUp(), test_compare_utilities::setUp(), test000037::setUp(), test000021::setUp(), test000026::setUp(), test000038::setUp(), test000039::setUp(), test000027::setUp(), test000040::setUp(), test000041::setUp(), test000028::setUp(), test000042::setUp(), test000043::setUp(), test000029::setUp(), test000044::setUp(), test000045::setUp(), test000072::setUp(), test000078::setUp(), test000079::setUp(), test000080::setUp(), test000091::setUp(), test000093::setUp(), test000073::setUp(), test000074::setUp(), test000068::setUp(), test000070::setUp(), test000071::setUp(), test000069::setUp(), test000075::setUp(), test000089::setUp(), test000094::setUp(), test000065::setUp(), test000067::setUp(), test000088::setUp(), test000062::setUp(), test000061::setUp(), test000103::setUp(), test000060::setUp(), test000076::setUp(), test000104::setUp(), test000081::setUp(), test000053::setUp(), test000102::setUp(), test000099::setUp(), test000098::setUp(), test000100::setUp(), test000087::setUp(), test000058::setUp(), test000101::setUp(), test000066::setUp(), test000092::setUp(), test000063::setUp(), test000077::setUp(), test000095::setUp(), test000097::setUp(), test000082::setUp(), test000086::setUp(), test000059::setUp(), test000064::setUp(), test000083::setUp(), test000085::setUp(), test000084::setUp(), stress_test::stress_test(), Copasi2SBMLTranslator::translate(), Copasi2SBMLTranslator::translateFileToSBML(), and Copasi2SBMLTranslator::translateToSBML().

150 {
152  pRootContainer->mpDataModelList->add(pDataModel, true);
153  return pDataModel;
154 }
CCopasiVector< CCopasiDataModel > * mpDataModelList
virtual bool add(const CType &src)
CCopasiRootContainer * pRootContainer
void CCopasiRootContainer::destroy ( )
static

Definition at line 92 of file CCopasiRootContainer.cpp.

References COptions::cleanup(), pdelete, pRootContainer, and CFunctionParameterMap::pUnmappedObject.

Referenced by main(), test_simplify::tearDown(), test_depth_first_iterator::tearDown(), test_compare_utilities::tearDown(), test000026::tearDown(), test000034::tearDown(), test000050::tearDown(), test000051::tearDown(), test000035::tearDown(), test000052::tearDown(), test000027::tearDown(), test000036::tearDown(), test000054::tearDown(), test000090::tearDown(), test000055::tearDown(), test000037::tearDown(), test000056::tearDown(), test000057::tearDown(), test000028::tearDown(), test000038::tearDown(), test000039::tearDown(), test000022::tearDown(), test000023::tearDown(), test000040::tearDown(), test000029::tearDown(), test000041::tearDown(), test000021::tearDown(), test000024::tearDown(), test000030::tearDown(), test000042::tearDown(), test000043::tearDown(), test000031::tearDown(), test000044::tearDown(), test000045::tearDown(), test000025::tearDown(), test000032::tearDown(), test000046::tearDown(), test000047::tearDown(), test000033::tearDown(), test000048::tearDown(), test000049::tearDown(), test000072::tearDown(), test000091::tearDown(), test000093::tearDown(), test000068::tearDown(), test000069::tearDown(), test000080::tearDown(), test000070::tearDown(), test000078::tearDown(), test000074::tearDown(), test000071::tearDown(), test000073::tearDown(), test000079::tearDown(), test000075::tearDown(), test000089::tearDown(), test000094::tearDown(), test000065::tearDown(), test000067::tearDown(), test000062::tearDown(), test000088::tearDown(), test000103::tearDown(), test000060::tearDown(), test000061::tearDown(), test000076::tearDown(), test000104::tearDown(), test000053::tearDown(), test000081::tearDown(), test000098::tearDown(), test000102::tearDown(), test000099::tearDown(), test000100::tearDown(), test000087::tearDown(), test000058::tearDown(), test000096::tearDown(), test000101::tearDown(), test000066::tearDown(), test000092::tearDown(), test000063::tearDown(), test000077::tearDown(), test000095::tearDown(), test000097::tearDown(), test_biomodels217_expression::tearDown(), test000082::tearDown(), test000086::tearDown(), test000059::tearDown(), test000064::tearDown(), test000084::tearDown(), test000083::tearDown(), test000085::tearDown(), and stress_test::~stress_test().

93 {
94  if (pRootContainer != NULL)
95  {
96  delete pRootContainer;
97  pRootContainer = NULL;
98  }
99 
101 
103 }
#define pdelete(p)
Definition: copasi.h:215
static void cleanup()
Definition: COptions.cpp:243
CCopasiRootContainer * pRootContainer
static CCopasiObject * pUnmappedObject
CConfigurationFile * CCopasiRootContainer::getConfiguration ( )
static
CCopasiVector< CCopasiDataModel > * CCopasiRootContainer::getDatamodelList ( )
static

Returns a pointer to the list of data models.

Definition at line 143 of file CCopasiRootContainer.cpp.

References mpDataModelList.

Referenced by CQReportDefinitionSelect::accept(), CQPlotSubwidget::addCurve2D(), SliderDialog::addSlider(), CopasiUI3Window::autoSave(), SliderSettingsDialog::browseButtonPressed(), CQReportDefinition::btnItemClicked(), CQReportDefinition::btnNewReportClicked(), DataModelGUI::buildChangedObjects(), CQTrajectoryWidget::checkTimeSeries(), TaskWidget::commonAfterRunTask(), TaskWidget::commonRunTask(), COutputHandlerPlot::compile(), CQMessageBox::confirmDelete(), CopasiUI3Window::CopasiUI3Window(), CQValidatorExpression::CQValidatorExpression(), CQValidatorFunction::CQValidatorFunction(), CQGLNetworkPainter::createDataSets(), CQLayoutsWidget::createLayoutWindow(), DataModelGUI::createModel(), SliderDialog::createNewSlider(), CQReportDM::data(), CQPlotDM::data(), CQReactionDM::data(), CQEventDM::data(), CQGlobalQuantityDM::data(), CQCompartmentDM::data(), CQSpecieDM::data(), DataModelGUI::DataModelGUI(), CQPlotSubwidget::deletePlot(), CQLayoutsWidget::deleteSelectedLayouts(), CQTSSAResultSubWidget::displayResult(), SliderDialog::editSlider(), CQOptimizationResult::enterProtected(), CQFittingResult::enterProtected(), CQTSSAResultWidget::enterProtected(), CQSensResultWidget::enterProtected(), CQLayoutsWidget::enterProtected(), SliderDialog::equivalentSliderExists(), DataModelGUI::exportMathModelRun(), exportSBML(), DataModelGUI::exportSBMLRun(), DataModelGUI::exportSBMLToStringRun(), fillItemFromImage(), ReactionsWidget1::FillWidgetFromRI(), CQSpecieDM::flags(), SliderDialog::getCSlidersForObject(), CQExpressionWidget::getExpression(), Arguments::getFirstScheduledTask(), CCopasiSelectionDialog::getObjectSingle(), CCopasiSelectionDialog::getObjectVector(), SliderDialog::getTaskForFolderId(), Arguments::getTaskForName(), CQReactionDM::headerData(), CQCompartmentDM::headerData(), CQSpecieDM::headerData(), DataModelGUI::importCellDesigner(), DataModelGUI::importSBMLFinished(), CopasiUI3Window::importSBMLFromString(), DataModelGUI::importSBMLFromStringFinished(), DataModelGUI::importSBMLFromStringRun(), DataModelGUI::importSBMLRun(), CQTSSAResultSubWidget::init(), CQReportDM::insertRows(), CQPlotDM::insertRows(), CQReactionDM::insertRows(), CQEventDM::insertRows(), CQGlobalQuantityDM::insertRows(), CQCompartmentDM::insertRows(), CQSpecieDM::insertRows(), CQParameterOverviewWidget::leave(), FunctionWidget1::leave(), DataModelGUI::linkDataModelToGUI(), CQMoietiesTaskResult::load(), CScanWidgetRandom::load(), CScanWidgetScan::load(), CQCompartment::load(), CQExpandModelData::load(), CQMergingData::load(), StateSubwidget::loadAll(), CLNAResultWidget::loadFromBackend(), CMCAResultWidget::loadFromBackend(), CQTSSAResultWidget::loadFromBackend(), CQLyapResultWidget::loadFromBackend(), Curve2DWidget::LoadFromCurveSpec(), BandedGraphWidget::LoadFromCurveSpec(), HistoWidget::LoadFromCurveSpec(), ReactionsWidget1::loadFromReaction(), CQMathMatrixWidget::loadMatrices(), DataModelGUI::loadModelFinished(), DataModelGUI::loadModelRun(), CQMCAWidget::loadParameterTable(), CQLNAWidget::loadParameterTable(), FunctionWidget1::loadParameterTable(), CQReportDefinitionSelect::loadReportDefinitionVector(), CQSteadyStateResult::loadResult(), CQLayoutMainWindow::loadSBMLFile(), CQExperimentData::loadTable(), CQLyapWidget::loadTask(), ScanWidget::loadTask(), SensitivitiesWidget::loadTask(), CQTrajectoryWidget::loadTask(), CQUpdatesWidget::loadWidget(), main(), CopasiUI3Window::newDoc(), CQSensResultWidget::newResult(), CQSimpleSelectionTree::populateTree(), Arguments::prepareModel(), CCSPMethod::printResult(), CQSpeciesWidget::refreshCompartments(), DataModelGUI::refreshInitialValues(), CQReportListItem::refreshText(), removeDatamodel(), CFunctionDB::removeFunction(), CQFunctionDM::removeRows(), CQReportDM::removeRows(), CQPlotDM::removeRows(), CQReactionDM::removeRows(), CQEventDM::removeRows(), CQGlobalQuantityDM::removeRows(), CQCompartmentDM::removeRows(), CQSpecieDM::removeRows(), SliderDialog::removeSlider(), CQReportDM::rowCount(), CQPlotDM::rowCount(), CQReactionDM::rowCount(), CQEventDM::rowCount(), CQGlobalQuantityDM::rowCount(), CQCompartmentDM::rowCount(), CQSpecieDM::rowCount(), SliderDialog::runCrossSectionTask(), SliderDialog::runLNATask(), SliderDialog::runMCATask(), SliderDialog::runOptimizationTask(), SliderDialog::runParameterEstimationTask(), SliderDialog::runScanTask(), CQTSSAWidget::runTask(), SliderDialog::runTimeCourse(), CQReportDefinition::save(), CQCompartment::save(), CQModelValue::save(), CQTSSAResultSubWidget::saveDataToFile(), DataModelGUI::saveModelRun(), CQLNAWidget::saveParameterTable(), CQMCAWidget::saveParameterTable(), CQLyapWidget::saveTask(), CQMCAWidget::saveTask(), CQLNAWidget::saveTask(), CQFittingWidget::saveTask(), CQOptimizationWidget::saveTask(), CQTrajectoryWidget::saveTask(), CQEventWidget1::saveToEvent(), CQSensResultWidget::saveToFile(), ReactionsWidget1::saveToReaction(), CQPlotSubwidget::selectPlotItem(), CQReportDM::setData(), CQPlotDM::setData(), CQReactionDM::setData(), CQEventDM::setData(), CQGlobalQuantityDM::setData(), CQCompartmentDM::setData(), CQSpecieDM::setData(), ListViews::setDataModel(), CQReactionDM::setEquation(), CQExpressionWidget::setExpression(), SliderDialog::sliderObjectChanged(), CopasiUI3Window::slotApplyInitialState(), CQPlotsWidget::slotBtnActivateAllClicked(), CQPlotsWidget::slotBtnDeactivateAllClicked(), ReactionsWidget1::slotBtnDelete(), CQCompartment::slotBtnDelete(), CQModelValue::slotBtnDelete(), CQEventWidget1::slotBtnDelete(), ReactionsWidget1::slotBtnNew(), CQSpeciesDetail::slotBtnNew(), CQCompartment::slotBtnNew(), CQModelValue::slotBtnNew(), CQEventWidget1::slotBtnNew(), CQLayoutsWidget::slotBtnNewClicked(), CopasiUI3Window::slotCheckModel(), CopasiUI3Window::slotConvertToIrreversible(), DefaultPlotDialog::slotCreate(), CQMoietiesTaskResult::slotCreateGlobalQuantity(), CQPlotsWidget::slotDoubleClicked(), CQReactionsWidget::slotDoubleClicked(), CQReportsWidget::slotDoubleClicked(), CQEventsWidget::slotDoubleClicked(), CQCompartmentsWidget::slotDoubleClicked(), CQGlobalQuantitiesWidget::slotDoubleClicked(), CQSpeciesWidget::slotDoubleClicked(), CQReportDefinitionSelect::slotEdit(), CopasiUI3Window::slotExportMathModel(), CopasiUI3Window::slotExportSBML(), CopasiUI3Window::slotFileOpen(), CopasiUI3Window::slotFileOpenFinished(), CopasiUI3Window::slotFileSave(), CopasiUI3Window::slotFileSaveFinished(), CopasiUI3Window::slotImportSBML(), CopasiUI3Window::slotImportSBMLFinished(), CopasiUI3Window::slotImportSBMLFromStringFinished(), ListViews::slotNotify(), CopasiUI3Window::slotQuit(), CLNAResultSubwidget::slotSave(), CMCAResultSubwidget::slotSave(), CQLayoutsWidget::slotShowLayout(), CQExperimentData::slotTypeChanged(), CopasiUI3Window::slotUpdateInitialState(), CQDifferentialEquations::slotUpdateWidget(), StateSubwidget::update(), CQTrajectoryWidget::updateIntervals(), CQMiriamWidget::updateResourcesList(), CopasiUI3Window::updateTitle(), and validate().

144 {
146 }
CCopasiVector< CCopasiDataModel > * mpDataModelList
CCopasiRootContainer * pRootContainer
CFunctionDB * CCopasiRootContainer::getFunctionList ( )
static

Returns a pointer to the global function database.

Definition at line 137 of file CCopasiRootContainer.cpp.

References mpFunctionList.

Referenced by CCopasiXML::buildFunctionList(), CEvaluationNodeCall::calls(), CSBMLExporter::checkForPiecewiseFunctions(), CSBMLExporter::collectIds(), CEvaluationNodeCall::compile(), CFunction::completeFunctionList(), CQMessageBox::confirmDelete(), CModel::convert2NonReversible(), CSBMLExporter::createEvent(), CSBMLExporter::createFunctionDefinitions(), CSBMLExporter::createInitialAssignment(), CSBMLExporter::createRule(), CQFunctionDM::data(), COptProblem::elevateChildren(), CSBMLExporter::exportEventAssignments(), CODEExporterC::exportSingleFunction(), CODEExporter::exportSingleFunction(), SBMLImporter::findFunctionCalls(), CODEExporter::findFunctionsCalls(), CEvaluationNodeCall::getCalledTree(), CReactionInterface::getListOfPossibleFunctions(), SEDMLImporter::importFirstSBMLModel(), CCopasiDataModel::importSBML(), CCopasiDataModel::importSBMLFromString(), CQFunctionDM::insertRows(), CQFunctionDM::isFunctionReadOnly(), FunctionWidget1::leave(), CQBrowserPaneDM::load(), CModel::load(), DataModelGUI::loadFunctionDB(), CCopasiDataModel::loadModel(), CODEExporter::modifyTreeForMassAction(), stress_test::normalizeFunctionDB(), CCopasiDataModel::ObjectFromCN(), CQFunctionDM::removeRows(), CCopasiDataModel::removeSBMLIdFromFunctions(), SBMLImporter::removeUnusedFunctions(), CQFunctionDM::rowCount(), DataModelGUI::saveFunctionDB(), CQFunctionDM::setData(), CODEExporterC::setExportNameOfFunction(), CQExpressionWidget::setExpression(), CReaction::setFunction(), CReactionInterface::setFunctionAndDoMapping(), CSBMLExporter::setFunctionSBMLIds(), CReactionInterface::setFunctionWithEmptyMapping(), FunctionWidget1::slotBtnDelete(), FunctionWidget1::slotBtnNew(), CQFunctionsWidget::slotDoubleClicked(), ReactionsWidget1::slotNewFunction(), test000058::test_bug1025_10(), test000058::test_bug1025_5(), test000067::test_bug1060(), test_compare_utilities::test_copasi_function_expansion(), test000075::test_import_time_dependent_function_definition(), test000078::test_l2v4_import_unordered_functions(), test000059::test_unique_id_17(), test000059::test_unique_id_18(), test000059::test_unique_id_19(), test000059::test_unique_id_20(), test000059::test_unique_id_21(), test000059::test_unique_id_21_2(), and CEvaluationNodeCall::toAST().

138 {
140 }
CCopasiRootContainer * pRootContainer
CKeyFactory * CCopasiRootContainer::getKeyFactory ( )
static

Returns a pointer to the KeyFactory.

Definition at line 163 of file CCopasiRootContainer.cpp.

References mKeyFactory.

Referenced by CModelAdd::addCompartmentsExpressions(), CModelAdd::addMetabolitesExpressions(), CModelAdd::addModelValuesExpressions(), CModel::applyActiveParameterSet(), CQReportDefinition::btnCopyReportClicked(), CCompartment::CCompartment(), CEvent::CEvent(), CFunction::CFunction(), CModelAnalyzer::checkReaction(), CLColorDefinition::CLColorDefinition(), COutputDefinitionVector::cleanup(), CReportDefinitionVector::cleanup(), CReportDefinition::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(), CMetab::CMetab(), CModelEntity::CModelEntity(), CQPlotSubwidget::commitPlot(), CEventAssignment::compile(), CReaction::compile(), CFunctionAnalyzer::constructCallParametersActualValues(), CModelExpansion::SetOfModelElements::contains(), CModelAdd::copyDelayExpression(), CModelAdd::copyEventAssignmentExpression(), CModelAdd::copyExpression(), CModelAdd::copyInitialExpression(), CQPlotSubwidget::copyPlot(), CModelAdd::copyTriggerExpression(), CReaction::CReaction(), CModelParameterSet::createFromModel(), CSBMLExporter::createKineticExpression(), CSBMLExporter::createKineticLaw(), CModelExpansion::createLinearArray(), CSBMLExporter::createMassActionExpression(), CMMLOutput::createParameterMapping(), CModelExpansion::createRectangularArray(), CQEventDM::data(), CEvent::deleteAssignment(), CQPlotSubwidget::deletePlot(), CModelExpansion::duplicateReaction(), CCopasiXMLParser::COPASIElement::end(), CopasiWidget::enter(), CQModelValue::enterProtected(), CQEventWidget1::enterProtected(), CQRDFTreeView::enterProtected(), FunctionWidget1::enterProtected(), CQNotes::enterProtected(), CModelExpansion::ElementsMap::exists(), CSBMLExporter::exportEventAssignments(), CODEExporter::exportKineticFunction(), CODEExporterC::exportTitleData(), FunctionWidget1::functionParametersChanged(), CFitItem::getCrossValidations(), CReactionInterface::getDeletedParameters(), CMetabNameInterface::getDisplayName(), CModelExpansion::ElementsMap::getDuplicateKey(), CObjectLists::getEventTargets(), CFitItem::getExperiments(), CLTextGlyph::getGraphicalObject(), CObjectLists::getListOfConstObjects(), CLMetabReferenceGlyph::getMetabGlyph(), CChemEqElement::getMetabolite(), CLGraphicalObject::getModelObject(), CQModelElementTreeWidgetItem::getObject(), CQSideCompoundWizardPage::CQListWidgetModelItem::getObject(), CTimeSeries::getSBMLId(), CLNAProblem::getSubTask(), CMCAProblem::getSubTask(), CLReferenceGlyph::getTargetGlyph(), CLabel::getText(), CLGraphicalObject::hasValidModelReference(), CSBMLExporter::hasVolumeAssignment(), CReactionInterface::initFromReaction(), CExperiment::initializeParameter(), CModel::initObjects(), CSBMLExporter::isEventAssignmentSBMLCompatible(), CSBMLExporter::isEventSBMLCompatible(), CExperimentSet::keyToIndex(), CODEExporterC::KineticFunction2ODEmember(), FunctionWidget1::leave(), CQNotes::leave(), CQTabWidget::load(), CMIRIAMInfo::load(), CQEventWidget1::loadFromEvent(), CReactionInterface::loadMappingAndValues(), CQFittingItemWidget::loadSelection(), ScanWidget::loadTask(), SensitivitiesWidget::loadTask(), SteadyStateWidget::loadTask(), CModelMerging::mergeInExpression(), SBMLDocumentLoader::postprocessTextGlyph(), CModel::printParameterOverview(), CFitProblem::printResult(), CModelParameter::refreshFromModel(), CModel::removeCompartment(), CModel::removeEvent(), CFunctionDB::removeFunction(), CCopasiDataModel::removeLayout(), CModel::removeLocalReactionParameter(), CModel::removeMetabolite(), CModel::removeModelValue(), COutputDefinitionVector::removePlotSpec(), CModel::removeReaction(), CReportDefinitionVector::removeReportDefinition(), CQPlotSubwidget::resetPlot(), CQLNAWidget::runTask(), CQLyapWidget::runTask(), CQMCAWidget::runTask(), CQFittingWidget::runTask(), CQOptimizationWidget::runTask(), CQTabWidget::save(), CMIRIAMInfo::save(), ScanWidget::saveTask(), SensitivitiesWidget::saveTask(), SteadyStateWidget::saveTask(), CQFittingWidget::saveTask(), FunctionWidget1::saveToFunction(), ReactionsWidget1::saveToReaction(), CQNewMainWindow::selectReaction(), CSlider::setAssociatedEntityKey(), CQReactionDM::setEquation(), ReactionsWidget1::setFramework(), SBMLImporter::setInitialValues(), CChemEqElement::setMetabolite(), CQMiriamWidget::showEvent(), FunctionWidget1::slotBtnDelete(), ReactionsWidget1::slotBtnDelete(), CQFittingItemWidget::slotCrossValidationChanged(), CQParameterSetsWidget::slotDoubleClicked(), CQPlotsWidget::slotDoubleClicked(), CQReportsWidget::slotDoubleClicked(), CQReactionsWidget::slotDoubleClicked(), CQCompartmentsWidget::slotDoubleClicked(), CQEventsWidget::slotDoubleClicked(), CQFunctionsWidget::slotDoubleClicked(), CQGlobalQuantitiesWidget::slotDoubleClicked(), CQSpeciesWidget::slotDoubleClicked(), CQFittingItemWidget::slotExperimentChanged(), ReactionsWidget1::slotGotoFunction(), CQBrowserPaneDM::slotNotify(), CQExperimentData::slotOK(), CQFittingWidget::taskFinishedEvent(), test000075::test_import_time_dependent_function_definition(), test000087::test_simulate_reaction_flux_reference_1(), FunctionWidget1::update(), ReactionsWidget1::update(), CQLayoutScene::updatePosition(), ParameterTable::updateTable(), CReaction::variable2object(), CReactionInterface::writeBackToReaction(), 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(), and CSlider::~CSlider().

164 {
165  return &pRootContainer->mKeyFactory;
166 }
CCopasiRootContainer * pRootContainer
const char * CCopasiRootContainer::getLicenseHTML ( )
static

Definition at line 202 of file CCopasiRootContainer.cpp.

References CopasiLicenseHtml.

Referenced by CopasiUI3Window::license(), and CQSplashWidget::slotViewLicense().

203 {
204  return CopasiLicenseHtml;
205 }
const char * CopasiLicenseHtml
const char * CCopasiRootContainer::getLicenseTxt ( )
static

Definition at line 196 of file CCopasiRootContainer.cpp.

References CopasiLicenseTxt.

Referenced by main().

197 {
198  return CopasiLicenseTxt;
199 }
const char * CopasiLicenseTxt
const CCopasiContainer * CCopasiRootContainer::getRoot ( )
static

Retrieve the root container

Definition at line 125 of file CCopasiRootContainer.cpp.

References pRootContainer.

Referenced by CEvaluationNodeCall::compile(), ObjectBrowserWidget::loadData(), and CCopasiParameter::~CCopasiParameter().

126 {
127  return pRootContainer;
128 }
CCopasiRootContainer * pRootContainer
CFunction * CCopasiRootContainer::getUndefinedFunction ( )
static
const CMIRIAMResource & CCopasiRootContainer::getUnknownMiriamResource ( )
static

Definition at line 169 of file CCopasiRootContainer.cpp.

References mpUnknownResource.

Referenced by CMIRIAMResources::getMIRIAMResource().

170 {
172 }
CMIRIAMResource * mpUnknownResource
CCopasiRootContainer * pRootContainer
void CCopasiRootContainer::init ( int  argc,
char *  argv[],
const bool &  withGUI = false 
)
static

This method creates the only root container.

Definition at line 78 of file CCopasiRootContainer.cpp.

References CCopasiRootContainer(), COptions::init(), initializeChildren(), and CCopasiMessage::setIsGUI().

Referenced by Arguments::handleCommandLine(), main(), test_simplify::setUp(), test_depth_first_iterator::setUp(), test000022::setUp(), test000030::setUp(), test000046::setUp(), test000047::setUp(), test000031::setUp(), test000048::setUp(), test000049::setUp(), test000023::setUp(), test000032::setUp(), test000050::setUp(), test000051::setUp(), test000033::setUp(), test000052::setUp(), test000090::setUp(), test_compare_utilities::setUp(), test000034::setUp(), test000054::setUp(), test000055::setUp(), test000035::setUp(), test000056::setUp(), test000057::setUp(), test000036::setUp(), test000024::setUp(), test000037::setUp(), test000025::setUp(), test000021::setUp(), test000026::setUp(), test000038::setUp(), test000039::setUp(), test000027::setUp(), test000040::setUp(), test000041::setUp(), test000028::setUp(), test000042::setUp(), test000043::setUp(), test000029::setUp(), test000044::setUp(), test000045::setUp(), test000072::setUp(), test000078::setUp(), test000079::setUp(), test000080::setUp(), test000091::setUp(), test000093::setUp(), test000068::setUp(), test000069::setUp(), test000070::setUp(), test000073::setUp(), test000074::setUp(), test000071::setUp(), test000075::setUp(), test000089::setUp(), test000094::setUp(), test000065::setUp(), test000067::setUp(), test000088::setUp(), test000062::setUp(), test000060::setUp(), test000061::setUp(), test000103::setUp(), test000076::setUp(), test000081::setUp(), test000053::setUp(), test000104::setUp(), test000102::setUp(), test000098::setUp(), test000099::setUp(), test000100::setUp(), test000087::setUp(), test000058::setUp(), test000096::setUp(), test000101::setUp(), test000066::setUp(), test000092::setUp(), test000063::setUp(), test000077::setUp(), test000095::setUp(), test000097::setUp(), test_biomodels217_expression::setUp(), test000082::setUp(), test000086::setUp(), test000059::setUp(), test000064::setUp(), test000084::setUp(), test000085::setUp(), test000083::setUp(), stress_test::stress_test(), Copasi2SBMLTranslator::translate(), Copasi2SBMLTranslator::translateFileToSBML(), and Copasi2SBMLTranslator::translateToSBML().

79 {
80  COptions::init(argc, argv);
81 
82  CCopasiMessage::setIsGUI(withGUI);
83 
84  if (pRootContainer == NULL)
85  pRootContainer = new CCopasiRootContainer(withGUI);
86 
87  if (pRootContainer != NULL)
89 }
CCopasiRootContainer(const bool &withGUI=false)
static void setIsGUI(const bool &isGUI)
CCopasiRootContainer * pRootContainer
static void init(C_INT argc=0, char *argv[]=NULL)
Definition: COptions.cpp:56
void CCopasiRootContainer::initializeChildren ( )
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.

Definition at line 105 of file CCopasiRootContainer.cpp.

References CEvaluationTree::compile(), CFunctionDB::load(), mpConfiguration, mpDataModelList, mpFunctionList, mpUndefined, mpUnknownResource, CFunction::setInfix(), CMIRIAMResource::setMIRIAMDisplayName(), and CMIRIAMResource::setMIRIAMURI().

Referenced by init().

106 {
107  mpUnknownResource = new CMIRIAMResource("Unknown Resource");
108  mpUnknownResource->setMIRIAMDisplayName("-- select --");
109  mpUnknownResource->setMIRIAMURI("urn:miriam:unknown");
110 
111  mpFunctionList = new CFunctionDB("FunctionDB", this);
112  mpFunctionList->load();
113 
114  mpDataModelList = new CCopasiVector<CCopasiDataModel>("ModelList", this);
115 
117  mpConfiguration->load();
118 
119  mpUndefined = new CFunction("undefined", this);
120  mpUndefined->setInfix("nan");
121  mpUndefined->compile();
122 }
CMIRIAMResource * mpUnknownResource
void setMIRIAMURI(const std::string &URI)
CCopasiVector< CCopasiDataModel > * mpDataModelList
virtual bool setInfix(const std::string &infix)
Definition: CFunction.cpp:73
CConfigurationFile * mpConfiguration
void setMIRIAMDisplayName(const std::string &displayName)
virtual bool compile()
The class for handling a chemical kinetic function.
Definition: CFunction.h:29
CCopasiRootContainer& CCopasiRootContainer::operator= ( const CCopasiRootContainer src)
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.

Parameters
constCCopasiRootContainer & src
Returns
CCopasiRootContainer &
bool CCopasiRootContainer::removeDatamodel ( const CCopasiDataModel pDatamodel)
static

Definition at line 175 of file CCopasiRootContainer.cpp.

References mpDataModelList, pdelete, and CCopasiVector< T >::remove().

Referenced by removeDatamodel().

176 {
177  if (!pDatamodel)
178  {
179  return false;
180  }
181 
183  pdelete(pDatamodel);
184 
185  return true;
186 }
#define pdelete(p)
Definition: copasi.h:215
CCopasiVector< CCopasiDataModel > * mpDataModelList
virtual void remove(const size_t &index)
CCopasiRootContainer * pRootContainer
bool CCopasiRootContainer::removeDatamodel ( const unsigned C_INT32  index)
static

Definition at line 189 of file CCopasiRootContainer.cpp.

References getDatamodelList(), and removeDatamodel().

190 {
191  const CCopasiDataModel* pDatamodel = (*CCopasiRootContainer::getDatamodelList())[index];
192  return CCopasiRootContainer::removeDatamodel(pDatamodel);
193 }
static bool removeDatamodel(const CCopasiDataModel *pDatamodel)
static CCopasiVector< CCopasiDataModel > * getDatamodelList()

Member Data Documentation

CKeyFactory CCopasiRootContainer::mKeyFactory
protected

Definition at line 80 of file CCopasiRootContainer.h.

Referenced by getKeyFactory().

CConfigurationFile* CCopasiRootContainer::mpConfiguration
protected
CCopasiVector<CCopasiDataModel>* CCopasiRootContainer::mpDataModelList
protected
CFunctionDB* CCopasiRootContainer::mpFunctionList
protected
CFunction* CCopasiRootContainer::mpUndefined
protected
CMIRIAMResource* CCopasiRootContainer::mpUnknownResource
protected
bool CCopasiRootContainer::mWithGUI
protected

Definition at line 86 of file CCopasiRootContainer.h.

Referenced by addDatamodel(), and ~CCopasiRootContainer().


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