spot  1.99.7
Public Member Functions | Protected Attributes | List of all members
spot::tgta_succ_iterator_product Class Reference

Iterate over the successors of a product computed on the fly. More...

#include <spot/ta/tgtaproduct.hh>

Inheritance diagram for spot::tgta_succ_iterator_product:
Inheritance graph
Collaboration diagram for spot::tgta_succ_iterator_product:
Collaboration graph

Public Member Functions

 tgta_succ_iterator_product (const state_product *s, const const_kripke_ptr &k, const const_tgta_ptr &tgta, fixed_size_pool *pool)
 
bool first ()
 Position the iterator on the first successor (if any). More...
 
bool next ()
 Jump to the next successor (if any). More...
 
bool done () const
 Check whether the iteration is finished. More...
 
state_productdst () const
 Get the state of the current successor. More...
 
bdd cond () const
 Get the condition on the transition leading to this successor. More...
 
acc_cond::mark_t acc () const
 Get the acceptance conditions on the transition leading to this successor. More...
 

Protected Attributes

const state_productsource_
 
const_tgta_ptr tgta_
 
const_kripke_ptr kripke_
 
fixed_size_poolpool_
 
twa_succ_iteratortgta_succ_it_
 
twa_succ_iteratorkripke_succ_it_
 
state_productcurrent_state_
 
bdd current_condition_
 
acc_cond::mark_t current_acceptance_conditions_
 
bdd kripke_source_condition
 
const statekripke_current_dest_state
 

Detailed Description

Iterate over the successors of a product computed on the fly.

Member Function Documentation

acc_cond::mark_t spot::tgta_succ_iterator_product::acc ( ) const
virtual

Get the acceptance conditions on the transition leading to this successor.

Implements spot::twa_succ_iterator.

bdd spot::tgta_succ_iterator_product::cond ( ) const
virtual

Get the condition on the transition leading to this successor.

This is a boolean function of atomic propositions.

Implements spot::twa_succ_iterator.

bool spot::tgta_succ_iterator_product::done ( ) const
virtual

Check whether the iteration is finished.

This function should be called after any call to first() or next() and before any enquiry about the current state.

The usual way to do this is with a for loop.

for (s->first(); !s->done(); s->next())
  ...  

Implements spot::twa_succ_iterator.

state_product* spot::tgta_succ_iterator_product::dst ( ) const
virtual

Get the state of the current successor.

Note that the same state may occur at different points in the iteration. These actually correspond to the same destination. It just means there were several transitions, with different conditions, leading to the same state.

The returned state should be destroyed (see state::destroy) by the caller after it is no longer used.

Implements spot::twa_succ_iterator.

bool spot::tgta_succ_iterator_product::first ( )
virtual

Position the iterator on the first successor (if any).

This method can be called several times to make multiple passes over successors.

Warning
One should always call done() (or better: check the return value of first()) to ensure there is a successor, even after first(). A common trap is to assume that there is at least one successor: this is wrong.
Returns
whether there is actually a successor

Implements spot::twa_succ_iterator.

bool spot::tgta_succ_iterator_product::next ( )
virtual

Jump to the next successor (if any).

Warning
Again, one should always call done() (or better: check the return value of next()) ensure there is a successor.
Returns
whether there is actually a successor

Implements spot::twa_succ_iterator.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Jan 15 2016 13:01:51 for spot by doxygen 1.8.9.1