File indexing completed on 2026-05-19 08:08:31
0001
0002
0003 #ifndef _CL_OUTPUT_H
0004 #define _CL_OUTPUT_H
0005
0006 #include "cln/types.h"
0007 #include "cln/floatformat.h"
0008 #include "cln/io.h"
0009 #include "cln/string.h"
0010
0011 namespace cln {
0012
0013 struct cl_print_rational_flags {
0014
0015 unsigned int rational_base;
0016
0017
0018 bool rational_readably;
0019
0020 cl_print_rational_flags () :
0021 rational_base (10),
0022 rational_readably (false) {}
0023 };
0024
0025 struct cl_print_float_flags {
0026
0027 bool float_readably;
0028
0029 float_format_t default_float_format;
0030
0031 cl_print_float_flags () :
0032 float_readably (false),
0033 default_float_format (float_format_ffloat) {}
0034 };
0035
0036 struct cl_print_real_flags : cl_print_rational_flags, cl_print_float_flags {};
0037
0038 struct cl_print_complex_flags {
0039
0040 bool complex_readably;
0041
0042 cl_print_complex_flags () :
0043 complex_readably (false) {}
0044 };
0045
0046 struct cl_print_number_flags : cl_print_real_flags, cl_print_complex_flags {};
0047
0048 enum cl_print_vector_syntax_t {
0049 vsyntax_algebraic,
0050 vsyntax_pretty,
0051 vsyntax_commonlisp
0052 };
0053
0054 struct cl_print_vector_flags {
0055 cl_print_vector_syntax_t vector_syntax;
0056
0057 cl_print_vector_flags () :
0058 vector_syntax (vsyntax_pretty) {}
0059 };
0060
0061 struct cl_print_univpoly_flags {
0062 cl_string univpoly_varname;
0063
0064 cl_print_univpoly_flags () :
0065 univpoly_varname ("x") {}
0066 };
0067
0068 struct cl_print_flags : cl_print_number_flags, cl_print_vector_flags, cl_print_univpoly_flags {};
0069
0070 extern cl_print_flags default_print_flags;
0071
0072 }
0073
0074 #endif