18 #ifndef TYPE_OUTPUT_HH_ 19 #define TYPE_OUTPUT_HH_ 70 virtual ostream&
print(ostream& stream) = 0;
94 void get_array_sizes(
Array array,
unsigned int &lower ,
unsigned int &upper );
96 const string & get_record_description(
const Record *rec);
98 const string & get_abstract_description(
const Abstract *a_rec);
100 void get_integer_bounds(
Integer integer,
int &lower ,
int &upper );
102 void get_double_bounds(
Double dbl,
double &lower ,
double &upper );
104 void get_parent_vec(
Record rec,
std::vector< std::shared_ptr<Abstract> > &parent_vec);
106 void get_array_type(
Array array, std::shared_ptr<TypeBase> &arr_type);
110 const string & get_selection_description(
const Selection *sel);
112 void get_adhoc_parent_name(
const AdHocAbstract *a_rec,
string &parent_name);
120 void print_generic(ostream& stream,
const TypeBase *type);
123 void print_base(ostream& stream,
const TypeBase *type);
127 virtual void print_impl(ostream& stream,
const Record *type) = 0;
129 virtual void print_impl(ostream& stream,
const Array *type) = 0;
131 virtual void print_impl(ostream& stream,
const Abstract *type) = 0;
133 virtual void print_impl(ostream& stream,
const AdHocAbstract *type) = 0;
135 virtual void print_impl(ostream& stream,
const Selection *type) = 0;
137 virtual void print_impl(ostream& stream,
const Integer *type) = 0;
139 virtual void print_impl(ostream& stream,
const Double *type) = 0;
141 virtual void print_impl(ostream& stream,
const Bool *type) = 0;
143 virtual void print_impl(ostream& stream,
const String *type) = 0;
145 virtual void print_impl(ostream& stream,
const FileName *type) = 0;
147 virtual void print_impl(ostream& stream,
const Parameter *type) = 0;
157 void write_description(std::ostream& stream,
const string& str,
unsigned int padding,
unsigned int hash_count = 1);
163 void write_default_value(std::ostream& stream,
Default dft);
165 void clear_processed_types();
172 bool was_written(std::size_t hash);
176 static const unsigned int padding_size = 4;
213 ostream&
print(ostream& stream)
override;
215 void print_impl(ostream& stream,
const Record *type);
216 void print_impl(ostream& stream,
const Array *type);
217 void print_impl(ostream& stream,
const Abstract *type);
219 void print_impl(ostream& stream,
const Selection *type);
220 void print_impl(ostream& stream,
const Integer *type);
221 void print_impl(ostream& stream,
const Double *type);
222 void print_impl(ostream& stream,
const Bool *type);
223 void print_impl(ostream& stream,
const String *type);
224 void print_impl(ostream& stream,
const FileName *type);
225 void print_impl(ostream& stream,
const Parameter *type);
255 ostream&
print(ostream& stream)
override;
260 std::string escape_description(std::string desc);
268 void print_type_header(ostream& stream,
const TypeBase *type);
270 void print_impl(ostream& stream,
const Record *type);
271 void print_impl(ostream& stream,
const Array *type);
272 void print_impl(ostream& stream,
const Abstract *type);
274 void print_impl(ostream& stream,
const Selection *type);
275 void print_impl(ostream& stream,
const Integer *type);
276 void print_impl(ostream& stream,
const Double *type);
277 void print_impl(ostream& stream,
const Bool *type);
278 void print_impl(ostream& stream,
const String *type);
279 void print_impl(ostream& stream,
const FileName *type);
280 void print_impl(ostream& stream,
const Parameter *type);
284 void print_abstract_record_keys(ostream& stream,
const Abstract *type);
287 void print_program_info(ostream& stream);
290 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.