spot  1.1.4
freelist.hh
Go to the documentation of this file.
1 // Copyright (C) 2008 Laboratoire de Recherche et Développement
2 // de l'Epita (LRDE).
3 // Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
4 // département Systèmes Répartis Coopératifs (SRC), Université Pierre
5 // et Marie Curie.
6 //
7 // This file is part of Spot, a model checking library.
8 //
9 // Spot is free software; you can redistribute it and/or modify it
10 // under the terms of the GNU General Public License as published by
11 // the Free Software Foundation; either version 3 of the License, or
12 // (at your option) any later version.
13 //
14 // Spot is distributed in the hope that it will be useful, but WITHOUT
15 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
17 // License for more details.
18 //
19 // You should have received a copy of the GNU General Public License
20 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 
23 #ifndef SPOT_MISC_FREELIST_HH
24 # define SPOT_MISC_FREELIST_HH
25 
26 #include <list>
27 #include <utility>
28 #include <iosfwd>
29 
30 namespace spot
31 {
32 
35  class free_list
36  {
37  public:
38  virtual ~free_list();
39 
45  int register_n(int n);
46 
48  void release_n(int base, int n);
49 
51  std::ostream& dump_free_list(std::ostream& os) const;
52 
54  void insert(int base, int n);
55 
57  void remove(int base, int n = 0);
58 
60  int free_count() const;
61 
62  protected:
63 
71  virtual int extend(int n) = 0;
72 
74  typedef std::pair<int, int> pos_lenght_pair;
75  typedef std::list<pos_lenght_pair> free_list_type;
77 
79  void remove(free_list_type::iterator i, int base, int n);
80  };
81 
82 }
83 
84 #endif // SPOT_MISC_FREELIST_HH

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Mon Jul 29 2013 00:27:24 for spot by doxygen 1.8.4