00001 /* Polyhedron::Status class declaration. 00002 Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it> 00003 Copyright (C) 2010-2011 BUGSENG srl (http://bugseng.com) 00004 00005 This file is part of the Parma Polyhedra Library (PPL). 00006 00007 The PPL is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 3 of the License, or (at your 00010 option) any later version. 00011 00012 The PPL is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software Foundation, 00019 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 00020 00021 For the most up-to-date information see the Parma Polyhedra Library 00022 site: http://www.cs.unipr.it/ppl/ . */ 00023 00024 #ifndef PPL_Status_idefs_hh 00025 #define PPL_Status_idefs_hh 1 00026 00027 #ifndef PPL_IN_Polyhedron_CLASS 00028 #error "Do not include Ph_Status.idefs.hh directly; use Polyhedron.defs.hh instead." 00029 #endif 00030 00032 00086 class Status { 00087 public: 00089 Status(); 00090 00092 00093 bool test_zero_dim_univ() const; 00094 void reset_zero_dim_univ(); 00095 void set_zero_dim_univ(); 00096 00097 bool test_empty() const; 00098 void reset_empty(); 00099 void set_empty(); 00100 00101 bool test_c_up_to_date() const; 00102 void reset_c_up_to_date(); 00103 void set_c_up_to_date(); 00104 00105 bool test_g_up_to_date() const; 00106 void reset_g_up_to_date(); 00107 void set_g_up_to_date(); 00108 00109 bool test_c_minimized() const; 00110 void reset_c_minimized(); 00111 void set_c_minimized(); 00112 00113 bool test_g_minimized() const; 00114 void reset_g_minimized(); 00115 void set_g_minimized(); 00116 00117 bool test_sat_c_up_to_date() const; 00118 void reset_sat_c_up_to_date(); 00119 void set_sat_c_up_to_date(); 00120 00121 bool test_sat_g_up_to_date() const; 00122 void reset_sat_g_up_to_date(); 00123 void set_sat_g_up_to_date(); 00124 00125 bool test_c_pending() const; 00126 void reset_c_pending(); 00127 void set_c_pending(); 00128 00129 bool test_g_pending() const; 00130 void reset_g_pending(); 00131 void set_g_pending(); 00133 00135 bool OK() const; 00136 00137 PPL_OUTPUT_DECLARATIONS 00138 00144 bool ascii_load(std::istream& s); 00145 00146 private: 00148 typedef unsigned int flags_t; 00149 00151 00152 static const flags_t ZERO_DIM_UNIV = 0U; 00153 static const flags_t EMPTY = 1U << 0; 00154 static const flags_t C_UP_TO_DATE = 1U << 1; 00155 static const flags_t G_UP_TO_DATE = 1U << 2; 00156 static const flags_t C_MINIMIZED = 1U << 3; 00157 static const flags_t G_MINIMIZED = 1U << 4; 00158 static const flags_t SAT_C_UP_TO_DATE = 1U << 5; 00159 static const flags_t SAT_G_UP_TO_DATE = 1U << 6; 00160 static const flags_t CS_PENDING = 1U << 7; 00161 static const flags_t GS_PENDING = 1U << 8; 00163 00165 flags_t flags; 00166 00168 Status(flags_t mask); 00169 00171 bool test_all(flags_t mask) const; 00172 00174 bool test_any(flags_t mask) const; 00175 00177 void set(flags_t mask); 00178 00180 void reset(flags_t mask); 00181 }; 00182 00183 #endif // !defined(PPL_Status_idefs_hh)
1.6.3