9 #include <vcsn/dyn/registries.hh>
31 else if (format ==
"latex" || format ==
"utf8")
32 detail::print_expansion_registry().call(w, out, format);
33 else if (format ==
"text" || format ==
"default" || format ==
"")
38 const std::string format =
"text";
39 detail::print_expansion_registry().call(w, out, format);
42 raise(
"invalid output format for expansion: ",
str_escape(format));
57 else if (format ==
"latex" || format ==
"utf8")
58 detail::print_label_registry().call(w, out, format);
59 else if (format ==
"text" || format ==
"default" || format ==
"")
64 const std::string format =
"text";
65 detail::print_label_registry().call(w, out, format);
68 raise(
"invalid output format for label: ",
str_escape(format));
83 detail::list_polynomial_registry().call(p, out);
84 else if (format ==
"null")
86 else if (format ==
"latex" || format ==
"utf8")
87 detail::print_polynomial_registry().call(p, out, format);
88 else if (format ==
"text" || format ==
"default" || format ==
"")
93 const std::string format =
"text";
94 detail::print_polynomial_registry().call(p, out, format);
97 raise(
"invalid output format for polynomial: ",
str_escape(format));
111 if (format ==
"info")
113 else if (format ==
"null")
115 else if (format ==
"latex" || format ==
"utf8")
116 detail::print_expression_registry().call(exp, out, format);
117 else if (format ==
"text" || format ==
"default" || format ==
"")
122 const std::string format =
"text";
123 detail::print_expression_registry().call(exp, out, format);
126 raise(
"invalid output format for expression: ",
str_escape(format));
140 if (format ==
"null")
142 else if (format ==
"latex" || format ==
"utf8")
143 detail::print_weight_registry().call(w, out, format);
144 else if (format ==
"text" || format ==
"default" || format ==
"")
149 const std::string format =
"text";
150 detail::print_weight_registry().call(w, out, format);
153 raise(
"invalid output format for weight: ",
str_escape(format));
std::ostream & print_expression(const expression &exp, std::ostream &o, const std::string &fmt)
Bridge (print).
std::shared_ptr< const detail::polynomial_base > polynomial
std::shared_ptr< const detail::weight_base > weight
std::ostream & str_escape(std::ostream &os, const std::string &str, const char *special=nullptr)
Output a string, escaping special characters.
std::shared_ptr< const detail::expansion_base > expansion
std::ostream & print_polynomial(const polynomial &polynomial, std::ostream &o, const std::string &fmt)
Bridge (print).
weightset_mixin< detail::r_impl > r
An input/output format for valuesets.
std::string get_format(std::ostream &o)
Get the output format for o.
std::shared_ptr< const detail::label_base > label
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
std::ostream & operator<<(std::ostream &o, type_t t)
std::shared_ptr< const detail::context_base > context
A dyn::context.
std::shared_ptr< detail::automaton_base > automaton
std::ostream & print(const automaton &aut, std::ostream &out, const std::string &format="default")
Print automaton a on o using format format.
xalloc< std::string * > format_flag
void set_format(std::ostream &o, const std::string &format)
Specify the output format for o.
Allocate slots in std::ostreams.
Declaration of vcsn::xalloc.
std::shared_ptr< detail::expression_base > expression
std::ostream & print_label(const label &label, std::ostream &o, const std::string &fmt)
Bridge (print).
std::ostream & print_expansion(const expansion &expansion, std::ostream &o, const std::string &fmt)
Bridge (print).
std::ostream & print_weight(const weight &weight, std::ostream &o, const std::string &fmt)
Bridge (print).
std::ostream & list_polynomial(const polynomial &polynomial, std::ostream &o)
Bridge (list).
std::ostream & info(const automaton &aut, std::ostream &out, bool detailed=false)
Output various facts about an automaton.