COPASI API  4.16.103
CNormalItemPower.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/compareExpressions/CNormalItemPower.h,v $
3 // $Revision: 1.8 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2011/03/07 19:26:19 $
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 #ifndef COPASI_CNormalItemPower_H__
24 #define COPASI_CNormalItemPower_H__
25 
26 #include <string>
27 
30 
31 /**
32  * The class for powers of items with real positive exponent used in CNormal
33  */
35 {
36 public:
37  enum ItemType
38  {
46  };
47 
48 protected:
49 
50  /**
51  * Enumeration of members.
52  */
54  C_FLOAT64 mExp; // mExp is > 0
55 
57 
58 public:
59  /**
60  * Default constructor
61  */
63 
64  /**
65  * Copy Constructor
66  */
68 
69  /**
70  * Destructor
71  */
72  virtual ~CNormalItemPower();
73 
74  /**
75  * Assignment operator Constructor
76  */
78 
79  virtual CNormalBase * copy() const;
80 
81  /**
82  * Data constructor
83  */
84  CNormalItemPower(const CNormalBase& item, const C_FLOAT64& exp);
85 
86  /**
87  * Set the base of this itempower.
88  * @return true.
89  */
90  bool setItem(const CNormalBase& item);
91 
92  /**
93  * Set the exponent of this power
94  * @return true
95  */
96  bool setExp(const C_FLOAT64& number);
97 
98  /**
99  * Retrieve the base of this power
100  * @return mItem
101  */
102  CNormalBase& getItem();
103 
104  /**
105  * Retrieve the base of this power
106  * @return mItem
107  */
108  const CNormalBase& getItem() const;
109 
110  /**
111  * Retrieve the exponent of this power
112  * @return mExp
113  */
114  const C_FLOAT64& getExp() const;
115 
116  /**
117  * Examine equality of two item powers.
118  * @return bool.
119  */
120  bool operator==(const CNormalItemPower & rhs) const;
121 
122  /**
123  * Examine inequality of two item powers.
124  * @return bool.
125  */
126  bool operator<(const CNormalItemPower & rhs) const;
127 
128  virtual std::string toString() const;
129 
130  virtual bool simplify();
131 
132  ItemType getItemType() const;
133 
134  friend std::ostream & operator<< (std::ostream &os,
135  const CNormalItemPower & d);
136 };
137 
138 #endif // COPASI_CNormalItemPower_H__
bool operator==(const CNormalItemPower &rhs) const
virtual ~CNormalItemPower()
virtual bool simplify()
bool operator<(const CNormalItemPower &rhs) const
CNormalItemPower & operator=(const CNormalItemPower &src)
bool setItem(const CNormalBase &item)
ItemType getItemType() const
const C_FLOAT64 & getExp() const
friend std::ostream & operator<<(std::ostream &os, const CNormalItemPower &d)
#define C_FLOAT64
Definition: copasi.h:92
virtual std::string toString() const
virtual CNormalBase * copy() const
CNormalBase & getItem()
CNormalBase * mpItem
bool setExp(const C_FLOAT64 &number)