Vcsn  2.3
Be Rational
vcsn::detail::tikzer< Aut > Class Template Reference

Format automaton to TikZ format. More...

#include <tikz.hh>

Inheritance diagram for vcsn::detail::tikzer< Aut >:
Collaboration diagram for vcsn::detail::tikzer< Aut >:

Public Types

using super_t = printer< Aut >
 
using automaton_t = Aut
 
using state_t = state_t_of< automaton_t >
 
using polynomial_t = typename polynomialset_t::value_t
 
using transition_t = transition_t_of< automaton_t >
 
using weight_t = weight_t_of< automaton_t >
 
- Public Types inherited from vcsn::detail::printer< Aut >
using state_t = state_t_of< automaton_t >
 

Public Member Functions

void print_finitial_ (const std::string &kind, const weight_t &w) const
 Format an initial/final weight. More...
 
void operator() ()
 
- Public Member Functions inherited from vcsn::detail::printer< Aut >
 printer (const automaton_t &aut, std::ostream &out)
 

Private Member Functions

void print_states_ () const
 Pretty-print states. More...
 
void print_transitions_ (const state_t src, const state_t dst, const polynomial_t &entry) const
 Print the transitions between state src and state dst. More...
 
void print_transitions_ ()
 Print all the transitions, sorted by src state, then dst state. More...
 

Additional Inherited Members

- Protected Types inherited from vcsn::detail::printer< Aut >
using automaton_t = Aut
 
using context_t = context_t_of< automaton_t >
 
using label_t = label_t_of< automaton_t >
 
using transition_t = transition_t_of< automaton_t >
 
using weightset_t = weightset_t_of< automaton_t >
 
using weight_t = weight_t_of< automaton_t >
 
using polynomialset_t = polynomialset< context_t >
 
using polynomial_t = typename polynomialset_t::value_t
 
using states_t = std::vector< state_t >
 A list of states. More...
 
- Protected Member Functions inherited from vcsn::detail::printer< Aut >
virtual std::string label_ (const label_t &l) const
 Convert a label to its representation. More...
 
virtual void print_transition_ (transition_t t) const
 Output the transition t. More...
 
void print_state_ (const state_t s)
 Output transitions, sorted lexicographically on (Label, Dest). More...
 
void print_transitions_ ()
 Output transitions, sorted lexicographically. More...
 
void list_states_ (const states_t &ss)
 List names of states in ss, preceded by ' '. More...
 
states_t initials_ ()
 The list of initial states, sorted. More...
 
states_t finals_ ()
 The list of final states, sorted. More...
 
- Protected Attributes inherited from vcsn::detail::printer< Aut >
automaton_t aut_
 The automaton we have to output. More...
 
std::ostream & os_
 Output stream. More...
 
const labelset_t_of< automaton_t > & ls_ = *aut_->labelset()
 Short-hand to the labelset. More...
 
const weightset_tws_ = *aut_->weightset()
 Short-hand to the weightset. More...
 
const polynomialset_t ps_ {aut_->context()}
 Short-hand to the polynomialset used to print the entries. More...
 

Detailed Description

template<Automaton Aut>
class vcsn::detail::tikzer< Aut >

Format automaton to TikZ format.

Template Parameters
Autan automaton type, not a pointer type.

Definition at line 26 of file tikz.hh.

Member Typedef Documentation

template<Automaton Aut>
using vcsn::detail::printer< Aut >::automaton_t = Aut

Definition at line 27 of file printer.hh.

template<Automaton Aut>
using vcsn::detail::printer< Aut >::polynomial_t = typename polynomialset_t::value_t

Definition at line 46 of file printer.hh.

template<Automaton Aut>
using vcsn::detail::printer< Aut >::state_t = state_t_of<automaton_t>

Definition at line 37 of file printer.hh.

template<Automaton Aut>
using vcsn::detail::tikzer< Aut >::super_t = printer<Aut>

Definition at line 29 of file tikz.hh.

template<Automaton Aut>
using vcsn::detail::printer< Aut >::transition_t = transition_t_of<automaton_t>

Definition at line 42 of file printer.hh.

template<Automaton Aut>
using vcsn::detail::printer< Aut >::weight_t = weight_t_of<automaton_t>

Definition at line 44 of file printer.hh.

Member Function Documentation

template<Automaton Aut>
void vcsn::detail::tikzer< Aut >::operator() ( )
inline

Definition at line 59 of file tikz.hh.

References vcsn::detail::printer< Aut >::os_, vcsn::detail::tikzer< Aut >::print_states_(), and vcsn::detail::tikzer< Aut >::print_transitions_().

Here is the call graph for this function:

template<Automaton Aut>
void vcsn::detail::tikzer< Aut >::print_finitial_ ( const std::string &  kind,
const weight_t w 
) const
inline

Format an initial/final weight.

Parameters
kindthe weight name (e.g., "initial").
wthe weight

Definition at line 46 of file tikz.hh.

References vcsn::format::latex, vcsn::detail::printer< Aut >::os_, and vcsn::detail::printer< Aut >::ws_.

Referenced by vcsn::detail::tikzer< Aut >::print_states_().

template<Automaton Aut>
void vcsn::detail::tikzer< Aut >::print_states_ ( ) const
inlineprivate

Pretty-print states.

Definition at line 84 of file tikz.hh.

References vcsn::detail::printer< Aut >::aut_, vcsn::format::latex, vcsn::detail::printer< Aut >::os_, and vcsn::detail::tikzer< Aut >::print_finitial_().

Referenced by vcsn::detail::tikzer< Aut >::operator()().

Here is the call graph for this function:

template<Automaton Aut>
void vcsn::detail::tikzer< Aut >::print_transitions_ ( const state_t  src,
const state_t  dst,
const polynomial_t entry 
) const
inlineprivate

Print the transitions between state src and state dst.

Definition at line 116 of file tikz.hh.

References vcsn::detail::printer< Aut >::aut_, vcsn::format::latex, vcsn::detail::printer< Aut >::os_, and vcsn::detail::printer< Aut >::ps_.

template<Automaton Aut>
void vcsn::detail::tikzer< Aut >::print_transitions_ ( )
inlineprivate

Print all the transitions, sorted by src state, then dst state.

Definition at line 132 of file tikz.hh.

References vcsn::detail::printer< Aut >::aut_, vcsn::detail::out(), and vcsn::detail::printer< Aut >::ps_.

Referenced by vcsn::detail::tikzer< Aut >::operator()().

Here is the call graph for this function:


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