18 #ifndef TYPE_OUTPUT_HH_ 19 #define TYPE_OUTPUT_HH_ 67 virtual ostream&
print(ostream& stream) = 0;
91 void get_array_sizes(
Array array,
unsigned int &lower ,
unsigned int &upper );
93 const string & get_record_description(
const Record *rec);
95 const string & get_abstract_description(
const Abstract *a_rec);
97 void get_integer_bounds(
Integer integer,
int &lower ,
int &upper );
99 void get_double_bounds(
Double dbl,
double &lower ,
double &upper );
101 void get_parent_vec(
Record rec,
std::vector< std::shared_ptr<Abstract> > &parent_vec);
103 void get_array_type(
Array array, std::shared_ptr<TypeBase> &arr_type);
107 const string & get_selection_description(
const Selection *sel);
109 void get_adhoc_parent_name(
const AdHocAbstract *a_rec,
string &parent_name);
117 void print_generic(ostream& stream,
const TypeBase *type);
120 void print_base(ostream& stream,
const TypeBase *type);
124 virtual void print_impl(ostream& stream,
const Record *type) = 0;
126 virtual void print_impl(ostream& stream,
const Array *type) = 0;
128 virtual void print_impl(ostream& stream,
const Abstract *type) = 0;
130 virtual void print_impl(ostream& stream,
const AdHocAbstract *type) = 0;
132 virtual void print_impl(ostream& stream,
const Selection *type) = 0;
134 virtual void print_impl(ostream& stream,
const Integer *type) = 0;
136 virtual void print_impl(ostream& stream,
const Double *type) = 0;
138 virtual void print_impl(ostream& stream,
const Bool *type) = 0;
140 virtual void print_impl(ostream& stream,
const String *type) = 0;
142 virtual void print_impl(ostream& stream,
const FileName *type) = 0;
144 virtual void print_impl(ostream& stream,
const Parameter *type) = 0;
154 void write_description(std::ostream& stream,
const string& str,
unsigned int padding,
unsigned int hash_count = 1);
160 void write_default_value(std::ostream& stream,
Default dft);
162 void clear_processed_types();
169 bool was_written(std::size_t hash);
173 static const unsigned int padding_size = 4;
210 ostream&
print(ostream& stream)
override;
212 void print_impl(ostream& stream,
const Record *type);
213 void print_impl(ostream& stream,
const Array *type);
214 void print_impl(ostream& stream,
const Abstract *type);
216 void print_impl(ostream& stream,
const Selection *type);
217 void print_impl(ostream& stream,
const Integer *type);
218 void print_impl(ostream& stream,
const Double *type);
219 void print_impl(ostream& stream,
const Bool *type);
220 void print_impl(ostream& stream,
const String *type);
221 void print_impl(ostream& stream,
const FileName *type);
222 void print_impl(ostream& stream,
const Parameter *type);
252 ostream&
print(ostream& stream)
override;
257 std::string escape_description(std::string desc);
265 void print_type_header(ostream& stream,
const TypeBase *type);
267 void print_impl(ostream& stream,
const Record *type);
268 void print_impl(ostream& stream,
const Array *type);
269 void print_impl(ostream& stream,
const Abstract *type);
271 void print_impl(ostream& stream,
const Selection *type);
272 void print_impl(ostream& stream,
const Integer *type);
273 void print_impl(ostream& stream,
const Double *type);
274 void print_impl(ostream& stream,
const Bool *type);
275 void print_impl(ostream& stream,
const String *type);
276 void print_impl(ostream& stream,
const FileName *type);
277 void print_impl(ostream& stream,
const Parameter *type);
281 void print_abstract_record_keys(ostream& stream,
const Abstract *type);
284 void print_program_info(ostream& stream);
287 void print_full_hash(ostream& stream);
const TypeBase * type_
Object for which is created printout.
FMT_API void print(std::FILE *f, CStringRef format_str, ArgList args)
static constexpr bool value
OutputText(const TypeBase *type)
Constructor.
Class for create text documentation.