This class produces produces a yaml dump of the InputParameters that is machine parsable by any YAML formatter. More...
#include <YAMLFormatter.h>
Public Member Functions | |
YAMLFormatter (bool dump_mode) | |
virtual std::string | preamble () const override |
This method is called once at the beginning of the tree traversal and can be used to build up header information. More... | |
virtual std::string | postscript () const override |
This method is called once at the end of the tree traversal and can be used to add any necessary trailing information to the final formatted string. More... | |
virtual std::string | preTraverse (short depth) const override |
This method is called once at each node in the syntax tree before traversing child nodes. More... | |
virtual std::string | printBlockOpen (const std::string &name, short depth, const std::string &doc) override |
This method is called at the beginning of each Node in the tree. More... | |
virtual std::string | printBlockClose (const std::string &name, short depth) const override |
This method is called at the end of of each Node in the tree. More... | |
virtual std::string | printParams (const std::string &prefix, const std::string &fully_qualified_name, InputParameters ¶ms, short depth, const std::string &search_string, bool &found) override |
This function is called for each InputParameters object stored at a particular node. More... | |
template<typename T > | |
void | addEnumOptionsAndDocs (std::ostringstream &oss, T ¶m, const std::string &indent) |
void | insertNode (std::string syntax, const std::string &action, bool is_action_params=true, InputParameters *params=NULL) |
std::string | print (const std::string &search_string) |
void | seenIt (const std::string &prefix, const std::string &item) |
bool | haveSeenIt (const std::string &prefix, const std::string &item) const |
Protected Member Functions | |
void | buildOutputString (std::ostringstream &output, const std::iterator_traits< InputParameters::iterator >::value_type &p) |
Method for building an output string that accounts for specific types (e.g., Point) More... | |
bool | isLongNames () const |
Protected Attributes | |
bool | _dump_mode |
std::unique_ptr< TreeNode > | _root |
bool | _use_long_names |
This class produces produces a yaml dump of the InputParameters that is machine parsable by any YAML formatter.
Definition at line 22 of file YAMLFormatter.h.
YAMLFormatter::YAMLFormatter | ( | bool | dump_mode | ) |
Definition at line 24 of file YAMLFormatter.C.
void YAMLFormatter::addEnumOptionsAndDocs | ( | std::ostringstream & | oss, |
T & | param, | ||
const std::string & | indent | ||
) |
Definition at line 122 of file YAMLFormatter.C.
Referenced by printParams().
|
protected |
Method for building an output string that accounts for specific types (e.g., Point)
output | Reference to the output string |
iter | InputParameters iterator that is being output |
Definition at line 171 of file YAMLFormatter.C.
Referenced by printParams().
|
inherited |
Definition at line 63 of file SyntaxTree.C.
Referenced by InputFileFormatter::printParams(), and printParams().
|
inherited |
|
protectedinherited |
Definition at line 227 of file SyntaxTree.C.
|
overridevirtual |
This method is called once at the end of the tree traversal and can be used to add any necessary trailing information to the final formatted string.
Reimplemented from SyntaxFormatterInterface.
Definition at line 34 of file YAMLFormatter.C.
|
overridevirtual |
This method is called once at the beginning of the tree traversal and can be used to build up header information.
Reimplemented from SyntaxFormatterInterface.
Definition at line 27 of file YAMLFormatter.C.
|
overridevirtual |
This method is called once at each node in the syntax tree before traversing child nodes.
Reimplemented from SyntaxFormatterInterface.
Definition at line 141 of file YAMLFormatter.C.
|
inherited |
Definition at line 39 of file SyntaxTree.C.
Referenced by ActionWarehouse::printInputFile().
|
overridevirtual |
This method is called at the end of of each Node in the tree.
It is typically used to provide formatting necessary when closing blocks.
Implements SyntaxFormatterInterface.
Definition at line 165 of file YAMLFormatter.C.
|
overridevirtual |
This method is called at the beginning of each Node in the tree.
It is typically used to provide formatting necessary when opening new blocks.
Implements SyntaxFormatterInterface.
Definition at line 149 of file YAMLFormatter.C.
|
overridevirtual |
This function is called for each InputParameters object stored at a particular node.
It is responsible for formatting the parameters for the current node.
Implements SyntaxFormatterInterface.
Definition at line 40 of file YAMLFormatter.C.
|
inherited |
Definition at line 57 of file SyntaxTree.C.
Referenced by InputFileFormatter::printParams(), and printParams().
|
protected |
Definition at line 44 of file YAMLFormatter.h.
|
protectedinherited |
Definition at line 76 of file SyntaxTree.h.
Referenced by SyntaxTree::insertNode(), and SyntaxTree::print().
|
protectedinherited |
Definition at line 77 of file SyntaxTree.h.
Referenced by SyntaxTree::isLongNames().