Scarab  v2.0.1
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)
 
virtual ~param_array ()
 
param_arrayoperator= (const param_array &rhs)
 
virtual paramclone () const
 
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
 
template<typename XValType >
XValType get_value (unsigned a_index) 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
 
const paramat (unsigned a_index) const
 
paramat (unsigned a_index)
 
const param_valuevalue_at (unsigned a_index) const
 
param_valuevalue_at (unsigned a_index)
 
const param_arrayarray_at (unsigned a_index) const
 
param_arrayarray_at (unsigned a_index)
 
const param_nodenode_at (unsigned a_index) const
 
param_nodenode_at (unsigned a_index)
 
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_ptr)
 
void push_back (const param &a_value)
 
void push_back (param *a_value_ptr)
 
void push_front (const param &a_value)
 
void push_front (param *a_value_ptr)
 
void append (const param_array &an_array)
 
void erase (unsigned a_index)
 
paramremove (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)
 
virtual ~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)
 

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 20 of file param_array.cc.

param_array ( const param_array orig)

Definition at line 26 of file param_array.cc.

~param_array ( )
virtual

Definition at line 36 of file param_array.cc.

Member Function Documentation

void append ( const param_array an_array)
inline

Definition at line 307 of file param_array.hh.

const param_array & array_at ( unsigned  a_index) const
inline

Returns the param_array corresponding to a_name. Throws a scarab::error if a_index is out-of-range.

Definition at line 225 of file param_array.hh.

param_array & array_at ( unsigned  a_index)
inline

Returns the param_array corresponding to a_name. Throws a scarab::error if a_index is out-of-range.

Definition at line 229 of file param_array.hh.

void assign ( unsigned  a_index,
const param a_value 
)
inline

Definition at line 271 of file param_array.hh.

void assign ( unsigned  a_index,
param a_value_ptr 
)
inline

Definition at line 278 of file param_array.hh.

const param & at ( unsigned  a_index) const
inline

Returns the param corresponding to a_name. Throws a scarab::error if a_index is out-of-range.

Definition at line 207 of file param_array.hh.

param & at ( unsigned  a_index)
inline

Returns the param corresponding to a_name. Throws a scarab::error if a_index is out-of-range.

Definition at line 211 of file param_array.hh.

const param & back ( ) const
inline

Definition at line 261 of file param_array.hh.

param & back ( )
inline

Definition at line 265 of file param_array.hh.

param_array::iterator begin ( )
inline

Definition at line 338 of file param_array.hh.

param_array::const_iterator begin ( ) const
inline

Definition at line 342 of file param_array.hh.

void clear ( )
inline

Definition at line 328 of file param_array.hh.

param * clone ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 168 of file param_array.hh.

bool empty ( ) const
inline

Definition at line 187 of file param_array.hh.

param_array::iterator end ( )
inline

Definition at line 347 of file param_array.hh.

param_array::const_iterator end ( ) const
inline

Definition at line 351 of file param_array.hh.

void erase ( unsigned  a_index)
inline

Definition at line 316 of file param_array.hh.

const param & front ( ) const
inline

Definition at line 252 of file param_array.hh.

param & front ( )
inline

Definition at line 256 of file param_array.hh.

std::string get_value ( unsigned  a_index) const
inline

Returns the result of ParamValue::get if a_name is present and is of type param_value Throws an error if a_name is not present or is not of type param_value

Definition at line 192 of file param_array.hh.

XValType get_value ( unsigned  a_index) const

Returns the result of ParamValue::get if a_name is present and is of type param_value Throws an error if a_name is not present or is not of type param_value

Definition at line 157 of file param_array.hh.

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

Returns the result of ParamValue::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 197 of file param_array.hh.

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

Definition at line 202 of file param_array.hh.

XValType get_value ( unsigned  a_index,
XValType  a_default 
) const

Returns the result of ParamValue::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 163 of file param_array.hh.

bool has_subset ( const param a_subset) const
virtual

Reimplemented from param.

Definition at line 52 of file param_array.cc.

bool is_array ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 178 of file param_array.hh.

bool is_null ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 173 of file param_array.hh.

const param_node & node_at ( unsigned  a_index) const
inline

Returns the param_node corresponding to a_name. Throws a scarab::error if a_index is not present

Definition at line 234 of file param_array.hh.

param_node & node_at ( unsigned  a_index)
inline

Returns the param_node corresponding to a_name. Throws a scarab::error if a_index is out-of-range.

Definition at line 238 of file param_array.hh.

param_array & operator= ( const param_array rhs)

Definition at line 41 of file param_array.cc.

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

Returns a reference to the param at a_index. Behavior is undefined if a_index is out-of-range.

Definition at line 243 of file param_array.hh.

param & operator[] ( unsigned  a_index)
inline

Returns a reference to the param at a_index. Behavior is undefined if a_index is out-of-range.

Definition at line 247 of file param_array.hh.

void push_back ( const param a_value)
inline

Definition at line 285 of file param_array.hh.

void push_back ( param a_value_ptr)
inline

Definition at line 290 of file param_array.hh.

void push_front ( const param a_value)
inline

Definition at line 296 of file param_array.hh.

void push_front ( param a_value_ptr)
inline

Definition at line 301 of file param_array.hh.

param_array::reverse_iterator rbegin ( )
inline

Definition at line 356 of file param_array.hh.

param_array::const_reverse_iterator rbegin ( ) const
inline

Definition at line 360 of file param_array.hh.

param * remove ( unsigned  a_index)
inline

Definition at line 322 of file param_array.hh.

Definition at line 365 of file param_array.hh.

param_array::const_reverse_iterator rend ( ) const
inline

Definition at line 369 of file param_array.hh.

void resize ( unsigned  a_size)

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

Definition at line 68 of file param_array.cc.

unsigned size ( ) const
inline

Definition at line 183 of file param_array.hh.

std::string to_string ( ) const
virtual

Reimplemented from param.

Definition at line 79 of file param_array.cc.

const param_value & value_at ( unsigned  a_index) const
inline

Returns the param_value corresponding to a_name. Throws a scarab::error if a_index is not present

Definition at line 216 of file param_array.hh.

param_value & value_at ( unsigned  a_index)
inline

Returns the param_value corresponding to a_name. Throws a scarab::error if a_index is out-of-range.

Definition at line 220 of file param_array.hh.

Member Data Documentation

contents f_contents
protected

Definition at line 152 of file param_array.hh.


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