|
Flow123d
jenkins-Flow123d-linux-release-multijob-282
|
Base abstract class for output description of the Input::Type tree. More...
#include <type_output.hh>


Classes | |
| class | ProcessedTypes |
| Internal data class. Contains flags of written Input::Types objects and functionality of regular expression filter of Input::Types full names. More... | |
Public Member Functions | |
| virtual ostream & | print (ostream &stream) |
Performs output of the documentation into given stream. The same effect has the reloaded operator '<<'. Returns reference to the same stream. More... | |
| void | set_filter (string regex_filter) |
Initializes and allocates regular expression filter regex_filter. More... | |
Protected Types | |
| enum | DocumentationType { key_record, full_record } |
Protected Member Functions | |
| OutputBase (const TypeBase *type, unsigned int depth=0) | |
| 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... | |
| void | get_record_key (Record rec, unsigned int key_idx, Record::Key &key) |
| Gets record key for given index. 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_ptr (Record rec, boost::shared_ptr< AbstractRecord > &parent_ptr) |
| Gets pointer of parent AbstractRecord for given Record. More... | |
| void | get_array_type (Array array, boost::shared_ptr< const 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... | |
| const string & | get_adhoc_parent_name (const AdHocAbstractRecord *a_rec) |
| Gets parent_name_ of the given AdHocAbstractRecord type. More... | |
| AbstractRecord::ChildDataIter | get_adhoc_parent_data (const AdHocAbstractRecord *a_rec) |
| Gets iterator to begin of parent_data_ of the given AdHocAbstractRecord type. More... | |
| const void * | get_record_data (const Record *rec) |
| Gets pointer of inner data for given Record. More... | |
| const void * | get_abstract_record_data (const AbstractRecord *a_rec) |
| Gets pointer of inner data for given AbstractRecord. More... | |
| const void * | get_selection_data (const Selection *sel) |
| Gets pointer of inner data for given Selection. More... | |
| const void * | get_array_data (const Array *array) |
| Gets pointer of inner data for given Array. More... | |
| const void * | get_type_base_data (const TypeBase *type) |
| Gets pointer of inner data for given TypeBase. More... | |
| void | print (ostream &stream, const TypeBase *type, unsigned int depth) |
| virtual void | print_impl (ostream &stream, const Record *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const Array *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const AbstractRecord *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const AdHocAbstractRecord *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const Selection *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const Integer *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const Double *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const Bool *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const String *type, unsigned int depth)=0 |
| virtual void | print_impl (ostream &stream, const FileName *type, unsigned int depth)=0 |
| void | write_description (std::ostream &stream, const string &str, unsigned int padding, unsigned int hash_count=1) |
| void | write_default_value (std::ostream &stream, Default dft) |
Protected Attributes | |
| const TypeBase * | type_ |
| Object for which is created printout. More... | |
| unsigned int | depth_ |
| Depth of printout (for value 0 is printed all input tree) More... | |
| 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::string | format_head |
| std::string | format_tail |
| ProcessedTypes | doc_flags_ |
| Stores flags and references of processed type. More... | |
Static Protected Attributes | |
| static const unsigned int | padding_size = 4 |
| Padding of new level of printout, used where we use indentation. More... | |
Base abstract class for output description of the Input::Type tree.
Output into various formats is implemented by derived classes:
Usage example:
Definition at line 37 of file type_output.hh.
|
protected |
Types of documentation output.
Used in print_impl methods for basic and full printout of Input::Type
| Enumerator | |
|---|---|
| key_record |
Printout only basic data. |
| full_record |
Printout full documentation. |
Definition at line 61 of file type_output.hh.
|
protected |
Constructor
| type | Stores input sequence |
| depth | Depth of output |
Definition at line 29 of file type_output.cc.
|
protectedvirtual |
Destructor.
Definition at line 25 of file type_output.cc.
|
protected |
Gets pointer of inner data for given AbstractRecord.
Definition at line 138 of file type_output.cc.

|
protected |
Gets iterator to begin of parent_data_ of the given AdHocAbstractRecord type.
Definition at line 127 of file type_output.cc.

|
protected |
Gets parent_name_ of the given AdHocAbstractRecord type.
Definition at line 122 of file type_output.cc.

|
protected |
Gets pointer of inner data for given Array.
Definition at line 147 of file type_output.cc.

|
protected |
Gets range of array.
Definition at line 70 of file type_output.cc.

|
protected |
Gets pointer of inner type for given Array.
Definition at line 77 of file type_output.cc.

|
protected |
Gets values of default for given record key.
Definition at line 102 of file type_output.cc.

|
protected |
Gets range of double.
Definition at line 63 of file type_output.cc.

|
protected |
Gets range of integer.
Definition at line 56 of file type_output.cc.

|
protected |
Gets pointer of parent AbstractRecord for given Record.
Definition at line 96 of file type_output.cc.

|
protected |
Gets pointer of inner data for given Record.
Definition at line 134 of file type_output.cc.

|
protected |
Gets description of the given record type.
Definition at line 83 of file type_output.cc.

|
protected |
Gets record key for given index.
Definition at line 89 of file type_output.cc.
|
protected |
Gets pointer of inner data for given Selection.
Definition at line 142 of file type_output.cc.

|
protected |
Gets description of the given selection type.
Definition at line 117 of file type_output.cc.

|
protected |
Gets pointer of inner data for given TypeBase.
Definition at line 152 of file type_output.cc.
|
virtual |
Performs output of the documentation into given stream. The same effect has the reloaded operator '<<'. Returns reference to the same stream.
Reimplemented in Input::Type::OutputLatex, and Input::Type::OutputJSONTemplate.
Definition at line 38 of file type_output.cc.

|
protected |
Perform resolution according to actual type (using typeid) and call particular print_impl method.
Definition at line 171 of file type_output.cc.
|
protectedpure virtual |
Implements printout of Record type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.

|
protectedpure virtual |
Implements printout of Array type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of AbstractRecord type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of AdHocAbstractRecord type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of Selection type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of Integer type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of Double type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of Bool type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of String type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
|
protectedpure virtual |
Implements printout of FileName type
Implemented in Input::Type::OutputJSONMachine, Input::Type::OutputLatex, Input::Type::OutputJSONTemplate, and Input::Type::OutputText.
| void Input::Type::OutputBase::set_filter | ( | string | regex_filter | ) |
Initializes and allocates regular expression filter regex_filter.
Full names of Input::Type::Record objects are passed through the filter, deleting the first match of the regular expression given by regex_filter. Full Record description is performed only for the first occurrence of the filtered name, further Records with same filtered name are ignored (reported only in short descriptions of individual keys or array subtype, etc.) See ProcessedTypes for details.
Definition at line 49 of file type_output.cc.

|
protected |
Write value stored in dft.
Enclose value in quotes if it's needed or write info that value is optional or obligatory.
Definition at line 214 of file type_output.cc.

|
protected |
Write out a string with given padding of every new line.
| stream | Output stream |
| str | Printed description |
| padding | Number of spaces added from left |
| hash_count | Count of '#' chars in description |
Definition at line 222 of file type_output.cc.

|
protected |
Depth of printout (for value 0 is printed all input tree)
Definition at line 186 of file type_output.hh.
|
protected |
Stores flags and references of processed type.
Definition at line 290 of file type_output.hh.
|
protected |
Type of documentation output.
Definition at line 188 of file type_output.hh.
|
protected |
Header of the format, printed before first call of recursive print. see print(stream) method
Definition at line 194 of file type_output.hh.
|
protected |
Tail of the format, printed after all recursive prints are finished. see print(stream) method
Definition at line 197 of file type_output.hh.
|
staticprotected |
Padding of new level of printout, used where we use indentation.
Definition at line 182 of file type_output.hh.
|
protected |
temporary value for printout of description (used in std::setw function)
Definition at line 190 of file type_output.hh.
|
protected |
Object for which is created printout.
Definition at line 184 of file type_output.hh.
1.8.5