* src/tgbaalgos/gtec/nsheap.hh (numbered_state_heap_factory,

numbered_state_heap_hash_map_factory): New class.
* src/tgbaalgos/gtec/nsheap.cc (numbered_state_heap_hash_map_factory):
Implement it.
* src/tgbaalgos/gtec/gtec.hh (emptiness_check::emptiness_check,
emptiness_check_shy::emptiness_check_shy): Take a
numbered_state_heap_factory argument.
* tgbaalgos/gtec/status.hh
(emptiness_check_status::emptiness_check_status): Likewise.
(emptiness_check_status::h): Make it a numbered_state_heap*.
* src/tgbaalgos/gtec/ce.cc, tgbaalgos/gtec/gtec.cc,
tgbaalgos/gtec/status.cc: Adjust uses of ecs_->h.
This commit is contained in:
Alexandre Duret-Lutz 2004-04-14 11:30:41 +00:00
parent 579c343e13
commit a2cd1de267
8 changed files with 94 additions and 26 deletions

View file

@ -81,6 +81,14 @@ namespace spot
virtual const state* filter(const state* s) const = 0;
};
/// Abstract factory for numbered_state_heap
class numbered_state_heap_factory
{
public:
virtual ~numbered_state_heap_factory() {}
virtual numbered_state_heap* build() const = 0;
};
/// A straightforward implementation of numbered_state_heap with a hash map.
class numbered_state_heap_hash_map : public numbered_state_heap
{
@ -103,6 +111,23 @@ namespace spot
friend class numbered_state_heap_hash_map_const_iterator;
};
/// \brief Factory for numbered_state_heap_hash_map.
///
/// This class is a singleton. Retrieve the instance using instance().
class numbered_state_heap_hash_map_factory:
public numbered_state_heap_factory
{
public:
virtual numbered_state_heap_hash_map* build() const;
/// Get the unique instance of this class.
static const numbered_state_heap_hash_map_factory* instance();
protected:
virtual ~numbered_state_heap_hash_map_factory() {}
numbered_state_heap_hash_map_factory();
};
}
#endif // SPOT_TGBAALGOS_GTEC_NSHEAP_HH