22 const std::string& format)
24 if (format ==
"dot" || format ==
"default" || format ==
"")
26 else if (format ==
"dot2tex")
28 else if (format ==
"efsm")
30 else if (format ==
"fado")
32 else if (format ==
"grail")
34 else if (format ==
"info")
36 else if (format ==
"info,detailed")
38 else if (format ==
"null")
40 else if (format ==
"tikz")
43 raise(
"invalid output format for automaton: ",
str_escape(format));
55 return detail::print_ctx_registry().call(ctx, out, format);
69 else if (format ==
"latex")
70 detail::print_expansion_registry().call(w, out, format);
71 else if (format ==
"text" || format ==
"default" || format ==
"")
76 const std::string format =
"text";
77 detail::print_expansion_registry().call(w, out, format);
80 raise(
"invalid output format for expansion: ",
str_escape(format));
95 else if (format ==
"latex")
96 detail::print_label_registry().call(w, out, format);
97 else if (format ==
"text" || format ==
"default" || format ==
"")
102 const std::string format =
"text";
103 detail::print_label_registry().call(w, out, format);
106 raise(
"invalid output format for label: ",
str_escape(format));
120 if (format ==
"list")
121 detail::list_polynomial_registry().call(p, out);
122 else if (format ==
"null")
124 else if (format ==
"latex")
125 detail::print_polynomial_registry().call(p, out, format);
126 else if (format ==
"text" || format ==
"default" || format ==
"")
131 const std::string format =
"text";
132 detail::print_polynomial_registry().call(p, out, format);
135 raise(
"invalid output format for polynomial: ",
str_escape(format));
147 print(
const ratexp& exp, std::ostream& out,
const std::string& format)
149 if (format ==
"info")
151 else if (format ==
"null")
153 else if (format ==
"latex")
154 detail::print_ratexp_registry().call(exp, out, format);
155 else if (format ==
"text" || format ==
"default" || format ==
"")
160 const std::string format =
"text";
161 detail::print_ratexp_registry().call(exp, out, format);
164 raise(
"invalid output format for ratexp: ",
str_escape(format));
178 if (format ==
"null")
180 else if (format ==
"latex")
181 detail::print_weight_registry().call(w, out, format);
182 else if (format ==
"text" || format ==
"default" || format ==
"")
187 const std::string format =
"text";
188 detail::print_weight_registry().call(w, out, format);
191 raise(
"invalid output format for weight: ",
str_escape(format));
std::shared_ptr< detail::automaton_base > automaton
std::string get_format(std::ostream &o)
Get the output format for o.
std::ostream & list_polynomial(const polynomial &polynomial, std::ostream &o)
Bridge.
std::ostream & operator<<(std::ostream &o, type_t t)
std::ostream & print_polynomial(const polynomial &polynomial, std::ostream &o, const std::string &format)
Bridge.
std::ostream & print_ctx(const context &ctx, std::ostream &o, const std::string &format)
Bridge.
std::ostream & print(const automaton &a, std::ostream &o, const std::string &format="default")
Print automaton a on o using format format.
std::ostream & print_weight(const weight &weight, std::ostream &o, const std::string &format)
Bridge.
std::shared_ptr< const detail::weight_base > weight
std::ostream & str_escape(std::ostream &os, const std::string &str)
Output a string, escaping special characters.
std::shared_ptr< detail::ratexp_base > ratexp
std::ostream & print_expansion(const expansion &expansion, std::ostream &o, const std::string &format)
Bridge.
std::shared_ptr< const detail::expansion_base > expansion
Declaration of vcsn::xalloc.
std::ostream & print_ratexp(const ratexp &exp, std::ostream &o, const std::string &format)
Bridge.
std::ostream & grail(const automaton &aut, std::ostream &out)
Output in Grail format.
std::ostream & fado(const automaton &aut, std::ostream &out)
Output in FAdo format.
Allocate slots in std::ostreams.
std::ostream & print_label(const label &label, std::ostream &o, const std::string &format)
Bridge.
std::shared_ptr< const detail::label_base > label
std::shared_ptr< const detail::context_base > context
std::ostream & tikz(const automaton &aut, std::ostream &out)
Output aut in LaTeX's TikZ format.
std::ostream & dot(const automaton &aut, std::ostream &out, bool dot2tex=false)
Output aut in GraphViz' Dot format.
std::ostream & info(const automaton &aut, std::ostream &out, bool detailed=false)
Output various facts about an automaton.
xalloc< std::string * > format_flag
void set_format(std::ostream &o, const std::string &format)
Specify the output format for o.
std::ostream & efsm(const automaton &aut, std::ostream &out)
Output in Extended FSM format.
std::shared_ptr< const detail::polynomial_base > polynomial
variadic_mul_mixin< detail::r_impl > r