spot
0.9.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
misc
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 2 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 Spot; see the file COPYING. If not, write to the Free
21
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
22
// 02111-1307, USA.
23
24
25
#ifndef SPOT_MISC_FREELIST_HH
26
# define SPOT_MISC_FREELIST_HH
27
28
#include <list>
29
#include <utility>
30
#include <iosfwd>
31
32
namespace
spot
33
{
34
37
class
free_list
38
{
39
public
:
40
virtual
~free_list
();
41
47
int
register_n
(
int
n);
48
50
void
release_n
(
int
base,
int
n);
51
53
std::ostream&
dump_free_list
(std::ostream& os)
const
;
54
56
void
insert
(
int
base,
int
n);
57
59
void
remove
(
int
base,
int
n = 0);
60
62
int
free_count
()
const
;
63
64
protected
:
65
73
virtual
int
extend
(
int
n) = 0;
74
76
typedef
std::pair<int, int>
pos_lenght_pair
;
77
typedef
std::list<pos_lenght_pair>
free_list_type
;
78
free_list_type
fl
;
79
81
void
remove
(free_list_type::iterator i,
int
base,
int
n);
82
};
83
84
}
85
86
#endif // SPOT_MISC_FREELIST_HH
Please
comment
this page and
report errors
about it on
the RefDocComments page
.
Generated on Mon Jul 2 2012 17:35:47 for spot by
1.8.1.1