![]() |
|
PhoenixFileParser
1.5.1
Set of tools to ease file parsing
|
Configuration of values. More...
#include <ConfigNode.h>
Collaboration diagram for ConfigNode:Public Member Functions | |
| ConfigNode * | addChild (const PString &name="") |
| Add a child in the current ConfigNode. | |
| ConfigNode * | addValue (const PString &value) |
| Add a value in the ConfigNode. | |
| void | clear () |
| Clear the vector of children. | |
| ConfigNode () | |
| Constructor of class ConfigNode. | |
| ConfigNode * | getChild (const PString &name) |
| Get the child of the given name. | |
| const ConfigNode * | getChild (const PString &name) const |
| Get the child of the given name. | |
| const PPath & | getFileName () const |
| Get current file name. | |
| PLocation | getLocation () const |
| Gets the location of the ConfigNode. | |
| std::map< PString, ConfigNode * > & | getMapChild () |
| Gets the mapChild of the ConfigNode. | |
| const std::map< PString, ConfigNode * > & | getMapChild () const |
| Gets the mapChild of the ConfigNode. | |
| PString & | getName () |
| Gets the name of the ConfigNode. | |
| const PString & | getName () const |
| Gets the name of the ConfigNode. | |
| const ConfigNode * | getParent () const |
| Gets the parent of the ConfigNode. | |
| PString | getString () const |
| Get string value without " or ' at the beginning of the end. | |
| PString & | getValue () |
| Gets the value of the ConfigNode. | |
| const PString & | getValue () const |
| Gets the value of the ConfigNode. | |
| std::vector< ConfigNode * > & | getVecChild () |
| Gets the vecChild of the ConfigNode. | |
| const std::vector< ConfigNode * > & | getVecChild () const |
| Gets the vecChild of the ConfigNode. | |
| bool | hasMapChild () const |
| Say if the current ConfigNode has a map of children. | |
| bool | hasValue () const |
| Say if the current ConfigNode has a value. | |
| bool | hasVecChild () const |
| Say if the current ConfigNode has a vector of children. | |
| ConfigNodeIter | iter (std::ostream &out=std::cout) const |
| Create an iterator of ConfigNode. | |
| ConfigNodeIter | iterWrite (std::ostream &out=std::cout) |
| Create an iterator of ConfigNode. | |
| void | setFileName (const PPath &fileName) |
| Set the fileName of the current ConfigNode. | |
| void | setLineCol (const PLocation &location) |
| Set the line and the column of the current ConfigNode. | |
| void | setLocation (const PLocation &location) |
| Sets the location of the ConfigNode. | |
| void | setMapChild (const std::map< PString, ConfigNode * > &mapChild) |
| Sets the mapChild of the ConfigNode. | |
| void | setName (const PString &name) |
| Sets the name of the ConfigNode. | |
| void | setValue (const PString &value) |
| Sets the value of the ConfigNode. | |
| void | setVecChild (const std::vector< ConfigNode * > &vecChild) |
| Sets the vecChild of the ConfigNode. | |
| virtual | ~ConfigNode () |
| Destructor of class ConfigNode. | |
Private Member Functions | |
| void | initialisationConfigNode () |
| Initialisation Function of class ConfigNode. | |
| void | setParent (const ConfigNode *parent) |
| Sets the parent of the ConfigNode. | |
Private Attributes | |
| PLocation | p_location |
| Location of the definition of the current ConfigNode. | |
| std::map< PString, ConfigNode * > | p_mapChild |
| Map of sub ConfigNode. | |
| PString | p_name |
| Name of the current entry. | |
| const ConfigNode * | p_parent |
| Parent of the current ConfigNode. | |
| PString | p_value |
| Value of the current entry. | |
| std::vector< ConfigNode * > | p_vecChild |
| Vector of sub ConfigNode. | |
Configuration of values.
Definition at line 18 of file ConfigNode.h.
| ConfigNode::ConfigNode | ( | ) |
Constructor of class ConfigNode.
Definition at line 11 of file ConfigNode.cpp.
References initialisationConfigNode().
Referenced by addChild(), addValue(), getChild(), getChild(), getParent(), and setParent().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Destructor of class ConfigNode.
Definition at line 16 of file ConfigNode.cpp.
References clear().
Here is the call graph for this function:| ConfigNode * ConfigNode::addChild | ( | const PString & | name = "" | ) |
Add a child in the current ConfigNode.
| name | : name of the child |
Definition at line 173 of file ConfigNode.cpp.
References ConfigNode(), getChild(), p_mapChild, p_vecChild, setName(), and setParent().
Referenced by addValue(), parser_json_key(), and parser_json_list().
Here is the call graph for this function:
Here is the caller graph for this function:| ConfigNode * ConfigNode::addValue | ( | const PString & | value | ) |
Add a value in the ConfigNode.
| value | : value to be added in the ConfigNode |
Definition at line 220 of file ConfigNode.cpp.
References addChild(), ConfigNode(), and setValue().
Here is the call graph for this function:| void ConfigNode::clear | ( | ) |
Clear the vector of children.
Definition at line 255 of file ConfigNode.cpp.
References p_mapChild, and p_vecChild.
Referenced by ~ConfigNode().
Here is the caller graph for this function:| ConfigNode * ConfigNode::getChild | ( | const PString & | name | ) |
Get the child of the given name.
| name | : name of the child |
Definition at line 194 of file ConfigNode.cpp.
References ConfigNode(), and p_mapChild.
Referenced by addChild(), parser_json_key(), phoenix_get_string(), phoenix_get_string(), phoenix_get_value(), phoenix_get_value(), phoenix_get_vecstring(), and phoenix_load_vecValue().
Here is the call graph for this function:
Here is the caller graph for this function:| const ConfigNode * ConfigNode::getChild | ( | const PString & | name | ) | const |
Get the child of the given name.
| name | : name of the child |
Definition at line 207 of file ConfigNode.cpp.
References ConfigNode(), and p_mapChild.
Here is the call graph for this function:| const PPath & ConfigNode::getFileName | ( | ) | const |
Get current file name.
Definition at line 150 of file ConfigNode.cpp.
References p_location, and p_parent.
Referenced by getLocation().
Here is the caller graph for this function:| PLocation ConfigNode::getLocation | ( | ) | const |
Gets the location of the ConfigNode.
Definition at line 121 of file ConfigNode.cpp.
References getFileName(), p_location, and PLocation::setFileName().
Referenced by parser_json_key().
Here is the call graph for this function:
Here is the caller graph for this function:| std::map< PString, ConfigNode * > & ConfigNode::getMapChild | ( | ) |
Gets the mapChild of the ConfigNode.
Definition at line 114 of file ConfigNode.cpp.
References p_mapChild.
| const std::map< PString, ConfigNode * > & ConfigNode::getMapChild | ( | ) | const |
Gets the mapChild of the ConfigNode.
Definition at line 107 of file ConfigNode.cpp.
References p_mapChild.
Referenced by toJsonSaveRecurse().
Here is the caller graph for this function:| PString & ConfigNode::getName | ( | ) |
Gets the name of the ConfigNode.
Definition at line 86 of file ConfigNode.cpp.
References p_name.
| const PString & ConfigNode::getName | ( | ) | const |
Gets the name of the ConfigNode.
Definition at line 79 of file ConfigNode.cpp.
References p_name.
Referenced by toJsonSaveRecurse().
Here is the caller graph for this function:| const ConfigNode * ConfigNode::getParent | ( | ) | const |
Gets the parent of the ConfigNode.
Definition at line 130 of file ConfigNode.cpp.
References ConfigNode(), and p_parent.
Here is the call graph for this function:| PString ConfigNode::getString | ( | ) | const |
Get string value without " or ' at the beginning of the end.
Definition at line 229 of file ConfigNode.cpp.
References getValue().
Referenced by phoenix_get_string(), phoenix_get_string(), phoenix_get_value(), and phoenix_get_value().
Here is the call graph for this function:
Here is the caller graph for this function:| PString & ConfigNode::getValue | ( | ) |
Gets the value of the ConfigNode.
Definition at line 72 of file ConfigNode.cpp.
References p_value.
| const PString & ConfigNode::getValue | ( | ) | const |
Gets the value of the ConfigNode.
Definition at line 65 of file ConfigNode.cpp.
References p_value.
Referenced by getString(), and toJsonSaveRecurse().
Here is the caller graph for this function:| std::vector< ConfigNode * > & ConfigNode::getVecChild | ( | ) |
Gets the vecChild of the ConfigNode.
Definition at line 100 of file ConfigNode.cpp.
References p_vecChild.
| const std::vector< ConfigNode * > & ConfigNode::getVecChild | ( | ) | const |
Gets the vecChild of the ConfigNode.
Definition at line 93 of file ConfigNode.cpp.
References p_vecChild.
Referenced by phoenix_get_vecstring(), phoenix_load_vecValue(), and toJsonSaveRecurse().
Here is the caller graph for this function:| bool ConfigNode::hasMapChild | ( | ) | const |
Say if the current ConfigNode has a map of children.
Definition at line 250 of file ConfigNode.cpp.
References p_mapChild, and p_vecChild.
| bool ConfigNode::hasValue | ( | ) | const |
Say if the current ConfigNode has a value.
Definition at line 236 of file ConfigNode.cpp.
References p_mapChild, and p_vecChild.
| bool ConfigNode::hasVecChild | ( | ) | const |
Say if the current ConfigNode has a vector of children.
Definition at line 243 of file ConfigNode.cpp.
References p_mapChild, and p_vecChild.
|
private |
Initialisation Function of class ConfigNode.
Definition at line 282 of file ConfigNode.cpp.
References p_name, p_parent, and p_value.
Referenced by ConfigNode().
Here is the caller graph for this function:| ConfigNodeIter ConfigNode::iter | ( | std::ostream & | out = std::cout | ) | const |
Create an iterator of ConfigNode.
| [out] | out | : std::ostream to be used for the error messages |
Definition at line 267 of file ConfigNode.cpp.
| ConfigNodeIter ConfigNode::iterWrite | ( | std::ostream & | out = std::cout | ) |
Create an iterator of ConfigNode.
| [out] | out | : std::ostream to be used for the error messages |
Definition at line 276 of file ConfigNode.cpp.
| void ConfigNode::setFileName | ( | const PPath & | fileName | ) |
Set the fileName of the current ConfigNode.
| fileName | : file name of the current ConfigNode |
Definition at line 137 of file ConfigNode.cpp.
References p_location, and p_vecChild.
Referenced by parser_json().
Here is the caller graph for this function:| void ConfigNode::setLineCol | ( | const PLocation & | location | ) |
Set the line and the column of the current ConfigNode.
| location | : PLocation which contains line and column of the current ConfigNode |
Definition at line 162 of file ConfigNode.cpp.
References PLocation::getColumn(), PLocation::getLine(), and p_location.
Referenced by parser_json_fileParser(), parser_json_key(), parser_json_list(), parser_json_map(), and parser_json_value().
Here is the call graph for this function:
Here is the caller graph for this function:| void ConfigNode::setLocation | ( | const PLocation & | location | ) |
Sets the location of the ConfigNode.
| location | : location of the ConfigNode |
Definition at line 51 of file ConfigNode.cpp.
References p_location.
| void ConfigNode::setMapChild | ( | const std::map< PString, ConfigNode * > & | mapChild | ) |
Sets the mapChild of the ConfigNode.
| mapChild | : mapChild of the ConfigNode |
Definition at line 44 of file ConfigNode.cpp.
References p_mapChild.
| void ConfigNode::setName | ( | const PString & | name | ) |
Sets the name of the ConfigNode.
| name | : name of the ConfigNode |
Definition at line 30 of file ConfigNode.cpp.
References p_name.
Referenced by addChild().
Here is the caller graph for this function:
|
private |
Sets the parent of the ConfigNode.
| parent | : parent of the ConfigNode |
Definition at line 58 of file ConfigNode.cpp.
References ConfigNode(), and p_parent.
Referenced by addChild().
Here is the call graph for this function:
Here is the caller graph for this function:| void ConfigNode::setValue | ( | const PString & | value | ) |
Sets the value of the ConfigNode.
| value | : value of the ConfigNode |
Definition at line 23 of file ConfigNode.cpp.
References p_value.
Referenced by addValue(), parser_json_list(), and parser_json_value().
Here is the caller graph for this function:| void ConfigNode::setVecChild | ( | const std::vector< ConfigNode * > & | vecChild | ) |
Sets the vecChild of the ConfigNode.
| vecChild | : vecChild of the ConfigNode |
Definition at line 37 of file ConfigNode.cpp.
References p_vecChild.
|
private |
Location of the definition of the current ConfigNode.
Definition at line 69 of file ConfigNode.h.
Referenced by getFileName(), getLocation(), setFileName(), setLineCol(), and setLocation().
|
private |
Map of sub ConfigNode.
Definition at line 67 of file ConfigNode.h.
Referenced by addChild(), clear(), getChild(), getChild(), getMapChild(), getMapChild(), hasMapChild(), hasValue(), hasVecChild(), and setMapChild().
|
private |
Name of the current entry.
Definition at line 63 of file ConfigNode.h.
Referenced by getName(), getName(), initialisationConfigNode(), and setName().
|
private |
Parent of the current ConfigNode.
Definition at line 71 of file ConfigNode.h.
Referenced by getFileName(), getParent(), initialisationConfigNode(), and setParent().
|
private |
Value of the current entry.
Definition at line 61 of file ConfigNode.h.
Referenced by getValue(), getValue(), initialisationConfigNode(), and setValue().
|
private |
Vector of sub ConfigNode.
Definition at line 65 of file ConfigNode.h.
Referenced by addChild(), clear(), getVecChild(), getVecChild(), hasMapChild(), hasValue(), hasVecChild(), setFileName(), and setVecChild().