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);
118 void print_base(ostream& stream,
const TypeBase *type);
122 virtual void print_impl(ostream& stream,
const Record *type) = 0;
124 virtual void print_impl(ostream& stream,
const Array *type) = 0;
126 virtual void print_impl(ostream& stream,
const Abstract *type) = 0;
128 virtual void print_impl(ostream& stream,
const AdHocAbstract *type) = 0;
130 virtual void print_impl(ostream& stream,
const Selection *type) = 0;
132 virtual void print_impl(ostream& stream,
const Integer *type) = 0;
134 virtual void print_impl(ostream& stream,
const Double *type) = 0;
136 virtual void print_impl(ostream& stream,
const Bool *type) = 0;
138 virtual void print_impl(ostream& stream,
const String *type) = 0;
140 virtual void print_impl(ostream& stream,
const FileName *type) = 0;
142 virtual void print_impl(ostream& stream,
const Parameter *type) = 0;
152 void write_description(std::ostream& stream,
const string& str,
unsigned int padding,
unsigned int hash_count = 1);
158 void write_default_value(std::ostream& stream,
Default dft);
160 void clear_processed_types();
167 bool was_written(std::size_t hash);
171 static const unsigned int padding_size = 4;
208 ostream&
print(ostream& stream)
override;
210 void print_impl(ostream& stream,
const Record *type);
211 void print_impl(ostream& stream,
const Array *type);
212 void print_impl(ostream& stream,
const Abstract *type);
214 void print_impl(ostream& stream,
const Selection *type);
215 void print_impl(ostream& stream,
const Integer *type);
216 void print_impl(ostream& stream,
const Double *type);
217 void print_impl(ostream& stream,
const Bool *type);
218 void print_impl(ostream& stream,
const String *type);
219 void print_impl(ostream& stream,
const FileName *type);
220 void print_impl(ostream& stream,
const Parameter *type);
250 ostream&
print(ostream& stream)
override;
255 std::string escape_description(std::string desc);
263 void print_type_header(ostream& stream,
const TypeBase *type);
265 void print_impl(ostream& stream,
const Record *type);
266 void print_impl(ostream& stream,
const Array *type);
267 void print_impl(ostream& stream,
const Abstract *type);
269 void print_impl(ostream& stream,
const Selection *type);
270 void print_impl(ostream& stream,
const Integer *type);
271 void print_impl(ostream& stream,
const Double *type);
272 void print_impl(ostream& stream,
const Bool *type);
273 void print_impl(ostream& stream,
const String *type);
274 void print_impl(ostream& stream,
const FileName *type);
275 void print_impl(ostream& stream,
const Parameter *type);
279 void print_abstract_record_keys(ostream& stream,
const Abstract *type);
282 void print_program_info(ostream& stream);
285 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)
OutputText(const TypeBase *type)
Constructor.
Class for create text documentation.