COPASI API  4.16.103
CChemEqElement.h
Go to the documentation of this file.
1 /* Begin CVS Header
2  $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/model/CChemEqElement.h,v $
3  $Revision: 1.31 $
4  $Name: $
5  $Author: shoops $
6  $Date: 2011/03/21 15:48:16 $
7  End CVS Header */
8 
9 // Copyright (C) 2011 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 // Copyright (C) 2001 - 2007 by Pedro Mendes, Virginia Tech Intellectual
20 // Properties, Inc. and EML Research, gGmbH.
21 // All rights reserved.
22 
23 /**
24  * CChemEqElement class.
25  * Describing an element of a chemical equation Stefan Hoops 2001
26  *
27  * Created for COPASI by Stefan Hoops 2001
28  */
29 
30 #ifndef COPASI_CChemEqElement
31 #define COPASI_CChemEqElement
32 
33 #include <string>
34 
36 
37 class CMetab;
38 
39 template <class CType> class CCopasiVectorN;
40 
42 {
43  // Attributes
44 
45 private:
46  /**
47  * The name of the metabolite the element
48  */
49  std::string mMetaboliteKey;
50 
51  /**
52  * The multiplicity of the metabolite
53  */
55 
56 public:
57  /**
58  * Default constructor
59  * @param const std::string & name (default: "NoName")
60  * @param const CCopasiContainer * pParent (default: NULL)
61  */
62  CChemEqElement(const std::string & name = "Chem Eq Element",
63  const CCopasiContainer * pParent = NULL);
64 
65  /**
66  * Copy constructor
67  * @param "const CChemEqElement &" src
68  * @param const CCopasiContainer * pParent (default: NULL)
69  */
70  CChemEqElement(const CChemEqElement & src,
71  const CCopasiContainer * pParent = NULL);
72 
73  /**
74  * Destructor
75  */
77 
78  /**
79  * cleanup
80  */
81  void cleanup();
82 
83  /**
84  * Set the multiplicity of the element.
85  * @param "const C_FLOAT64" multiplicity
86  */
87  void setMultiplicity(const C_FLOAT64 multiplicity);
88 
89  /**
90  * Add to the multiplicity of the element.
91  * @param "const C_FLOAT64" multiplicity (default = 1.0)
92  */
93  void addToMultiplicity(const C_FLOAT64 multiplicity = 1.0);
94 
95  /**
96  * Retrieves the multiplicity of the element.
97  * @return const C_FLOAT64 & multiplicity
98  */
99  const C_FLOAT64 & getMultiplicity() const;
100 
101  /**
102  * Set the metabolite of the element.
103  * @param CMetab * metabolite
104  */
105  void setMetabolite(const std::string & key);
106 
107  /**
108  * Retrieves the metabolite of the element.
109  * @return "CMetab *" metabolite
110  */
111  const CMetab * getMetabolite() const;
112 
113  /**
114  * Retrieve the key of the species
115  * @return const std::string & speciesKey
116  */
117  const std::string & getMetaboliteKey() const;
118 
119  friend std::ostream & operator<<(std::ostream &os,
120  const CChemEqElement & d);
121 
122 private:
123  void initObjects();
124 };
125 
126 #endif // COPASI_CChemEqElement
void setMultiplicity(const C_FLOAT64 multiplicity)
const CMetab * getMetabolite() const
friend std::ostream & operator<<(std::ostream &os, const CChemEqElement &d)
Definition: CMetab.h:178
std::string mMetaboliteKey
C_FLOAT64 mMultiplicity
void setMetabolite(const std::string &key)
const C_FLOAT64 & getMultiplicity() const
const std::string & getMetaboliteKey() const
Header file of class CCopasiContainer.
#define C_FLOAT64
Definition: copasi.h:92
CChemEqElement(const std::string &name="Chem Eq Element", const CCopasiContainer *pParent=NULL)
void addToMultiplicity(const C_FLOAT64 multiplicity=1.0)