COPASI API  4.16.103
CModelParameterSet.h
Go to the documentation of this file.
1 // Copyright (C) 2011 - 2013 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 #ifndef COPASI_CModelParameterSet
7 #define COPASI_CModelParameterSet
8 
9 #include <string>
10 
14 
15 class CModel;
16 
18 {
19 public:
20  /**
21  * Constructor
22  * @param const std::string & name
23  * @param const CCopasiContainer * pParent (default: NULL)
24  */
25  CModelParameterSet(const std::string & name,
26  const CCopasiContainer * pParent = NULL);
27 
28  /**
29  * Copy constructor
30  * @param const CModelParameterSet & src
31  * @param const CCopasiContainer * pParent
32  * @param const bool & createMissing (default: false)
33  */
35  const CCopasiContainer * pParent,
36  const bool & createMissing = false);
37 
38  /**
39  * Destructor
40  */
41  virtual ~CModelParameterSet();
42 
43  /**
44  * Retrieve the unique key of the set.
45  * @return const std::string & key
46  */
47  virtual const std::string & getKey() const;
48 
49  /**
50  * Set the object parent
51  * @param const CCopasiContainer * pParent
52  * @return bool success
53  */
54  virtual bool setObjectParent(const CCopasiContainer * pParent);
55 
56  /**
57  * Set the model the parameter set is storing values for
58  * @param const CModel * pModel
59  */
60  void setModel(const CModel * pModel);
61 
62  /**
63  * Retrieve the model the parameter set is storing values for
64  * @return CModel * pModel
65  */
66  CModel * getModel() const;
67 
68  /**
69  * Create the parameter set from the assigned model
70  */
71  void createFromModel();
72 
73  /**
74  * Compare the parameter set with the assigned model
75  */
76  bool compareWithModel(const CModelParameter::Framework & framework);
77 
78  /**
79  * Retrieve the name of the parameter set
80  * @return std::string name
81  */
82  virtual std::string getName() const;
83 
84  /**
85  * Update the corresponding model object with the current parameter settings
86  */
87  virtual bool updateModel();
88 
89  /**
90  * Determine whether this is parameter set is currently active, i.e., it is synchronized
91  * with the model.
92  * @return bool isActive
93  */
94  bool isActive() const;
95 
96  /**
97  * Assign the content of the source set to this, i.e., copy all
98  * contained parameters and groups.
99  * @param const CModelParameterSet & src
100  * @param const bool & createMissing
101  */
102  void assignSetContent(const CModelParameterSet & src,
103  const bool & createMissing);
104 
105  /**
106  * Save the parameter set to a stream
107  * @param std::ostream & os
108  * @param const CModelParameter::Framework & framework
109  * @param const std::string & mode (report or table)
110  * @param const std::string & separator
111  */
112  bool saveToStream(std::ostream & os,
113  const CModelParameter::Framework & framework,
114  const std::string & mode,
115  const std::string & separator);
116 
117 private:
118  /**
119  * The unique key of the set
120  */
121  std::string mKey;
122 
123  /**
124  * A pointer to the model the parameter set is storing values for
125  */
127 };
128 
129 #endif // COPASI_CModelParameterSet
virtual std::string getName() const
bool compareWithModel(const CModelParameter::Framework &framework)
bool saveToStream(std::ostream &os, const CModelParameter::Framework &framework, const std::string &mode, const std::string &separator)
virtual const std::string & getKey() const
CModelParameterSet(const std::string &name, const CCopasiContainer *pParent=NULL)
virtual bool setObjectParent(const CCopasiContainer *pParent)
Header file of class CCopasiContainer.
Definition: CModel.h:50
void assignSetContent(const CModelParameterSet &src, const bool &createMissing)
virtual bool updateModel()
CModel * getModel() const
void setModel(const CModel *pModel)