00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PPL_Poly_Con_Relation_defs_hh
00024 #define PPL_Poly_Con_Relation_defs_hh 1
00025
00026 #include "Poly_Con_Relation.types.hh"
00027 #include "globals.defs.hh"
00028 #include <iosfwd>
00029
00030 namespace Parma_Polyhedra_Library {
00031
00032
00033
00035
00036 bool operator==(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00037
00039
00040 bool operator!=(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00041
00043
00044 Poly_Con_Relation operator&&(const Poly_Con_Relation& x,
00045 const Poly_Con_Relation& y);
00046
00053 Poly_Con_Relation operator-(const Poly_Con_Relation& x,
00054 const Poly_Con_Relation& y);
00055
00056 namespace IO_Operators {
00057
00059
00060 std::ostream& operator<<(std::ostream& s, const Poly_Con_Relation& r);
00061
00062 }
00063
00064 }
00065
00066
00068
00072 class Parma_Polyhedra_Library::Poly_Con_Relation {
00073 private:
00075 typedef unsigned int flags_t;
00076
00078
00079 static const flags_t NOTHING = 0U;
00080 static const flags_t IS_DISJOINT = 1U << 0;
00081 static const flags_t STRICTLY_INTERSECTS = 1U << 1;
00082 static const flags_t IS_INCLUDED = 1U << 2;
00083 static const flags_t SATURATES = 1U << 3;
00085
00087 static const flags_t EVERYTHING
00088 = IS_DISJOINT
00089 | STRICTLY_INTERSECTS
00090 | IS_INCLUDED
00091 | SATURATES;
00092
00094 flags_t flags;
00095
00097 static bool implies(flags_t x, flags_t y);
00098
00100 Poly_Con_Relation(flags_t mask);
00101
00102 friend bool
00103 Parma_Polyhedra_Library::operator==(const Poly_Con_Relation& x,
00104 const Poly_Con_Relation& y);
00105
00106 friend bool
00107 Parma_Polyhedra_Library::operator!=(const Poly_Con_Relation& x,
00108 const Poly_Con_Relation& y);
00109
00110 friend Poly_Con_Relation
00111 Parma_Polyhedra_Library::operator&&(const Poly_Con_Relation& x,
00112 const Poly_Con_Relation& y);
00113
00114 friend Poly_Con_Relation
00115 Parma_Polyhedra_Library::operator-(const Poly_Con_Relation& x,
00116 const Poly_Con_Relation& y);
00117
00118 friend std::ostream&
00119 Parma_Polyhedra_Library::
00120 IO_Operators::operator<<(std::ostream& s, const Poly_Con_Relation& r);
00121
00122 public:
00123 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00124
00128 #endif
00129 flags_t get_flags() const;
00130
00131 public:
00133 static Poly_Con_Relation nothing();
00134
00139 static Poly_Con_Relation is_disjoint();
00140
00145 static Poly_Con_Relation strictly_intersects();
00146
00151 static Poly_Con_Relation is_included();
00152
00157 static Poly_Con_Relation saturates();
00158
00159 PPL_OUTPUT_DECLARATIONS;
00160
00162 bool implies(const Poly_Con_Relation& y) const;
00163
00165 bool OK() const;
00166 };
00167
00168 #include "Poly_Con_Relation.inlines.hh"
00169
00170 #endif // !defined(PPL_Poly_Con_Relation_defs_hh)