Vcsn  2.8
Be Rational
vcsn::automaton_editor Class Referenceabstract

Abstract Builder (the design pattern) for automata. More...

#include <edit-automaton.hh>

Inheritance diagram for vcsn::automaton_editor:
Collaboration diagram for vcsn::automaton_editor:

Public Types

using string_t = symbol
 

Public Member Functions

virtual ~automaton_editor ()
 
virtual void add_initial (string_t s, string_t w)=0
 
virtual void add_final (string_t s, string_t w)=0
 
virtual void add_state (string_t s)=0
 Register the existence of state named s. More...
 
virtual void add_pre (string_t s)=0
 Declare that s denotes the preinitial state in entries. More...
 
virtual void add_post (string_t s)=0
 Declare that s denotes the postfinal state in entries. More...
 
virtual void add_entry (string_t src, string_t dst, string_t entry)=0
 Add an entry from src to dst, with value entry. More...
 
virtual void add_transition (string_t src, string_t dst, string_t label, string_t weight=string_t{})=0
 Add a transition from src to dst. More...
 
virtual bool open (bool o)=0
 Whether unknown letters should be added, or rejected. More...
 
virtual dyn::automaton result ()=0
 The final result. More...
 
virtual void reset ()=0
 Forget about the current automaton, but do not free it. More...
 
void set_separator (char c)
 Set the label separator. Defaults to '+'. More...
 

Protected Attributes

char sep_ = '+'
 The label separator. More...
 

Detailed Description

Abstract Builder (the design pattern) for automata.

Definition at line 29 of file edit-automaton.hh.

Member Typedef Documentation

◆ string_t

Definition at line 32 of file edit-automaton.hh.

Constructor & Destructor Documentation

◆ ~automaton_editor()

virtual vcsn::automaton_editor::~automaton_editor ( )
inlinevirtual

Definition at line 34 of file edit-automaton.hh.

References add_entry(), add_final(), add_initial(), add_post(), add_pre(), add_state(), add_transition(), open(), reset(), and result().

Here is the call graph for this function:

Member Function Documentation

◆ add_entry()

virtual void vcsn::automaton_editor::add_entry ( string_t  src,
string_t  dst,
string_t  entry 
)
pure virtual

Add an entry from src to dst, with value entry.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ add_final()

virtual void vcsn::automaton_editor::add_final ( string_t  s,
string_t  w 
)
pure virtual

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ add_initial()

virtual void vcsn::automaton_editor::add_initial ( string_t  s,
string_t  w 
)
pure virtual

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ add_post()

virtual void vcsn::automaton_editor::add_post ( string_t  s)
pure virtual

Declare that s denotes the postfinal state in entries.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ add_pre()

virtual void vcsn::automaton_editor::add_pre ( string_t  s)
pure virtual

Declare that s denotes the preinitial state in entries.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ add_state()

virtual void vcsn::automaton_editor::add_state ( string_t  s)
pure virtual

Register the existence of state named s.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ add_transition()

virtual void vcsn::automaton_editor::add_transition ( string_t  src,
string_t  dst,
string_t  label,
string_t  weight = string_t{} 
)
pure virtual

Add a transition from src to dst.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ open()

virtual bool vcsn::automaton_editor::open ( bool  o)
pure virtual

Whether unknown letters should be added, or rejected.

Parameters
owhether to accept
Returns
the previous status.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by vcsn::edit_automaton< Aut >::open(), vcsn::edit_automaton< Aut >::result(), and ~automaton_editor().

◆ reset()

virtual void vcsn::automaton_editor::reset ( )
pure virtual

Forget about the current automaton, but do not free it.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ result()

virtual dyn::automaton vcsn::automaton_editor::result ( )
pure virtual

The final result.

Implemented in vcsn::edit_automaton< Aut >.

Referenced by ~automaton_editor().

◆ set_separator()

void vcsn::automaton_editor::set_separator ( char  c)
inline

Set the label separator. Defaults to '+'.

Definition at line 68 of file edit-automaton.hh.

References sep_.

Member Data Documentation

◆ sep_

char vcsn::automaton_editor::sep_ = '+'
protected

The label separator.

Definition at line 75 of file edit-automaton.hh.

Referenced by vcsn::edit_automaton< Aut >::add_entry(), and set_separator().


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