COPASI API  4.16.103
CNormalChoice.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/compareExpressions/CNormalChoice.h,v $
3 // $Revision: 1.6 $
4 // $Name: $
5 // $Author: gauges $
6 // $Date: 2007/12/12 09:11:50 $
7 // End CVS Header
8 
9 // Copyright (C) 2007 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc. and EML Research, gGmbH.
11 // All rights reserved.
12 
13 #ifndef CNormalChoice_H__
14 #define CNormalChoice_H__
15 
16 #include <string>
17 #include <iostream>
19 
20 class CNormalLogical;
21 class CNormalFraction;
22 
23 class CNormalChoice : public CNormalBase
24  {
25  protected:
29 
30  public:
31  CNormalChoice();
32  CNormalChoice(const CNormalChoice& src);
33  virtual ~CNormalChoice();
34 
35  virtual CNormalBase * copy() const;
36 
38  bool operator==(const CNormalChoice& rhs) const;
39  bool operator<(const CNormalChoice& rhs) const;
40 
41  bool setCondition(const CNormalLogical& cond);
42  bool setTrueExpression(const CNormalFraction& branch);
43  bool setFalseExpression(const CNormalFraction& branch);
44 
45  const CNormalLogical& getCondition() const;
47 
48  const CNormalFraction& getTrueExpression() const;
50 
51  const CNormalFraction& getFalseExpression() const;
53 
54  static bool checkConditionTree(const CNormalBase& branch);
55  static bool checkExpressionTree(const CNormalBase& branch);
56 
57  virtual std::string toString() const;
58  virtual bool simplify();
59 
60  friend std::ostream& operator<<(std::ostream& os, const CNormalChoice& choice);
61  };
62 
63 #endif /* CNormalChoice_H__ */
CNormalFraction * mpFalse
Definition: CNormalChoice.h:28
static bool checkConditionTree(const CNormalBase &branch)
const CNormalFraction & getTrueExpression() const
bool setTrueExpression(const CNormalFraction &branch)
virtual CNormalBase * copy() const
CNormalFraction * mpTrue
Definition: CNormalChoice.h:27
const CNormalLogical & getCondition() const
friend std::ostream & operator<<(std::ostream &os, const CNormalChoice &choice)
bool setFalseExpression(const CNormalFraction &branch)
const CNormalFraction & getFalseExpression() const
static bool checkExpressionTree(const CNormalBase &branch)
CNormalLogical * mpCondition
Definition: CNormalChoice.h:26
bool setCondition(const CNormalLogical &cond)
bool operator==(const CNormalChoice &rhs) const
CNormalChoice & operator=(const CNormalChoice &src)
virtual std::string toString() const
bool operator<(const CNormalChoice &rhs) const
virtual ~CNormalChoice()
virtual bool simplify()