spot  1.0.1
Public Member Functions | Protected Types | Protected Attributes | List of all members
spot::ta_reachable_iterator Class Reference

Iterate over all reachable states of a spot::ta. More...

#include <taalgos/reachiter.hh>

Inheritance diagram for spot::ta_reachable_iterator:
Inheritance graph
Collaboration diagram for spot::ta_reachable_iterator:
Collaboration graph

Public Member Functions

 ta_reachable_iterator (const ta *a)
virtual ~ta_reachable_iterator ()
void run ()
 Iterate over all reachable states of a spot::ta.
virtual bool want_state (const state *s) const
virtual void start ()
 Called by run() before starting its iteration.
virtual void end ()
 Called by run() once all states have been explored.
virtual void process_state (const state *s, int n)
virtual void process_link (int in, int out, const ta_succ_iterator *si)
Todo list management.

Called by run() to register newly discovered states.

spot::ta_reachable_iterator_depth_first and spot::ta_reachable_iterator_breadth_first offer two precanned implementations for these functions.

virtual void add_state (const state *s)=0
virtual const statenext_state ()=0
 Called by run() to obtain the next state to process.

Protected Types

typedef Sgi::hash_map< const
state *, int, state_ptr_hash,
state_ptr_equal
seen_map

Protected Attributes

const tat_automata_
 The spot::ta to explore.
seen_map seen
 States already seen.

Detailed Description

Iterate over all reachable states of a spot::ta.

Member Typedef Documentation

Constructor & Destructor Documentation

spot::ta_reachable_iterator::ta_reachable_iterator ( const ta a)
virtual spot::ta_reachable_iterator::~ta_reachable_iterator ( )
virtual

Member Function Documentation

virtual void spot::ta_reachable_iterator::add_state ( const state s)
pure virtual
virtual void spot::ta_reachable_iterator::end ( )
virtual

Called by run() once all states have been explored.

virtual const state* spot::ta_reachable_iterator::next_state ( )
pure virtual

Called by run() to obtain the next state to process.

Implemented in spot::ta_reachable_iterator_breadth_first, and spot::ta_reachable_iterator_depth_first.

virtual void spot::ta_reachable_iterator::process_link ( int  in,
int  out,
const ta_succ_iterator si 
)
virtual

Called by run() to process a transition.

Parameters
inThe source state number.
outThe destination state number.
siThe spot::tgba_succ_iterator positionned on the current transition.
virtual void spot::ta_reachable_iterator::process_state ( const state s,
int  n 
)
virtual

Called by run() to process a state.

Parameters
sThe current state.
nA unique number assigned to s.
void spot::ta_reachable_iterator::run ( )

Iterate over all reachable states of a spot::ta.

This is a template method that will call add_state(), next_state(), start(), end(), process_state(), and process_link(), while it iterates over states.

virtual void spot::ta_reachable_iterator::start ( )
virtual

Called by run() before starting its iteration.

virtual bool spot::ta_reachable_iterator::want_state ( const state s) const
virtual

Called by add_state or next_states implementations to filter states. Default implementation always return true.

Member Data Documentation

seen_map spot::ta_reachable_iterator::seen
protected

States already seen.

const ta* spot::ta_reachable_iterator::t_automata_
protected

The spot::ta to explore.


The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Jan 23 2013 15:00:02 for spot by doxygen 1.8.1.2