![]() |
Scarab
v2.2.1
Project 8 C++ Utility Library
|
#include <param_node.hh>
Public Types | |
typedef param_node_contents | contents |
typedef param_node_iterator | iterator |
typedef param_node_const_iterator | const_iterator |
typedef contents::value_type | contents_type |
Public Member Functions | |
param_node () | |
param_node (const param_node &orig) | |
param_node (param_node &&orig) | |
virtual | ~param_node () |
param_node & | operator= (const param_node &rhs) |
param_node & | operator= (param_node &&rhs) |
virtual param_ptr_t | clone () const |
virtual param_ptr_t | move_clone () |
virtual bool | is_null () const |
virtual bool | is_node () const |
virtual bool | has_subset (const param &a_subset) const |
unsigned | size () const |
bool | empty () const |
bool | has (const std::string &a_name) const |
unsigned | count (const std::string &a_name) const |
std::string | get_value (const std::string &a_name, const std::string &a_default) const |
std::string | get_value (const std::string &a_name, const char *a_default) const |
template<typename XValType > | |
XValType | get_value (const std::string &a_name, XValType a_default) const |
const param & | operator[] (const std::string &a_name) const |
param & | operator[] (const std::string &a_name) |
bool | add (const std::string &a_name, const param &a_value) |
bool | add (const std::string &a_name, param &&a_value) |
bool | add (const std::string &a_name, param_ptr_t a_value_ptr) |
bool | add (const std::string &a_name, param_value &&a_value) |
void | replace (const std::string &a_name, const param &a_value) |
Creates a copy of a_value; overwrites if the key exits. More... | |
void | replace (const std::string &a_name, param &&a_value) |
Adds a_value with move semantics; overwrites if the key exists. More... | |
void | replace (const std::string &a_name, param_ptr_t a_value_ptr) |
Adds a_value_ptr by directly adding the pointer; overwrites if the key exists. More... | |
void | replace (const std::string &a_name, param_value &&a_value) |
Adds a_value as a param_value; allows implicit construction with raw types (int, string, etc); overwrites if the key exists. More... | |
void | merge (const param_node &a_object) |
void | erase (const std::string &a_name) |
param_ptr_t | remove (const std::string &a_name) |
void | clear () |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
virtual std::string | to_string () const |
![]() | |
param () | |
param (const param &orig) | |
param (param &&orig) | |
virtual | ~param () |
param & | operator= (const param &rhs) |
param & | operator= (param &&) |
virtual bool | is_value () const |
virtual bool | is_array () const |
param_value & | as_value () |
param_array & | as_array () |
param_node & | as_node () |
const param_value & | as_value () const |
const param_array & | as_array () const |
const param_node & | as_node () const |
const param_value & | operator() () const |
Assumes that the parameter is a value, and returns a reference to itself. More... | |
param_value & | operator() () |
Assumes that the parameter is a value, and returns a reference to itself. More... | |
const param & | operator[] (unsigned a_index) const |
param & | operator[] (unsigned a_index) |
const param & | operator[] (const std::string &a_name) const |
param & | operator[] (const std::string &a_name) |
std::string | get_value (const std::string &a_name, const std::string &a_default) const |
std::string | get_value (const std::string &a_name, const char *a_default) const |
template<typename XValType > | |
XValType | get_value (const std::string &a_name, XValType a_default) const |
std::string | get_value (unsigned a_index, const std::string &a_default) const |
std::string | get_value (unsigned a_index, const char *a_default) const |
template<typename XValType > | |
XValType | get_value (unsigned a_index, XValType a_default) const |
Protected Attributes | |
contents | f_contents |
Additional Inherited Members | |
![]() | |
static unsigned | s_indent_level = 0 |
Definition at line 69 of file param_node.hh.
Definition at line 74 of file param_node.hh.
typedef param_node_contents contents |
Definition at line 72 of file param_node.hh.
typedef contents::value_type contents_type |
Definition at line 75 of file param_node.hh.
typedef param_node_iterator iterator |
Definition at line 73 of file param_node.hh.
param_node | ( | ) |
Definition at line 23 of file param_node.cc.
param_node | ( | const param_node & | orig | ) |
Definition at line 29 of file param_node.cc.
param_node | ( | param_node && | orig | ) |
Definition at line 39 of file param_node.cc.
|
virtual |
Definition at line 50 of file param_node.cc.
|
inline |
Adds a copy of a_value Only adds and returns true if a_name
is not already present, and returns false if it is.
Definition at line 226 of file param_node.hh.
|
inline |
Adds a_value with move semantics Only adds and returns true if a_name
is not already present, and returns false if it is.
Definition at line 237 of file param_node.hh.
|
inline |
Adds a_value_ptr by directly adding the pointer Only adds and returns true if a_name
is not already present, and returns false if it is.
Definition at line 248 of file param_node.hh.
|
inline |
Adds a_value as a param_value; allows implicit construction with raw types (int, string, etc) Only adds and returns true if a_name
is not already present, and returns false if it is.
Definition at line 259 of file param_node.hh.
|
inline |
Definition at line 322 of file param_node.hh.
|
inline |
Definition at line 327 of file param_node.hh.
|
inline |
Definition at line 316 of file param_node.hh.
|
inlinevirtual |
Reimplemented from param.
Definition at line 166 of file param_node.hh.
|
inline |
Definition at line 201 of file param_node.hh.
|
inline |
Definition at line 191 of file param_node.hh.
|
inline |
Definition at line 332 of file param_node.hh.
|
inline |
Definition at line 337 of file param_node.hh.
|
inline |
Definition at line 294 of file param_node.hh.
|
inline |
Returns the result of param_value::get if a_name is present and is of type param_value Returns a_default if a_name is not present or is not of type param_value
Definition at line 206 of file param_node.hh.
|
inline |
Definition at line 211 of file param_node.hh.
|
inline |
Returns the result of param_value::get if a_name is present and is of type param_value Returns a_default if a_name is not present or is not of type param_value
Definition at line 161 of file param_node.hh.
|
inline |
Definition at line 196 of file param_node.hh.
|
virtual |
Reimplemented from param.
Definition at line 77 of file param_node.cc.
|
inlinevirtual |
Reimplemented from param.
Definition at line 182 of file param_node.hh.
|
inlinevirtual |
Reimplemented from param.
Definition at line 177 of file param_node.hh.
void merge | ( | const param_node & | a_object | ) |
Merges the contents of a_object into this object. If names in the contents of a_object exist in this object, the values in this object corresponding to the matching names will be replaced.
Definition at line 90 of file param_node.cc.
|
inlinevirtual |
Reimplemented from param.
Definition at line 172 of file param_node.hh.
param_node & operator= | ( | const param_node & | rhs | ) |
Definition at line 54 of file param_node.cc.
param_node & operator= | ( | param_node && | rhs | ) |
Definition at line 65 of file param_node.cc.
|
inline |
Returns a reference to the param corresponding to a_name. Throws an std::out_of_range if a_name is not present.
Definition at line 216 of file param_node.hh.
|
inline |
Returns a reference to the param corresponding to a_name. Throws an std::out_of_range if a_name is not present.
Definition at line 221 of file param_node.hh.
|
inline |
Definition at line 304 of file param_node.hh.
|
inline |
Creates a copy of a_value; overwrites if the key exits.
Definition at line 270 of file param_node.hh.
|
inline |
Adds a_value with move semantics; overwrites if the key exists.
Definition at line 276 of file param_node.hh.
|
inline |
Adds a_value_ptr by directly adding the pointer; overwrites if the key exists.
Definition at line 282 of file param_node.hh.
|
inline |
Adds a_value as a param_value; allows implicit construction with raw types (int, string, etc); overwrites if the key exists.
Definition at line 288 of file param_node.hh.
|
inline |
Definition at line 187 of file param_node.hh.
|
virtual |
Reimplemented from param.
Definition at line 125 of file param_node.cc.
|
protected |
Definition at line 155 of file param_node.hh.