Holds the syntax in a Json::Value tree. More...
#include <JsonSyntaxTree.h>
Public Member Functions | |
| JsonSyntaxTree (const std::string &search_string) | |
| virtual | ~JsonSyntaxTree () |
| bool | addParameters (const std::string &parent_path, const std::string &path, bool is_type, const std::string &action, bool is_action, InputParameters *params, const FileLineInfo &lineinfo, const std::string &classname) |
| Add parameters to the tree. More... | |
| void | addActionTask (const std::string &path, const std::string &action, const std::string &task, const FileLineInfo &lineinfo) |
| Add a task to the tree. More... | |
| const nlohmann::json & | getRoot () const |
| Get the root of the tree. More... | |
| void | addSyntaxType (const std::string &path, const std::string type) |
| Add an associated type to a block. More... | |
| void | addGlobal () |
| Add the global section to the output. More... | |
Static Public Member Functions | |
| static std::string | basicCppType (const std::string &cpp_type) |
| Utilities for making sense of c++ types. More... | |
Protected Member Functions | |
| std::string | buildOptions (const std::iterator_traits< InputParameters::iterator >::value_type &p, bool &out_of_range_allowed, std::map< MooseEnumItem, std::string > &docs) |
| size_t | setParams (InputParameters *params, bool search_match, nlohmann::json &all_params) |
| nlohmann::json & | getJson (const std::string &parent, const std::string &path, bool is_type) |
| nlohmann::json & | getJson (const std::string &path) |
| std::pair< std::string, std::string > | getObjectLabel (const std::string &obj) const |
| std::pair< std::string, std::string > | getActionLabel (const std::string &action) const |
Static Protected Member Functions | |
| static std::string | buildOutputString (const std::iterator_traits< InputParameters::iterator >::value_type &p) |
| static std::vector< std::string > | splitPath (const std::string &path) |
Protected Attributes | |
| nlohmann::json | _root |
| std::string | _search |
| std::map< std::string, std::pair< std::string, std::string > > | _action_label_map |
| std::map< std::string, std::pair< std::string, std::string > > | _object_label_map |
Friends | |
| class | MooseServer |
Holds the syntax in a Json::Value tree.
Definition at line 22 of file JsonSyntaxTree.h.
| JsonSyntaxTree::JsonSyntaxTree | ( | const std::string & | search_string | ) |
Definition at line 29 of file JsonSyntaxTree.C.
|
inlinevirtual |
Definition at line 26 of file JsonSyntaxTree.h.
| void JsonSyntaxTree::addActionTask | ( | const std::string & | path, |
| const std::string & | action, | ||
| const std::string & | task, | ||
| const FileLineInfo & | lineinfo | ||
| ) |
Add a task to the tree.
| path | The path of the action |
| action | Name of the action |
| task | Name of the task |
| lineinfo | The FileLineInfo where the action/task was registered |
Definition at line 355 of file JsonSyntaxTree.C.
Referenced by Moose::Builder::buildJsonSyntaxTree().
| void JsonSyntaxTree::addGlobal | ( | ) |
Add the global section to the output.
Definition at line 158 of file JsonSyntaxTree.C.
Referenced by Moose::Builder::buildJsonSyntaxTree().
| bool JsonSyntaxTree::addParameters | ( | const std::string & | parent_path, |
| const std::string & | path, | ||
| bool | is_type, | ||
| const std::string & | action, | ||
| bool | is_action, | ||
| InputParameters * | params, | ||
| const FileLineInfo & | lineinfo, | ||
| const std::string & | classname | ||
| ) |
Add parameters to the tree.
| parent_path | The parent syntax path that the action belongs to |
| path | The path of the action |
| is_type | Whether this belongs to a "<type>" or not |
| action | Name of the action |
| is_action | Whether we are adding the parameter for an action (except Components) |
| params | The InputParameters to add to the tree |
| lineinfo | The FileLineInfo where the action/path was registered |
| classname | the name of the class being added |
Definition at line 179 of file JsonSyntaxTree.C.
Referenced by Moose::Builder::buildJsonSyntaxTree().
| void JsonSyntaxTree::addSyntaxType | ( | const std::string & | path, |
| const std::string | type | ||
| ) |
Add an associated type to a block.
| path | Path of the block |
| type | Type name to associate the block with |
Definition at line 340 of file JsonSyntaxTree.C.
Referenced by Moose::Builder::buildJsonSyntaxTree().
|
static |
Utilities for making sense of c++ types.
Definition at line 366 of file JsonSyntaxTree.C.
Referenced by MooseServer::addParametersToList(), MooseServer::addValuesToList(), and setParams().
|
protected |
Definition at line 247 of file JsonSyntaxTree.C.
Referenced by setParams().
|
staticprotected |
Definition at line 303 of file JsonSyntaxTree.C.
Referenced by MooseServer::addParametersToList(), and setParams().
|
protected |
Definition at line 417 of file JsonSyntaxTree.C.
Referenced by addParameters().
|
protected |
Definition at line 77 of file JsonSyntaxTree.C.
Referenced by addActionTask(), addParameters(), and addSyntaxType().
|
protected |
Definition at line 57 of file JsonSyntaxTree.C.
|
protected |
Definition at line 406 of file JsonSyntaxTree.C.
Referenced by addParameters().
|
inline |
Get the root of the tree.
Definition at line 64 of file JsonSyntaxTree.h.
Referenced by MooseApp::setupOptions().
|
protected |
Definition at line 99 of file JsonSyntaxTree.C.
Referenced by addGlobal(), and addParameters().
|
staticprotected |
Definition at line 45 of file JsonSyntaxTree.C.
Referenced by getJson(), and getObjectLabel().
|
friend |
Definition at line 108 of file JsonSyntaxTree.h.
|
protected |
Maps storing action/object name to the label and file location
Definition at line 103 of file JsonSyntaxTree.h.
Referenced by getActionLabel(), and JsonSyntaxTree().
|
protected |
Definition at line 104 of file JsonSyntaxTree.h.
Referenced by getObjectLabel(), and JsonSyntaxTree().
|
protected |
Definition at line 98 of file JsonSyntaxTree.h.
Referenced by addGlobal(), addSyntaxType(), getJson(), and getRoot().
|
protected |
Definition at line 99 of file JsonSyntaxTree.h.
Referenced by addGlobal(), addParameters(), addSyntaxType(), and setParams().
1.8.14