FlopCpp trunk
MP_boolean.hpp
Go to the documentation of this file.
1// ******************** FlopCpp **********************************************
2// File: MP_boolean.hpp
3// $Id$
4// Author: Tim Helge Hultberg (thh@mat.ua.pt)
5// Copyright (C) 2003 Tim Helge Hultberg
6// All Rights Reserved.
7// ****************************************************************************
8
9#ifndef _MP_boolean_hpp_
10#define _MP_boolean_hpp_
11
12#include "MP_index.hpp"
13#include "MP_constant.hpp"
14#include "MP_utilities.hpp"
15
16namespace flopc {
17
24 friend class Handle<Boolean_base*>;
25 friend class MP_boolean;
26 public:
27 virtual bool evaluate() const = 0;
28 protected:
30 virtual ~Boolean_base() {}
31
32 int count;
33 };
34
35 class SUBSETREF;
36
45 class MP_boolean : public Handle<Boolean_base*> {
46 friend class MP_domain_base_;
47 public:
49 MP_boolean(bool b);
50 MP_boolean(const Constant& c);
53
54 };
55
64
83
93
119 MP_boolean operator<=(const Constant& e1, const Constant& e2);
137 MP_boolean operator<(const Constant& e1, const Constant& e2);
155 MP_boolean operator>=(const Constant& e1, const Constant& e2);
173 MP_boolean operator>(const Constant& e1, const Constant& e2);
191 MP_boolean operator==(const Constant& e1, const Constant& e2);
209 MP_boolean operator!=(const Constant& e1, const Constant& e2);
210
211} // End of namespace flopc
212#endif
Base class for all "boolean" types of data.
Definition: MP_boolean.hpp:23
virtual ~Boolean_base()
Definition: MP_boolean.hpp:30
virtual bool evaluate() const =0
Reference counted class for all "constant" types of data.
Definition: MP_constant.hpp:48
Utility for doing reference counted pointers.
Reference counted class for all "boolean" types of data.
Definition: MP_boolean.hpp:45
MP_boolean(const Constant &c)
MP_boolean(Boolean_base *r)
Definition: MP_boolean.hpp:52
MP_boolean(SUBSETREF &c)
friend class MP_domain_base_
Definition: MP_boolean.hpp:46
Range over which some other constuct is defined.
Definition: MP_domain.hpp:61
Representation of an expression involving an index.
Definition: MP_index.hpp:145
Internal representation of a "set".
Definition: MP_set.hpp:273
MP_boolean operator!(const MP_boolean &b)
For computing the logical negation of a booleanThis is used in the normal formation of an expression.
MP_boolean operator==(const MP_index_exp &e1, const MP_index_exp &e2)
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an e...
MP_boolean operator<(const MP_index_exp &e1, const MP_index_exp &e2)
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an e...
MP_boolean operator&&(const MP_boolean &e1, const MP_boolean &e2)
For computing the logical AND of two booleansThis is used in the normal formation of an expression.
MP_boolean operator>(const MP_index_exp &e1, const MP_index_exp &e2)
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an e...
MP_boolean operator||(const MP_boolean &e1, const MP_boolean &e2)
For computing the logical OR of two booleansThis is used in the normal formation of an expression.
MP_boolean operator<=(const MP_index_exp &e1, const MP_index_exp &e2)
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an e...
MP_boolean operator!=(const MP_index_exp &e1, const MP_index_exp &e2)
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an e...
MP_boolean operator>=(const MP_index_exp &e1, const MP_index_exp &e2)
constructs a boolean evaluator using operator overloadingThis is used in the normal formation of an e...
MP_boolean alltrue(const MP_domain &d, const MP_boolean &b)
boolean which returns true if all in domain evaluate to true.
All flopc++ code is contained within the flopc namespace.
Definition: flopc.hpp:49