COPASI API  4.16.103
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CConfigurationFile Class Reference

#include <CConfigurationFile.h>

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

Classes

class  CXML
 

Public Member Functions

 CConfigurationFile (const std::string &name="Configuration", const CCopasiContainer *pParent=NULL)
 
 CConfigurationFile (const CConfigurationFile &src, const CCopasiContainer *pParent=NULL)
 
 CConfigurationFile (const CCopasiParameterGroup &group, const CCopasiContainer *pParent=NULL)
 
virtual bool elevateChildren ()
 
const std::string getApplicationFont () const
 
CRecentFilesgetRecentFiles ()
 
CMIRIAMResourcesgetRecentMIRIAMResources ()
 
CRecentFilesgetRecentSBMLFiles ()
 
CRecentFilesgetRecentSEDMLFiles ()
 
const std::string getWorkingDirectory () const
 
virtual bool load ()
 
bool normalizePerExperiment () const
 
virtual bool save ()
 
void setApplicationFont (const std::string &applicationFont)
 
void setNormalizePerExperiment (bool flag)
 
void setRecentMIRIAMResources (const CMIRIAMResources &miriamResources)
 
void setUseAdvancedEditing (bool useAdvancedEditing)
 
void setUseAdvancedSliders (bool useAdvancedSliders)
 
void setUseOpenGL (bool useOpenGL)
 
void setValidateUnits (bool validateUnits)
 
void setWorkingDirectory (const std::string &workingDirectory)
 
bool useAdvancedEditing () const
 
bool useAdvancedSliders () const
 
bool useOpenGL () const
 
bool validateUnits () const
 
virtual ~CConfigurationFile ()
 
- Public Member Functions inherited from CCopasiParameterGroup
bool addGroup (const std::string &name)
 
bool addParameter (const CCopasiParameter &parameter)
 
bool addParameter (const std::string &name, const CCopasiParameter::Type type)
 
template<class CType >
bool addParameter (const std::string &name, const CCopasiParameter::Type type, const CType &value)
 
void addParameter (CCopasiParameter *pParameter)
 
CCopasiParameterGroupassertGroup (const std::string &name)
 
template<class CType >
CCopasiParameterassertParameter (const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
 
index_iterator beginIndex () const
 
name_iterator beginName () const
 
 CCopasiParameterGroup (const CCopasiParameterGroup &src, const CCopasiContainer *pParent=NULL)
 
 CCopasiParameterGroup (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &objectType="ParameterGroup")
 
void clear ()
 
index_iterator endIndex () const
 
name_iterator endName () const
 
CCopasiParameterGroupgetGroup (const std::string &name)
 
const CCopasiParameterGroupgetGroup (const std::string &name) const
 
CCopasiParameterGroupgetGroup (const size_t &index)
 
const CCopasiParameterGroupgetGroup (const size_t &index) const
 
size_t getIndex (const std::string &name) const
 
std::string getKey (const std::string &name) const
 
std::string getKey (const size_t &index) const
 
virtual const std::string & getName (const size_t &index) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
CCopasiParametergetParameter (const std::string &name)
 
const CCopasiParametergetParameter (const std::string &name) const
 
CCopasiParametergetParameter (const size_t &index)
 
const CCopasiParametergetParameter (const size_t &index) const
 
CCopasiParameter::Type getType (const std::string &name) const
 
CCopasiParameter::Type getType (const size_t &index) const
 
std::string getUniqueParameterName (const CCopasiParameter *pParameter) const
 
const CCopasiParameter::ValuegetValue (const std::string &name) const
 
const CCopasiParameter::ValuegetValue (const size_t &index) const
 
CCopasiParameter::ValuegetValue (const std::string &name)
 
CCopasiParameter::ValuegetValue (const size_t &index)
 
CCopasiParameterGroupoperator= (const CCopasiParameterGroup &rhs)
 
virtual void print (std::ostream *ostream) const
 
bool removeParameter (const std::string &name)
 
bool removeParameter (const size_t &index)
 
template<class CType >
bool setValue (const std::string &name, const CType &value)
 
template<class CType >
bool setValue (const size_t &index, const CType &value)
 
size_t size () const
 
bool swap (const size_t &iFrom, const size_t &iTo)
 
bool swap (index_iterator &from, index_iterator &to)
 
virtual ~CCopasiParameterGroup ()
 
- Public Member Functions inherited from CCopasiParameter
 CCopasiParameter (const CCopasiParameter &src, const CCopasiContainer *pParent=NULL)
 
 CCopasiParameter (const std::string &name, const Type &type, const void *pValue=NULL, const CCopasiContainer *pParent=NULL, const std::string &objectType="Parameter")
 
virtual CCopasiObjectName getCN () const
 
virtual const std::string & getKey () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const CCopasiParameter::TypegetType () const
 
const ValuegetValue () const
 
ValuegetValue ()
 
virtual voidgetValuePointer () const
 
CCopasiObjectgetValueReference () const
 
bool isValidValue (const C_FLOAT64 &value) const
 
bool isValidValue (const C_INT32 &value) const
 
bool isValidValue (const unsigned C_INT32 &value) const
 
bool isValidValue (const bool &value) const
 
bool isValidValue (const std::string &value) const
 
bool isValidValue (const CCopasiObjectName &value) const
 
bool isValidValue (const std::vector< CCopasiParameter * > &value) const
 
CCopasiParameteroperator= (const CCopasiParameter &rhs)
 
template<class CType >
bool setValue (const CType &value)
 
bool setValue (const std::vector< CCopasiParameter * > &value)
 
virtual ~CCopasiParameter ()
 
- 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 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 const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () 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
 
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 ()
 

Private Member Functions

void initializeParameter ()
 

Private Attributes

std::string * mpApplicationFont
 
bool * mpNormalizePerExperiment
 
CRecentFilesmpRecentFiles
 
CMIRIAMResourcesmpRecentMIRIAMResources
 
CRecentFilesmpRecentSBMLFiles
 
CRecentFilesmpRecentSEDMLFiles
 
bool * mpUseAdvancedEditing
 
bool * mpUseAdvancedSliders
 
bool * mpUseOpenGL
 
bool * mpValidateUnits
 
std::string * mpWorkingDirectory
 

Additional Inherited Members

- Public Types inherited from CCopasiParameterGroup
typedef parameterGroup::iterator index_iterator
 
typedef
CCopasiContainer::objectMap::iterator 
name_iterator
 
typedef std::vector
< CCopasiParameter * > 
parameterGroup
 
- Public Types inherited from CCopasiParameter
enum  Type {
  DOUBLE = 0, UDOUBLE, INT, UINT,
  BOOL, GROUP, STRING, CN,
  KEY, FILE, EXPRESSION, INVALID
}
 
- 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 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)
 
- Static Public Attributes inherited from CCopasiParameter
static const std::string TypeName []
 
static const char * XMLType []
 
- 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 CCopasiParameterGroup
 CCopasiParameterGroup ()
 
- 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)
 
- Protected Attributes inherited from CCopasiParameter
std::string mKey
 
CCopasiObjectmpValueReference
 
size_t mSize
 
Value mValue
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 83 of file CConfigurationFile.h.

Constructor & Destructor Documentation

CConfigurationFile::CConfigurationFile ( const std::string &  name = "Configuration",
const CCopasiContainer pParent = NULL 
)

Default constructor

Parameters
conststd::string & name (default: Configuration)
constCCopasiContainer * pParent (default: NULL)

Definition at line 102 of file CConfigurationFile.cpp.

References initializeParameter().

103  :
104  CCopasiParameterGroup(name, pParent),
105  mpRecentFiles(NULL),
106  mpRecentSBMLFiles(NULL),
107  mpRecentSEDMLFiles(NULL),
109  mpApplicationFont(NULL),
110  mpValidateUnits(NULL),
111  mpUseOpenGL(NULL),
112  mpUseAdvancedSliders(NULL),
113  mpUseAdvancedEditing(NULL),
115  mpWorkingDirectory(NULL)
std::string * mpApplicationFont
std::string * mpWorkingDirectory
CRecentFiles * mpRecentSEDMLFiles
CRecentFiles * mpRecentFiles
CMIRIAMResources * mpRecentMIRIAMResources
CRecentFiles * mpRecentSBMLFiles
CConfigurationFile::CConfigurationFile ( const CConfigurationFile src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters
constCConfigurationFile & src
constCCopasiContainer * pParent (default: NULL)

Definition at line 118 of file CConfigurationFile.cpp.

References initializeParameter().

119  :
120  CCopasiParameterGroup(src, pParent),
121  mpRecentFiles(NULL),
122  mpRecentSBMLFiles(NULL),
123  mpRecentSEDMLFiles(NULL),
125  mpApplicationFont(NULL),
126  mpValidateUnits(NULL),
127  mpUseOpenGL(NULL),
128  mpUseAdvancedSliders(NULL),
129  mpUseAdvancedEditing(NULL),
131  mpWorkingDirectory(NULL)
std::string * mpApplicationFont
std::string * mpWorkingDirectory
CRecentFiles * mpRecentSEDMLFiles
CRecentFiles * mpRecentFiles
CMIRIAMResources * mpRecentMIRIAMResources
CRecentFiles * mpRecentSBMLFiles
CConfigurationFile::CConfigurationFile ( const CCopasiParameterGroup group,
const CCopasiContainer pParent = NULL 
)

Specific constructor

Parameters
constCCopasiParameterGroup & group
constCCopasiContainer * pParent (default: NULL)

Definition at line 134 of file CConfigurationFile.cpp.

References initializeParameter().

135  :
136  CCopasiParameterGroup(group, pParent),
137  mpRecentFiles(NULL),
138  mpRecentSBMLFiles(NULL),
139  mpRecentSEDMLFiles(NULL),
141  mpApplicationFont(NULL),
142  mpValidateUnits(NULL),
143  mpUseOpenGL(NULL),
144  mpUseAdvancedSliders(NULL),
145  mpUseAdvancedEditing(NULL),
147  mpWorkingDirectory(NULL)
std::string * mpApplicationFont
std::string * mpWorkingDirectory
CRecentFiles * mpRecentSEDMLFiles
CRecentFiles * mpRecentFiles
CMIRIAMResources * mpRecentMIRIAMResources
CRecentFiles * mpRecentSBMLFiles
CConfigurationFile::~CConfigurationFile ( )
virtual

Destructor

Definition at line 150 of file CConfigurationFile.cpp.

151 {}

Member Function Documentation

bool CConfigurationFile::elevateChildren ( )
virtual

This methods must be called to elevate subgroups to derived objects. The default implementation does nothing.

Returns
bool success

Reimplemented from CCopasiParameterGroup.

Definition at line 153 of file CConfigurationFile.cpp.

References CCopasiParameterGroup::getGroup(), mpRecentFiles, mpRecentMIRIAMResources, mpRecentSBMLFiles, mpRecentSEDMLFiles, and CMIRIAMResourceObject::setMIRIAMResources().

Referenced by initializeParameter().

154 {
155  bool success = true;
156 
157  mpRecentFiles =
158  elevate<CRecentFiles, CCopasiParameterGroup>(getGroup("Recent Files"));
159 
160  if (!mpRecentFiles) success = false;
161 
163  elevate<CRecentFiles, CCopasiParameterGroup>(getGroup("Recent SBML Files"));
164 
165  if (!mpRecentSBMLFiles) success = false;
166 
168  elevate<CRecentFiles, CCopasiParameterGroup>(getGroup("Recent SEDML Files"));
169 
170  if (!mpRecentSEDMLFiles) success = false;
171 
173  elevate<CMIRIAMResources, CCopasiParameterGroup>(getGroup("MIRIAM Resources"));
175 
176  if (!mpRecentMIRIAMResources) success = false;
177 
178  return success;
179 }
static void setMIRIAMResources(const CMIRIAMResources *pResources)
Definition: CConstants.cpp:81
CRecentFiles * mpRecentSEDMLFiles
CRecentFiles * mpRecentFiles
CMIRIAMResources * mpRecentMIRIAMResources
CRecentFiles * mpRecentSBMLFiles
CCopasiParameterGroup * getGroup(const std::string &name)
const std::string CConfigurationFile::getApplicationFont ( ) const

Retrieve the application font.

Returns
const std::string & applicationFont

Definition at line 273 of file CConfigurationFile.cpp.

References mpApplicationFont.

Referenced by CopasiUI3Window::setApplicationFont().

274 {
275  return *mpApplicationFont;
276 }
std::string * mpApplicationFont
CRecentFiles & CConfigurationFile::getRecentFiles ( )
CMIRIAMResources & CConfigurationFile::getRecentMIRIAMResources ( )

Retrieve the list of recent MIRIAM Resources

Returns
CMIRIAMResources & recentMIRIAMResources

Definition at line 267 of file CConfigurationFile.cpp.

References mpRecentMIRIAMResources.

Referenced by CQMiriamWidget::updateResourcesList().

268 {return *mpRecentMIRIAMResources;}
CMIRIAMResources * mpRecentMIRIAMResources
CRecentFiles & CConfigurationFile::getRecentSBMLFiles ( )
CRecentFiles & CConfigurationFile::getRecentSEDMLFiles ( )

Retrieve the list of recent SEDML files

Returns
CRecentFiles & recentSEDMLFiles

Definition at line 264 of file CConfigurationFile.cpp.

References mpRecentSEDMLFiles.

265 {return *mpRecentSEDMLFiles;}
CRecentFiles * mpRecentSEDMLFiles
const std::string CConfigurationFile::getWorkingDirectory ( ) const

Retrieve the web working directory

Returns
const std::string & workingDirectory

Definition at line 328 of file CConfigurationFile.cpp.

References mpWorkingDirectory.

329 {
330  return *mpWorkingDirectory;
331 }
std::string * mpWorkingDirectory
void CConfigurationFile::initializeParameter ( )
private

Allocates all group parameters and assures that they are properly initialized.

Definition at line 181 of file CConfigurationFile.cpp.

References CCopasiParameterGroup::assertGroup(), CCopasiParameterGroup::assertParameter(), CCopasiParameter::BOOL, elevateChildren(), CCopasiParameter::getValue(), mpApplicationFont, mpNormalizePerExperiment, mpUseAdvancedEditing, mpUseAdvancedSliders, mpUseOpenGL, mpValidateUnits, mpWorkingDirectory, CCopasiParameter::Value::pBOOL, CCopasiParameter::Value::pSTRING, and CCopasiParameter::STRING.

Referenced by CConfigurationFile(), and load().

182 {
183  assertGroup("Recent Files");
184  assertGroup("Recent SBML Files");
185  assertGroup("Recent SEDML Files");
186 
188  assertParameter("Application Font", CCopasiParameter::STRING, std::string(""))->getValue().pSTRING;
189 
190  assertGroup("MIRIAM Resources");
191 
194  mpUseAdvancedSliders = assertParameter("Use Advanced Sliders", CCopasiParameter::BOOL, true)->getValue().pBOOL;
195  mpUseAdvancedEditing = assertParameter("Use Advanced Editing", CCopasiParameter::BOOL, false)->getValue().pBOOL;
196  mpNormalizePerExperiment = assertParameter("Normalize Weights per Experiment", CCopasiParameter::BOOL, true)->getValue().pBOOL;
197  mpWorkingDirectory = assertParameter("Working Directory", CCopasiParameter::STRING, std::string(""))->getValue().pSTRING;
198 
199  elevateChildren();
200 }
std::string * mpApplicationFont
std::string * mpWorkingDirectory
const Value & getValue() const
CCopasiParameterGroup * assertGroup(const std::string &name)
virtual bool elevateChildren()
CCopasiParameter * assertParameter(const std::string &name, const CCopasiParameter::Type type, const CType &defaultValue)
bool CConfigurationFile::load ( )
virtual

Load the configuration file.

Returns
bool success

Definition at line 216 of file CConfigurationFile.cpp.

References CConfigurationFile::CXML::getConfiguration(), CCopasiParameterGroup::getGroup(), CMIRIAMResources::getResourceList(), COptions::getValue(), initializeParameter(), CMIRIAMResources::initializeParameter(), mpRecentMIRIAMResources, CDirEntry::Separator, and CCopasiParameterGroup::size().

217 {
218  std::string ConfigFile;
219  COptions::getValue("ConfigFile", ConfigFile);
220 
222 
223  bool success = XML.CCopasiXMLInterface::load(ConfigFile, ConfigFile);
224 
225  if (success)
226  {
227  *this = XML.getConfiguration();
229  }
230 
232  {
233  // We load the default MIRIAM resources, which are part of the COPASI installation.
234  std::string MIRIAMResourceFile;
235  COptions::getValue("DefaultConfigDir", MIRIAMResourceFile);
236  MIRIAMResourceFile += CDirEntry::Separator + "MIRIAMResources.xml";
237 
238  CConfigurationFile::CXML XMLMIRIAMResource;
239 
240  if (XMLMIRIAMResource.CCopasiXMLInterface::load(MIRIAMResourceFile,
241  MIRIAMResourceFile))
242  {
243  const CCopasiParameterGroup* group = XMLMIRIAMResource.getConfiguration().getGroup("MIRIAM Resoures");
244 
245  if (group == NULL) return false;
246 
247  *mpRecentMIRIAMResources = *group;
249  }
250  else
251  success = false;
252  }
253 
254  return success;
255 }
const CCopasiParameterGroup & getConfiguration() const
const CCopasiParameterGroup & getResourceList() const
static const std::string Separator
Definition: CDirEntry.h:34
static void getValue(const std::string &name, CType &value)
Definition: COptions.h:124
CMIRIAMResources * mpRecentMIRIAMResources
CCopasiParameterGroup * getGroup(const std::string &name)
bool CConfigurationFile::normalizePerExperiment ( ) const
Returns
a flag on whether weights in Parameter Estimation should be normalized per experiment

Definition at line 313 of file CConfigurationFile.cpp.

References mpNormalizePerExperiment.

314 {
315  return *mpNormalizePerExperiment;
316 }
bool CConfigurationFile::save ( )
virtual

Save the configuration file.

Returns
bool success

Definition at line 202 of file CConfigurationFile.cpp.

References COptions::getValue(), and CConfigurationFile::CXML::setConfiguration().

Referenced by CopasiUI3Window::slotUpdateMIRIAMFinished(), and CCopasiRootContainer::~CCopasiRootContainer().

203 {
204  std::string ConfigFile;
205  COptions::getValue("ConfigFile", ConfigFile);
206 
208 
209  XML.setConfiguration(*this);
210 
211  bool success = XML.CCopasiXMLInterface::save(ConfigFile, ConfigFile);
212 
213  return success;
214 }
static void getValue(const std::string &name, CType &value)
Definition: COptions.h:124
void setConfiguration(const CCopasiParameterGroup &configuration)
void CConfigurationFile::setApplicationFont ( const std::string &  applicationFont)

Set the applications font.

Parameters
conststd::string & applicationFont

Definition at line 278 of file CConfigurationFile.cpp.

References mpApplicationFont.

Referenced by CopasiUI3Window::setApplicationFont(), and CopasiUI3Window::slotFontSelection().

279 {
280  *mpApplicationFont = applicationFont;
281 }
std::string * mpApplicationFont
void CConfigurationFile::setNormalizePerExperiment ( bool  flag)

Set whether weights in Parameter Estimation should be normalized per experiment

Definition at line 318 of file CConfigurationFile.cpp.

References mpNormalizePerExperiment.

319 {
321 }
long int flag
Definition: f2c.h:52
void CConfigurationFile::setRecentMIRIAMResources ( const CMIRIAMResources miriamResources)

Definition at line 270 of file CConfigurationFile.cpp.

References mpRecentMIRIAMResources.

271 {* mpRecentMIRIAMResources = miriamResources;}
CMIRIAMResources * mpRecentMIRIAMResources
void CConfigurationFile::setUseAdvancedEditing ( bool  useAdvancedEditing)

Set whether the advanced expression editing (i.e manually entering copasiobjects) is to be used (true), or not

Definition at line 308 of file CConfigurationFile.cpp.

References mpUseAdvancedEditing, and useAdvancedEditing().

309 {
311 }
bool useAdvancedEditing() const
void CConfigurationFile::setUseAdvancedSliders ( bool  useAdvancedSliders)

Set whether the sliders should react to keyboard input / mouse interaction.

Definition at line 298 of file CConfigurationFile.cpp.

References mpUseAdvancedSliders, and useAdvancedSliders().

299 {
301 }
bool useAdvancedSliders() const
void CConfigurationFile::setUseOpenGL ( bool  useOpenGL)

Set whether the openGL based rendering is to be used (true), or the Qt based one.

Definition at line 288 of file CConfigurationFile.cpp.

References mpUseOpenGL, and useOpenGL().

289 {
291 }
void CConfigurationFile::setValidateUnits ( bool  validateUnits)

Set whether unit validation should always be performed or not.

Parameters
boolvalidateUnits

Definition at line 338 of file CConfigurationFile.cpp.

References mpValidateUnits, and validateUnits().

339 {
341 }
void CConfigurationFile::setWorkingDirectory ( const std::string &  workingDirectory)

Set the working directory.

Parameters
conststd::string & workingDirectory

Definition at line 333 of file CConfigurationFile.cpp.

References mpWorkingDirectory.

Referenced by CopasiFileDialog::getOpenFileName(), CopasiFileDialog::getSaveFileName(), and CopasiFileDialog::openExampleDir().

334 {
335  *mpWorkingDirectory = workingDirectory;
336 }
std::string * mpWorkingDirectory
bool CConfigurationFile::useAdvancedEditing ( ) const
Returns
a flag on whether to use the advanced expression editing (i.e manually entering copasiobjects)

Definition at line 303 of file CConfigurationFile.cpp.

References mpUseAdvancedEditing.

Referenced by CQExpressionWidget::getExpression(), CQExpressionWidget::keyPressEvent(), and setUseAdvancedEditing().

304 {
305  return *mpUseAdvancedEditing;
306 }
bool CConfigurationFile::useAdvancedSliders ( ) const
Returns
a flag on whether the sliders should react to keyboard input / mouse interaction.

Definition at line 293 of file CConfigurationFile.cpp.

References mpUseAdvancedSliders.

Referenced by setUseAdvancedSliders(), and SliderDialog::sliderValueChanged().

294 {
295  return *mpUseAdvancedSliders;
296 }
bool CConfigurationFile::useOpenGL ( ) const
Returns
a flag on whether to use the open GL based rendering, or the Qt based one

Definition at line 283 of file CConfigurationFile.cpp.

References mpUseOpenGL.

Referenced by setUseOpenGL().

284 {
285  return *mpUseOpenGL;
286 }
bool CConfigurationFile::validateUnits ( ) const

Always perform unit validation

Returns
a flag indicating whether unit validation should always be performed

Definition at line 323 of file CConfigurationFile.cpp.

References mpValidateUnits.

Referenced by setValidateUnits().

324 {
325  return *mpValidateUnits;
326 }

Member Data Documentation

std::string* CConfigurationFile::mpApplicationFont
private

A pointer to the application font

Definition at line 329 of file CConfigurationFile.h.

Referenced by getApplicationFont(), initializeParameter(), and setApplicationFont().

bool* CConfigurationFile::mpNormalizePerExperiment
private

A pointer indicating whether to experiments should be normalized by default

Definition at line 355 of file CConfigurationFile.h.

Referenced by initializeParameter(), normalizePerExperiment(), and setNormalizePerExperiment().

CRecentFiles* CConfigurationFile::mpRecentFiles
private

A pointer to the list of recent files

Definition at line 308 of file CConfigurationFile.h.

Referenced by elevateChildren(), and getRecentFiles().

CMIRIAMResources* CConfigurationFile::mpRecentMIRIAMResources
private

A pointer to the list of MIRIAM Resources

Definition at line 324 of file CConfigurationFile.h.

Referenced by elevateChildren(), getRecentMIRIAMResources(), load(), and setRecentMIRIAMResources().

CRecentFiles* CConfigurationFile::mpRecentSBMLFiles
private

A pointer to the list of recent files

Definition at line 313 of file CConfigurationFile.h.

Referenced by elevateChildren(), and getRecentSBMLFiles().

CRecentFiles* CConfigurationFile::mpRecentSEDMLFiles
private

A pointer to the list of recent files

Definition at line 319 of file CConfigurationFile.h.

Referenced by elevateChildren(), and getRecentSEDMLFiles().

bool* CConfigurationFile::mpUseAdvancedEditing
private

A pointer indicating whether to use the advanced editing

Definition at line 350 of file CConfigurationFile.h.

Referenced by initializeParameter(), setUseAdvancedEditing(), and useAdvancedEditing().

bool* CConfigurationFile::mpUseAdvancedSliders
private

A pointer indicating whether the sliders should react to keyboard input / mouse interaction.

Definition at line 345 of file CConfigurationFile.h.

Referenced by initializeParameter(), setUseAdvancedSliders(), and useAdvancedSliders().

bool* CConfigurationFile::mpUseOpenGL
private

A pointer indicating whether to use the OpenGL rendering, or the Qt based one

Definition at line 339 of file CConfigurationFile.h.

Referenced by initializeParameter(), setUseOpenGL(), and useOpenGL().

bool* CConfigurationFile::mpValidateUnits
private

A pointer indicating whether units will always be validated

Definition at line 334 of file CConfigurationFile.h.

Referenced by initializeParameter(), setValidateUnits(), and validateUnits().

std::string* CConfigurationFile::mpWorkingDirectory
private

A pointer to the last used working directory of the GUI.

Definition at line 360 of file CConfigurationFile.h.

Referenced by getWorkingDirectory(), initializeParameter(), and setWorkingDirectory().


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