Scarab  v2.2.0
Project 8 C++ Utility Library
Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
parsable Class Reference

#include <parsable.hh>

Inheritance diagram for parsable:
Inheritance graph

Public Member Functions

 parsable ()
 
 parsable (const std::string &a_addr_with_value)
 
 parsable (const std::string &a_addr, const std::string &a_value)
 
 parsable (const parsable &a_orig)
 
 ~parsable ()
 
- Public Member Functions inherited from param_node
 param_node ()
 
 param_node (const param_node &orig)
 
 param_node (param_node &&orig)
 
virtual ~param_node ()
 
param_nodeoperator= (const param_node &rhs)
 
param_nodeoperator= (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 paramoperator[] (const std::string &a_name) const
 
paramoperator[] (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
 
- Public Member Functions inherited from param
 param ()
 
 param (const param &orig)
 
 param (param &&orig)
 
virtual ~param ()
 
paramoperator= (const param &rhs)
 
paramoperator= (param &&)
 
virtual bool is_value () const
 
virtual bool is_array () const
 
param_valueas_value ()
 
param_arrayas_array ()
 
param_nodeas_node ()
 
const param_valueas_value () const
 
const param_arrayas_array () const
 
const param_nodeas_node () const
 
const param_valueoperator() () const
 Assumes that the parameter is a value, and returns a reference to itself. More...
 
param_valueoperator() ()
 Assumes that the parameter is a value, and returns a reference to itself. More...
 
const paramoperator[] (unsigned a_index) const
 
paramoperator[] (unsigned a_index)
 
const paramoperator[] (const std::string &a_name) const
 
paramoperator[] (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
 

Static Public Attributes

static const char f_value_separator = '='
 
static const char f_node_separator = '.'
 
- Static Public Attributes inherited from param
static unsigned s_indent_level = 0
 

Private Member Functions

void add_next (param_node &a_parent, const std::string &a_addr, const std::string &a_value)
 

Additional Inherited Members

- Public Types inherited from param_node
typedef param_node_contents contents
 
typedef param_node_iterator iterator
 
typedef param_node_const_iterator const_iterator
 
typedef contents::value_type contents_type
 
- Protected Attributes inherited from param_node
contents f_contents
 

Detailed Description

Definition at line 12 of file parsable.hh.

Constructor & Destructor Documentation

parsable ( )

Definition at line 14 of file parsable.cc.

parsable ( const std::string &  a_addr_with_value)

Definition at line 18 of file parsable.cc.

parsable ( const std::string &  a_addr,
const std::string &  a_value 
)

Definition at line 32 of file parsable.cc.

parsable ( const parsable a_orig)

Definition at line 38 of file parsable.cc.

~parsable ( )

Definition at line 42 of file parsable.cc.

Member Function Documentation

void add_next ( param_node a_parent,
const std::string &  a_addr,
const std::string &  a_value 
)
private

Definition at line 46 of file parsable.cc.

Member Data Documentation

const char f_node_separator = '.'
static

Definition at line 26 of file parsable.hh.

const char f_value_separator = '='
static

Definition at line 25 of file parsable.hh.


The documentation for this class was generated from the following files: