spot
0.9.1
|
#include <tgba/bdddict.hh>
Public Member Functions | |
anon_free_list (bdd_dict *d=0) | |
virtual int | extend (int n) |
int | register_n (int n) |
Find n consecutive integers. | |
void | release_n (int base, int n) |
Release n consecutive integers starting at base. | |
std::ostream & | dump_free_list (std::ostream &os) const |
Dump the list to os for debugging. | |
void | insert (int base, int n) |
Extend the list by inserting a new pos-lenght pair. | |
void | remove (int base, int n=0) |
Remove n consecutive entries from the list, starting at base. | |
int | free_count () const |
Return the number of free integers on the list. | |
Protected Types | |
typedef std::pair< int, int > | pos_lenght_pair |
Such pairs describe second free integer starting at first . | |
typedef std::list < pos_lenght_pair > | free_list_type |
Protected Member Functions | |
void | remove (free_list_type::iterator i, int base, int n) |
Remove n consecutive entries from the list, starting at base. | |
Protected Attributes | |
free_list_type | fl |
Tracks unused BDD variables. | |
Private Attributes | |
bdd_dict * | dict_ |
typedef std::list<pos_lenght_pair> spot::free_list::free_list_type [protected, inherited] |
typedef std::pair<int, int> spot::free_list::pos_lenght_pair [protected, inherited] |
Such pairs describe second
free integer starting at first
.
std::ostream& spot::free_list::dump_free_list | ( | std::ostream & | os | ) | const [inherited] |
Dump the list to os for debugging.
virtual int spot::bdd_dict::anon_free_list::extend | ( | int | n | ) | [virtual] |
Allocate n integer.
This function is called by register_n() when the free list is empty or if n consecutive integers could not be found. It should allocate more integers, possibly changing the list, and return the first integer on a range of n consecutive integer requested by the user.
Implements spot::free_list.
int spot::free_list::free_count | ( | ) | const [inherited] |
Return the number of free integers on the list.
void spot::free_list::insert | ( | int | base, |
int | n | ||
) | [inherited] |
Extend the list by inserting a new pos-lenght pair.
int spot::free_list::register_n | ( | int | n | ) | [inherited] |
Find n consecutive integers.
Browse the list of free integers until n consecutive integers are found. Extend the list (using extend()) otherwise.
void spot::free_list::release_n | ( | int | base, |
int | n | ||
) | [inherited] |
Release n consecutive integers starting at base.
void spot::free_list::remove | ( | int | base, |
int | n = 0 |
||
) | [inherited] |
Remove n consecutive entries from the list, starting at base.
void spot::free_list::remove | ( | free_list_type::iterator | i, |
int | base, | ||
int | n | ||
) | [protected, inherited] |
Remove n consecutive entries from the list, starting at base.
bdd_dict* spot::bdd_dict::anon_free_list::dict_ [private] |
free_list_type spot::free_list::fl [protected, inherited] |
Tracks unused BDD variables.