Scarab  v2.2.3
Project 8 C++ Utility Library
Public Types | Public Member Functions | Protected Attributes | List of all members
param_array Class Reference

#include <param_array.hh>

Inheritance diagram for param_array:
Inheritance graph

Public Types

typedef param_array_contents contents
 
typedef param_array_iterator iterator
 
typedef param_array_const_iterator const_iterator
 
typedef contents::reverse_iterator reverse_iterator
 
typedef contents::const_reverse_iterator const_reverse_iterator
 
typedef contents::value_type contents_type
 

Public Member Functions

 param_array ()
 
 param_array (const param_array &orig)
 
 param_array (param_array &&orig)
 
virtual ~param_array ()
 
param_arrayoperator= (const param_array &rhs)
 
param_arrayoperator= (param_array &&rhs)
 
virtual param_ptr_t clone () const
 
virtual param_ptr_t move_clone ()
 
virtual bool is_null () const
 
virtual bool is_array () const
 
virtual bool has_subset (const param &a_subset) const
 
unsigned size () const
 
bool empty () const
 
void resize (unsigned a_size)
 
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
 
const paramoperator[] (unsigned a_index) const
 
paramoperator[] (unsigned a_index)
 
const paramfront () const
 
paramfront ()
 
const paramback () const
 
paramback ()
 
void assign (unsigned a_index, const param &a_value)
 
void assign (unsigned a_index, param &&a_value)
 
void assign (unsigned a_index, param_ptr_t a_value_ptr)
 
template<typename T , typename std::enable_if< std::is_convertible< T, param_value >::value, T >::type * = nullptr>
void assign (unsigned a_index, T a_value)
 
void push_back (const param &a_value)
 
void push_back (param &&a_value)
 
void push_back (param_ptr_t a_value_ptr)
 
template<typename T , typename std::enable_if< std::is_convertible< T, param_value >::value, T >::type * = nullptr>
void push_back (T a_value)
 
void push_front (const param &a_value)
 
void push_front (param &&a_value)
 
void push_front (param_ptr_t a_value_ptr)
 
template<typename T , typename std::enable_if< std::is_convertible< T, param_value >::value, T >::type * = nullptr>
void push_front (T a_value)
 
void append (const param_array &an_array)
 
void erase (unsigned a_index)
 
param_ptr_t remove (unsigned a_index)
 
void clear ()
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () 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_node () 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
 

Protected Attributes

contents f_contents
 

Additional Inherited Members

- Static Public Attributes inherited from param
static unsigned s_indent_level = 0
 

Detailed Description

Definition at line 31 of file param_array.hh.

Member Typedef Documentation

Definition at line 36 of file param_array.hh.

typedef contents::const_reverse_iterator const_reverse_iterator

Definition at line 38 of file param_array.hh.

Definition at line 34 of file param_array.hh.

typedef contents::value_type contents_type

Definition at line 39 of file param_array.hh.

Definition at line 35 of file param_array.hh.

typedef contents::reverse_iterator reverse_iterator

Definition at line 37 of file param_array.hh.

Constructor & Destructor Documentation

Definition at line 22 of file param_array.cc.

param_array ( const param_array orig)

Definition at line 28 of file param_array.cc.

param_array ( param_array &&  orig)

Definition at line 38 of file param_array.cc.

~param_array ( )
virtual

Definition at line 49 of file param_array.cc.

Member Function Documentation

void append ( const param_array an_array)
inline

Definition at line 286 of file param_array.hh.

void assign ( unsigned  a_index,
const param a_value 
)
inline

Definition at line 213 of file param_array.hh.

void assign ( unsigned  a_index,
param &&  a_value 
)
inline

Definition at line 220 of file param_array.hh.

void assign ( unsigned  a_index,
param_ptr_t  a_value_ptr 
)
inline

Definition at line 227 of file param_array.hh.

void assign ( unsigned  a_index,
a_value 
)
inline

Definition at line 235 of file param_array.hh.

const param & back ( ) const
inline

Definition at line 203 of file param_array.hh.

param & back ( )
inline

Definition at line 207 of file param_array.hh.

param_array::iterator begin ( )
inline

Definition at line 311 of file param_array.hh.

param_array::const_iterator begin ( ) const
inline

Definition at line 315 of file param_array.hh.

void clear ( )
inline

Definition at line 305 of file param_array.hh.

param_ptr_t clone ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 140 of file param_array.hh.

bool empty ( ) const
inline

Definition at line 164 of file param_array.hh.

param_array::iterator end ( )
inline

Definition at line 320 of file param_array.hh.

param_array::const_iterator end ( ) const
inline

Definition at line 324 of file param_array.hh.

void erase ( unsigned  a_index)
inline

Definition at line 295 of file param_array.hh.

const param & front ( ) const
inline

Definition at line 194 of file param_array.hh.

param & front ( )
inline

Definition at line 198 of file param_array.hh.

std::string get_value ( unsigned  a_index,
const std::string &  a_default 
) const
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 175 of file param_array.hh.

std::string get_value ( unsigned  a_index,
const char *  a_default 
) const
inline

Definition at line 180 of file param_array.hh.

XValType get_value ( unsigned  a_index,
XValType  a_default 
) const

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 135 of file param_array.hh.

bool has_subset ( const param a_subset) const
virtual

Reimplemented from param.

Definition at line 78 of file param_array.cc.

bool is_array ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 155 of file param_array.hh.

bool is_null ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 150 of file param_array.hh.

param_ptr_t move_clone ( )
inlinevirtual

Reimplemented from param.

Definition at line 145 of file param_array.hh.

param_array & operator= ( const param_array rhs)

Definition at line 53 of file param_array.cc.

param_array & operator= ( param_array &&  rhs)

Definition at line 65 of file param_array.cc.

const param & operator[] ( unsigned  a_index) const
inline

Returns a reference to the param at a_index. Throws a std::out_of_range if a_index is out-of-range.

Definition at line 185 of file param_array.hh.

param & operator[] ( unsigned  a_index)
inline

Returns a reference to the param at a_index. Throws a std::out_of_range if a_index is out-of-range.

Definition at line 189 of file param_array.hh.

void push_back ( const param a_value)
inline

Definition at line 242 of file param_array.hh.

void push_back ( param &&  a_value)
inline

Definition at line 247 of file param_array.hh.

void push_back ( param_ptr_t  a_value_ptr)
inline

Definition at line 252 of file param_array.hh.

void push_back ( a_value)
inline

Definition at line 258 of file param_array.hh.

void push_front ( const param a_value)
inline

Definition at line 264 of file param_array.hh.

void push_front ( param &&  a_value)
inline

Definition at line 269 of file param_array.hh.

void push_front ( param_ptr_t  a_value_ptr)
inline

Definition at line 274 of file param_array.hh.

void push_front ( a_value)
inline

Definition at line 280 of file param_array.hh.

param_array::reverse_iterator rbegin ( )
inline

Definition at line 329 of file param_array.hh.

param_array::const_reverse_iterator rbegin ( ) const
inline

Definition at line 333 of file param_array.hh.

param_ptr_t remove ( unsigned  a_index)
inline

Definition at line 300 of file param_array.hh.

Definition at line 338 of file param_array.hh.

param_array::const_reverse_iterator rend ( ) const
inline

Definition at line 342 of file param_array.hh.

void resize ( unsigned  a_size)
inline

sets the size of the array if smaller than the current size, extra elements are deleted

Definition at line 169 of file param_array.hh.

unsigned size ( ) const
inline

Definition at line 160 of file param_array.hh.

std::string to_string ( ) const
virtual

Reimplemented from param.

Definition at line 94 of file param_array.cc.

Member Data Documentation

contents f_contents
protected

Definition at line 130 of file param_array.hh.


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