00001 /* Polyhedron::Status class declaration. 00002 Copyright (C) 2001-2006 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 2 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 #ifndef PPL_Status_defs_hh 00024 #define PPL_Status_defs_hh 1 00025 00026 #ifndef PPL_IN_Polyhedron_CLASS 00027 #error "Do not include Ph_Status.idefs.hh directly; use Polyhedron.defs.hh instead." 00028 #endif 00029 00031 00085 class Status { 00086 public: 00088 Status(); 00089 00091 00092 bool test_zero_dim_univ() const; 00093 void reset_zero_dim_univ(); 00094 void set_zero_dim_univ(); 00095 00096 bool test_empty() const; 00097 void reset_empty(); 00098 void set_empty(); 00099 00100 bool test_c_up_to_date() const; 00101 void reset_c_up_to_date(); 00102 void set_c_up_to_date(); 00103 00104 bool test_g_up_to_date() const; 00105 void reset_g_up_to_date(); 00106 void set_g_up_to_date(); 00107 00108 bool test_c_minimized() const; 00109 void reset_c_minimized(); 00110 void set_c_minimized(); 00111 00112 bool test_g_minimized() const; 00113 void reset_g_minimized(); 00114 void set_g_minimized(); 00115 00116 bool test_sat_c_up_to_date() const; 00117 void reset_sat_c_up_to_date(); 00118 void set_sat_c_up_to_date(); 00119 00120 bool test_sat_g_up_to_date() const; 00121 void reset_sat_g_up_to_date(); 00122 void set_sat_g_up_to_date(); 00123 00124 bool test_c_pending() const; 00125 void reset_c_pending(); 00126 void set_c_pending(); 00127 00128 bool test_g_pending() const; 00129 void reset_g_pending(); 00130 void set_g_pending(); 00132 00134 bool OK() const; 00135 00136 PPL_OUTPUT_DECLARATIONS; 00137 00143 bool ascii_load(std::istream& s); 00144 00145 private: 00147 typedef unsigned int flags_t; 00148 00150 00151 static const flags_t ZERO_DIM_UNIV = 0U; 00152 static const flags_t EMPTY = 1U << 0; 00153 static const flags_t C_UP_TO_DATE = 1U << 1; 00154 static const flags_t G_UP_TO_DATE = 1U << 2; 00155 static const flags_t C_MINIMIZED = 1U << 3; 00156 static const flags_t G_MINIMIZED = 1U << 4; 00157 static const flags_t SAT_C_UP_TO_DATE = 1U << 5; 00158 static const flags_t SAT_G_UP_TO_DATE = 1U << 6; 00159 static const flags_t CS_PENDING = 1U << 7; 00160 static const flags_t GS_PENDING = 1U << 8; 00162 00164 flags_t flags; 00165 00167 Status(flags_t mask); 00168 00170 bool test_all(flags_t mask) const; 00171 00173 bool test_any(flags_t mask) const; 00174 00176 void set(flags_t mask); 00177 00179 void reset(flags_t mask); 00180 }; 00181 00182 #endif // !defined(PPL_Status_defs_hh)