#include <cursor.h>
Inherits astl::transition_cursor_concept.
Public Types | |
typedef FA::char_traits | char_traits |
Character traits describing char_type. | |
typedef FA::char_type | char_type |
The type of the transitions letters. | |
typedef FA::state_type | state_type |
The type of the automaton-states identifiers. | |
typedef FA::tag_type | tag_type |
The type of the data attached to states. | |
Public Member Functions | |
state_type | aim () const |
Returns the aim state of the pointed transition. | |
bool | aim_final () const |
Returns true if the aim state of the transition that this cursor points to is final. | |
const tag_type & | aim_tag () const |
Returns the data attached to the aim state of the pointed transition. | |
bool | first () |
Makes this cursor point to the first element of the transitions sequence of the source state. | |
void | forward () |
Moves forward along the pointed transition. | |
char_type | letter () const |
Returns the letter on the pointed transition. | |
bool | next () |
Moves this cursor to the next element of the transitions sequence of the source state. | |
bool | operator!= (const self &x) const |
Returns true if x points to another transition than this cursor. | |
self & | operator= (state_type p) |
Sets this cursor to point to state p . | |
bool | operator== (const self &x) const |
Returns true if x points to the same transition as this cursor. | |
bool | sink () const |
Returns true if this cursor points to the sink state FA::null_state . | |
state_type | sink_state () const |
Returns the identifier of the sink state FA::null_state . | |
state_type | src () const |
Returns the id of the state that this cursor points to. | |
bool | src_final () const |
Returns true if the state this cursor points to is final. | |
const tag_type & | src_tag () const |
Returns the data attached to the state this cursor points to. | |
transition_cursor () | |
Creates a singular cursor. | |
transition_cursor (const FA &a) | |
Creates a cursor pointing to an undefined state of the automaton a . | |
transition_cursor (const FA &a, state_type p) | |
Creates a cursor pointing to the state p of the automaton a . |
It implements traversals of the sequence of transitions going out of the source state.
Parameter | Description | Default | Requirements |
---|---|---|---|
FA | The type of the automaton that this cursor will point to | FA is a model of FA |
transition_cursor | ( | const FA & | a, | |
state_type | p | |||
) |
state_type aim | ( | ) | const |
bool first | ( | ) |
Makes this cursor point to the first element of the transitions sequence of the source state.
Returns true
if such an element exists (if any transition is defined), otherwise the pointed transition is undefined
void forward | ( | ) |
Moves forward along the pointed transition.
Reimplemented in forward_cursor.
char_type letter | ( | ) | const |
bool next | ( | ) |
self& operator= | ( | state_type | p | ) |