3 * Implementation of helper classes for expression output. */
6 * GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 /** Next free ID for print_context types. */
30 unsigned next_print_context_id = 0;
33 GINAC_IMPLEMENT_PRINT_CONTEXT(print_context, void)
34 GINAC_IMPLEMENT_PRINT_CONTEXT(print_dflt, print_context)
35 GINAC_IMPLEMENT_PRINT_CONTEXT(print_latex, print_context)
36 GINAC_IMPLEMENT_PRINT_CONTEXT(print_python, print_context)
37 GINAC_IMPLEMENT_PRINT_CONTEXT(print_python_repr, print_context)
38 GINAC_IMPLEMENT_PRINT_CONTEXT(print_tree, print_context)
39 GINAC_IMPLEMENT_PRINT_CONTEXT(print_csrc, print_context)
40 GINAC_IMPLEMENT_PRINT_CONTEXT(print_csrc_float, print_csrc)
41 GINAC_IMPLEMENT_PRINT_CONTEXT(print_csrc_double, print_csrc)
42 GINAC_IMPLEMENT_PRINT_CONTEXT(print_csrc_cl_N, print_csrc)
44 print_context::print_context()
45 : s(std::cout), options(0) {}
46 print_context::print_context(std::ostream & os, unsigned opt)
47 : s(os), options(opt) {}
49 print_dflt::print_dflt()
50 : print_context(std::cout) {}
51 print_dflt::print_dflt(std::ostream & os, unsigned opt)
52 : print_context(os, opt) {}
54 print_latex::print_latex()
55 : print_context(std::cout) {}
56 print_latex::print_latex(std::ostream & os, unsigned opt)
57 : print_context(os, opt) {}
59 print_python::print_python()
60 : print_context(std::cout) {}
61 print_python::print_python(std::ostream & os, unsigned opt)
62 : print_context(os, opt) {}
64 print_python_repr::print_python_repr()
65 : print_context(std::cout) {}
66 print_python_repr::print_python_repr(std::ostream & os, unsigned opt)
67 : print_context(os, opt) {}
69 print_tree::print_tree()
70 : print_context(std::cout), delta_indent(4) {}
71 print_tree::print_tree(unsigned d)
72 : print_context(std::cout), delta_indent(d) {}
73 print_tree::print_tree(std::ostream & os, unsigned opt, unsigned d)
74 : print_context(os, opt), delta_indent(d) {}
76 print_csrc::print_csrc()
77 : print_context(std::cout) {}
78 print_csrc::print_csrc(std::ostream & os, unsigned opt)
79 : print_context(os, opt) {}
81 print_csrc_float::print_csrc_float()
82 : print_csrc(std::cout) {}
83 print_csrc_float::print_csrc_float(std::ostream & os, unsigned opt)
84 : print_csrc(os, opt) {}
86 print_csrc_double::print_csrc_double()
87 : print_csrc(std::cout) {}
88 print_csrc_double::print_csrc_double(std::ostream & os, unsigned opt)
89 : print_csrc(os, opt) {}
91 print_csrc_cl_N::print_csrc_cl_N()
92 : print_csrc(std::cout) {}
93 print_csrc_cl_N::print_csrc_cl_N(std::ostream & os, unsigned opt)
94 : print_csrc(os, opt) {}