00001 /* Variables_Set 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_Variables_Set_defs_hh 00025 #define PPL_Variables_Set_defs_hh 1 00026 00027 #include "Variables_Set.types.hh" 00028 #include "Variable.defs.hh" 00029 #include "globals.types.hh" 00030 #include <iosfwd> 00031 #include <set> 00032 00033 namespace Parma_Polyhedra_Library { 00034 00035 namespace IO_Operators { 00036 00038 00039 std::ostream& 00040 operator<<(std::ostream& s, const Variables_Set& v); 00041 00042 } // namespace IO_Operators 00043 00044 } // namespace Parma_Polyhedra_Library 00045 00047 class Parma_Polyhedra_Library::Variables_Set 00048 : public std::set<dimension_type> { 00049 private: 00050 typedef std::set<dimension_type> Base; 00051 00052 public: 00054 Variables_Set(); 00055 00057 explicit Variables_Set(const Variable& v); 00058 00068 Variables_Set(const Variable& v, const Variable& w); 00069 00071 static dimension_type max_space_dimension(); 00072 00077 dimension_type space_dimension() const; 00078 00080 void insert(Variable v); 00081 00082 // The `insert' method above overloads (instead of hiding) the 00083 // other `insert' method of std::set. 00084 using Base::insert; 00085 00091 bool ascii_load(std::istream& s); 00092 00094 memory_size_type total_memory_in_bytes() const; 00095 00097 memory_size_type external_memory_in_bytes() const; 00098 00100 bool OK() const; 00101 00102 PPL_OUTPUT_DECLARATIONS 00103 }; 00104 00105 #include "Variables_Set.inlines.hh" 00106 00107 #endif // !defined(PPL_Variables_Set_defs_hh)
1.6.3