#include <config_node.hpp>


Public Types | |
| enum | type { BOOL, NUMBER, INTERVAL, STRING, LIST, SECTION } |
Public Member Functions | |
| config_node (const std::string &id, bool boolean) | |
| config_node (const std::string &id, unsigned long number) | |
| config_node (const std::string &id, unsigned long low, unsigned long high) | |
| config_node (const std::string &id, const char *string) | |
| config_node (const std::string &id, config_node *children) | |
| config_node (const std::string &id, enum type type, config_node *next, config_node *children) | |
| bool | is (enum type type) const |
| bool | is_bool (void) const |
| bool | is_number (void) const |
| bool | is_interval (void) const |
| bool | is_string (void) const |
| bool | is_list (void) const |
| bool | is_section (void) const |
| bool | is_attribute (void) const |
| bool | is_or_warn (enum type type) const |
| void | set_ID (const std::string &id, bool recursive=false) |
| int | num_siblings (void) const |
| bool | has_sibling (const std::string &id="") const |
| const config_node * | get_sibling (const std::string &id="") const |
| void | append_sibling (config_node *node) |
| const config_node * | remove_sibling (const std::string &id="") |
| int | num_children (void) const |
| bool | has_child (const std::string &id="") const |
| const config_node * | get_child (const std::string &id="") const |
| void | append_child (config_node *node) |
| config_node * | remove_child (const std::string &id="") |
| void | warn_wrong_type (void) const |
| void | warn_wrong_type (enum type type) const |
| void | warn_wrong_value (void) const |
| void | warn_non_empty_section (const char *message=nullptr) const |
| std::string | get_value (void) const |
| template<typename NodeTypeT> | |
| NodeTypeT | get_value (const NodeTypeT default_value=NodeTypeT()) const |
| template<typename NodeTypeT> | |
| NodeTypeT | get_option (const std::string &id, NodeTypeT default_value=NodeTypeT()) |
| template<typename NodeTypeT> | |
| int | get_list_option (std::vector< NodeTypeT > &result, const std::string &id) |
| const char * | type2string (void) const |
| void | print (int indent=0, int indent_inc=2, bool siblings=false) const |
Static Public Member Functions | |
| static const char * | type2string (enum type type) |
Public Attributes | |
| std::string | id |
| enum config_node::type | type |
| union { | |
| bool boolean | |
| unsigned long number | |
| struct { | |
| unsigned long low | |
| unsigned long high | |
| } | |
| }; | |
| std::string | string |
Static Protected Member Functions | |
| static int | num_nodes (const config_node *chain) |
| static const config_node * | get_node (const config_node *chain, const std::string &id="") |
| static void | append_node (config_node *&chain, config_node *node) |
| static config_node * | remove_node (config_node *&chain, const std::string &id="") |
Protected Attributes | |
| config_node * | next |
| config_node * | children |