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 operator==(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00104 friend bool
00105 operator!=(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00106
00107 friend Poly_Con_Relation
00108 operator&&(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00109
00110 friend Poly_Con_Relation
00111 operator-(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00112
00113 friend std::ostream&
00114 Parma_Polyhedra_Library::
00115 IO_Operators::operator<<(std::ostream& s, const Poly_Con_Relation& r);
00116
00117 public:
00118 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00119
00123 #endif
00124 flags_t get_flags() const;
00125
00126 public:
00128 static Poly_Con_Relation nothing();
00129
00134 static Poly_Con_Relation is_disjoint();
00135
00140 static Poly_Con_Relation strictly_intersects();
00141
00146 static Poly_Con_Relation is_included();
00147
00152 static Poly_Con_Relation saturates();
00153
00154 PPL_OUTPUT_DECLARATIONS
00155
00157 bool implies(const Poly_Con_Relation& y) const;
00158
00160 bool OK() const;
00161 };
00162
00163 #include "Poly_Con_Relation.inlines.hh"
00164
00165 #endif // !defined(PPL_Poly_Con_Relation_defs_hh)