00001 /* Poly_Con_Relation class implementation (non-inline functions). 00002 Copyright (C) 2001-2008 Roberto Bagnara <bagnara@cs.unipr.it> 00003 00004 This file is part of the Parma Polyhedra Library (PPL). 00005 00006 The PPL is free software; you can redistribute it and/or modify it 00007 under the terms of the GNU General Public License as published by the 00008 Free Software Foundation; either version 3 of the License, or (at your 00009 option) any later version. 00010 00011 The PPL is distributed in the hope that it will be useful, but WITHOUT 00012 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00014 for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software Foundation, 00018 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 00019 00020 For the most up-to-date information see the Parma Polyhedra Library 00021 site: http://www.cs.unipr.it/ppl/ . */ 00022 00023 #include <ppl-config.h> 00024 00025 #include "Poly_Con_Relation.defs.hh" 00026 00027 #include <iostream> 00028 #include <string> 00029 #include <cassert> 00030 00031 namespace PPL = Parma_Polyhedra_Library; 00032 00033 void 00034 PPL::Poly_Con_Relation::ascii_dump(std::ostream& s) const { 00035 flags_t f = flags; 00036 if (f == NOTHING) { 00037 s << "NOTHING"; 00038 return; 00039 } 00040 00041 while (true) { 00042 if (implies(f, IS_DISJOINT)) { 00043 s << "IS_DISJOINT"; 00044 f &= ~IS_DISJOINT; 00045 } 00046 else if (implies(f, STRICTLY_INTERSECTS)) { 00047 s << "STRICTLY_INTERSECTS"; 00048 f &= ~STRICTLY_INTERSECTS; 00049 } 00050 else if (implies(f, IS_INCLUDED)) { 00051 s << "IS_INCLUDED"; 00052 f &= ~IS_INCLUDED; 00053 } 00054 else if (implies(f, SATURATES)) { 00055 s << "SATURATES"; 00056 f &= ~SATURATES; 00057 } 00058 if (f != NOTHING) 00059 s << " & "; 00060 else 00061 break; 00062 } 00063 } 00064 00065 PPL_OUTPUT_DEFINITIONS(Poly_Con_Relation) 00066 00067 00068 std::ostream& 00069 PPL::IO_Operators::operator<<(std::ostream& s, const Poly_Con_Relation& r) { 00070 r.ascii_dump(s); 00071 return s; 00072 } 00073 00074 bool 00075 PPL::Poly_Con_Relation::OK() const { 00076 return true; 00077 }