Class for static purpose only (i.e. not constructible) that gather data from a tree (JSON::Node object) read by JSON::Reader in a .json file. More...
#include <jsonLoader.h>
Static Public Member Functions | |
| template<typename Targ > | |
| static std::optional< Targ > | parseArgument (Node *node, std::string const &specifier, bool mandatory=false) |
| Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children. More... | |
| template<typename Targ > | |
| static std::optional< Targ > | parseArgument (std::unique_ptr< Object > const &object, std::string const &specifier, bool mandatory=false) |
| Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children. More... | |
| static Node * | parseNode (Node *parent, std::string const &specifier, bool mandatory=false) |
| Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children. More... | |
| static Node * | parseNode (std::unique_ptr< Object > const &parent, std::string const &specifier, bool mandatory=false) |
| Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children. More... | |
| template<typename Targ > | |
| static Targ | interpretObject (Object *object) |
| Returns the argument with the correct type from an Object that must be a Leaf. More... | |
| static Node * | convert (const std::unique_ptr< Object > &node) |
| template<typename Targ > | |
| static std::optional< Targ > | parseArgument (Node *node, std::string const &specifier, bool mandatory=false) |
| Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children. More... | |
| template<typename Targ > | |
| static std::optional< Targ > | parseArgument (std::unique_ptr< Object > const &object, std::string const &specifier, bool mandatory=false) |
| Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children. More... | |
| static Node * | parseNode (Node *parent, std::string const &specifier, bool mandatory=false) |
| Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children. More... | |
| static Node * | parseNode (std::unique_ptr< Object > const &parent, std::string const &specifier, bool mandatory=false) |
| Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children. More... | |
| template<typename Targ > | |
| static Targ | interpretObject (Object *object) |
| Returns the argument with the correct type from an Object that must be a Leaf. More... | |
| static Node * | convert (const std::unique_ptr< Object > &node) |
Class for static purpose only (i.e. not constructible) that gather data from a tree (JSON::Node object) read by JSON::Reader in a .json file.
|
inlinestatic |
Returns the argument with the correct type from an Object that must be a Leaf.
| Targ | Type of the argument to get (int, double, string, ...). |
| object | unique_ptr to the Object. Must be a Leaf a type Targ, else this function raises an error. |
|
inlinestatic |
Returns the argument with the correct type from an Object that must be a Leaf.
| Targ | Type of the argument to get (int, double, string, ...). |
| object | unique_ptr to the Object. Must be a Leaf a type Targ, else this function raises an error. |
|
inlinestatic |
Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children.
| Targ | Type of the considered Leaf (int, double, string, ...). |
| node | Pointer to the Node in which we search the Leaf. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the argument is mandatory. If true and not found, this function raises an error. |
|
inlinestatic |
Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children.
| Targ | Type of the considered Leaf (int, double, string, ...). |
| node | Pointer to the Node in which we search the Leaf. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the argument is mandatory. If true and not found, this function raises an error. |
|
inlinestatic |
Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children.
| Targ | Type of the considered Leaf (int, double, string, ...). |
| object | unique_ptr to the Object in which we search the Leaf. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the argument is mandatory. If true and not found, this function raises an error. |
|
inlinestatic |
Allows to get arguments of a node, given the specifier and the type of the desired object. This function is not recursive: We search in children only, not grand-children.
| Targ | Type of the considered Leaf (int, double, string, ...). |
| object | unique_ptr to the Object in which we search the Leaf. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the argument is mandatory. If true and not found, this function raises an error. |
|
static |
Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children.
| parent | Pointer to the Node in which we search the sub-Node. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the sub-Node is mandatory. If true and not found, this function raises an error. |
|
static |
Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children.
| parent | Pointer to the Node in which we search the sub-Node. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the sub-Node is mandatory. If true and not found, this function raises an error. |
|
static |
Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children.
| parent | unique_ptr to the Object in which we search the sub-Node. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the sub-Node is mandatory. If true and not found, this function raises an error. |
|
static |
Allows to get a subNode of a node, given the specifier. This function is not recursive: We search in children only, not grand-children.
| parent | unique_ptr to the Object in which we search the sub-Node. |
| specifier | Specifier to search. |
| mandatory | Tells if the presence of the sub-Node is mandatory. If true and not found, this function raises an error. |
1.8.13