Flow123d
JS_before_hm-1804-gf2ad740aa
|
Class for create text documentation. More...
#include <type_output.hh>
Public Member Functions | |
OutputText (const TypeBase *type) | |
Constructor. More... | |
ostream & | print (ostream &stream) override |
Performs output of the documentation into given stream . More... | |
Protected Member Functions | |
void | print_impl (ostream &stream, const Record *type) |
Implements printout of Record type . More... | |
void | print_impl (ostream &stream, const Array *type) |
Implements printout of Array type . More... | |
void | print_impl (ostream &stream, const Abstract *type) |
Implements printout of Abstract type . More... | |
void | print_impl (ostream &stream, const AdHocAbstract *type) |
Implements printout of AdHocAbstract type . More... | |
void | print_impl (ostream &stream, const Selection *type) |
Implements printout of Selection type . More... | |
void | print_impl (ostream &stream, const Integer *type) |
Implements printout of Integer type . More... | |
void | print_impl (ostream &stream, const Double *type) |
Implements printout of Double type . More... | |
void | print_impl (ostream &stream, const Bool *type) |
Implements printout of Bool type . More... | |
void | print_impl (ostream &stream, const String *type) |
Implements printout of String type . More... | |
void | print_impl (ostream &stream, const FileName *type) |
Implements printout of FileName type . More... | |
void | print_impl (ostream &stream, const Parameter *type) |
Implements printout of FileName type . More... | |
Protected Member Functions inherited from Input::Type::OutputBase | |
OutputBase () | |
Constructor. More... | |
virtual | ~OutputBase () |
Destructor. More... | |
void | get_array_sizes (Array array, unsigned int &lower, unsigned int &upper) |
Gets range of array. More... | |
const string & | get_record_description (const Record *rec) |
Gets description of the given record type. More... | |
const string & | get_abstract_description (const Abstract *a_rec) |
Gets description of the given abstract type. More... | |
void | get_integer_bounds (Integer integer, int &lower, int &upper) |
Gets range of integer. More... | |
void | get_double_bounds (Double dbl, double &lower, double &upper) |
Gets range of double. More... | |
void | get_parent_vec (Record rec, std::vector< std::shared_ptr< Abstract > > &parent_vec) |
Gets pointer of parent Abstract for given Record. More... | |
void | get_array_type (Array array, std::shared_ptr< TypeBase > &arr_type) |
Gets pointer of inner type for given Array. More... | |
void | get_default (Record::KeyIter it, string &type, string &value) |
Gets values of default for given record key. More... | |
const string & | get_selection_description (const Selection *sel) |
Gets description of the given selection type. More... | |
void | get_adhoc_parent_name (const AdHocAbstract *a_rec, string &parent_name) |
Gets ancestor_.type_name of the given AdHocAbstract type. More... | |
Abstract::ChildDataIter | get_adhoc_parent_data (const AdHocAbstract *a_rec) |
Gets iterator to begin of ancestor_.child_data_ of the given AdHocAbstract type. More... | |
void | get_attr_and_param_data (const TypeBase *type, TypeBase::attribute_map &attr_map, TypeBase::TypeHash &generic_type_hash, TypeBase::json_string ¶meter_map_to_json) |
Gets data of attributes and parameters of the given type. More... | |
template<class T > | |
void | print_generic (ostream &stream, const TypeBase *type) |
void | print_base (ostream &stream, const TypeBase *type) |
Perform resolution according to actual type (using typeid) and call particular print_impl method. More... | |
void | write_description (std::ostream &stream, const string &str, unsigned int padding, unsigned int hash_count=1) |
Write out a string with given padding of every new line. More... | |
void | write_default_value (std::ostream &stream, Default dft) |
Write value stored in dft . More... | |
void | clear_processed_types () |
Clear all data of processed types. More... | |
bool | was_written (std::size_t hash) |
Returns true if the type was printed out. More... | |
Protected Attributes | |
const TypeBase * | type_ |
Object for which is created printout. More... | |
Protected Attributes inherited from Input::Type::OutputBase | |
DocumentationType | doc_type_ |
Type of documentation output. More... | |
unsigned int | size_setw_ |
temporary value for printout of description (used in std::setw function) More... | |
std::set< std::size_t > | processed_types_hash_ |
Set of hashes of outputed types. Should replace keys. More... | |
TypeBase::TypeHash | full_hash_ |
Content hash of full IST, value is used for key IST_hash. More... | |
Additional Inherited Members | |
Protected Types inherited from Input::Type::OutputBase | |
enum | DocumentationType { key_record, full_record } |
Types of documentation output. More... | |
Static Protected Attributes inherited from Input::Type::OutputBase | |
static const unsigned int | padding_size = 4 |
Padding of new level of printout, used where we use indentation. More... | |
Class for create text documentation.
Record, Abstract and Selection are represented by block of text that contains type name, name, description and count and list of keys (for Record), descendants (for Abstract) or values (for Selection).
In list are displayed information about subtypes, e.g. type name, description, value, range of numeric values etc.
Definition at line 208 of file type_output.hh.
|
inline |
|
overridevirtual |
Performs output of the documentation into given stream
.
The same effect has the reloaded operator '<<'. Returns reference to the same stream.
Implements Input::Type::OutputBase.
Definition at line 242 of file type_output.cc.
|
protectedvirtual |
Implements printout of Abstract type
.
Implements Input::Type::OutputBase.
Definition at line 315 of file type_output.cc.
|
protectedvirtual |
Implements printout of AdHocAbstract type
.
Implements Input::Type::OutputBase.
Definition at line 348 of file type_output.cc.
|
protectedvirtual |
Implements printout of Array type
.
Implements Input::Type::OutputBase.
Definition at line 297 of file type_output.cc.
|
protectedvirtual |
Implements printout of Bool type
.
Implements Input::Type::OutputBase.
Definition at line 414 of file type_output.cc.
|
protectedvirtual |
Implements printout of Double type
.
Implements Input::Type::OutputBase.
Definition at line 407 of file type_output.cc.
|
protectedvirtual |
Implements printout of FileName type
.
Implements Input::Type::OutputBase.
Definition at line 424 of file type_output.cc.
|
protectedvirtual |
Implements printout of Integer type
.
Implements Input::Type::OutputBase.
Definition at line 400 of file type_output.cc.
|
protectedvirtual |
Implements printout of FileName type
.
Implements Input::Type::OutputBase.
|
protectedvirtual |
Implements printout of Record type
.
Implements Input::Type::OutputBase.
Definition at line 250 of file type_output.cc.
|
protectedvirtual |
Implements printout of Selection type
.
Implements Input::Type::OutputBase.
Definition at line 373 of file type_output.cc.
|
protectedvirtual |
Implements printout of String type
.
Implements Input::Type::OutputBase.
Definition at line 419 of file type_output.cc.
|
protected |
Object for which is created printout.
Definition at line 232 of file type_output.hh.