#include <cursor.h>
Public Types | |
typedef DFA::char_traits | char_traits |
Character traits describing char_type. | |
typedef DFA::char_type | char_type |
The type of the transitions letters. | |
typedef DFA::state_type | state_type |
The type of the automaton-states identifiers. | |
typedef DFA::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 | exists (const char_type &a) const |
Returns true if an outgoing transition labeled with a exists. | |
bool | find (const char_type &a) |
Makes this cursor point to the transition labeled with a . | |
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. | |
bool | forward (const char_type &a) |
Moves along the outgoing transition labeled with . | |
forward_cursor () | |
Creates a singular cursor. | |
forward_cursor (const DFA &a) | |
Creates a cursor pointing to an undefined state of the automaton a . | |
forward_cursor (const DFA &a, state_type p) | |
Creates a cursor pointing to a state p of the automaton a . | |
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 the 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. |
It provides all the functionnalities of the plain cursor and the transition_cursor
Parameter | Description | Default | Requirements |
---|---|---|---|
DFA | The type of the automaton that this cursor will point to | DFA is a model of DFA |
state_type aim | ( | ) | const [inherited] |
Returns the aim state of the pointed transition.
bool find | ( | const char_type & | a | ) |
Makes this cursor point to the transition labeled with a
.
true
if such a transition exists, otherwise return false
and the pointed transition is undefined bool first | ( | ) | [inherited] |
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 from transition_cursor< DFA >.
bool forward | ( | const char_type & | a | ) |
Moves along the outgoing transition labeled with .
true
if such a transition is defined, otherwise move to sink state and return false
References transition_cursor< DFA >::sink().
char_type letter | ( | ) | const [inherited] |
Returns the letter on the pointed transition.
bool next | ( | ) | [inherited] |
Moves this cursor to the next element of the transitions sequence of the source state.
Returns true
if such an element exists (the cursor is not at the end of the sequence), otherwise the pointed transition is undefined.
self& operator= | ( | state_type | p | ) |
Sets this cursor to point to the state p
.
src() == p
References transition_cursor< DFA >::operator=().