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

#include <param.hh>

Inheritance diagram for param_array:
Inheritance graph

Public Types

typedef std::deque< param * > contents
 
typedef contents::iterator iterator
 
typedef contents::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 174 of file param.hh.

Member Typedef Documentation

typedef contents::const_iterator const_iterator

Definition at line 179 of file param.hh.

typedef contents::const_reverse_iterator const_reverse_iterator

Definition at line 181 of file param.hh.

typedef std::deque< param* > contents

Definition at line 177 of file param.hh.

typedef contents::value_type contents_type

Definition at line 182 of file param.hh.

typedef contents::iterator iterator

Definition at line 178 of file param.hh.

typedef contents::reverse_iterator reverse_iterator

Definition at line 180 of file param.hh.

Constructor & Destructor Documentation

Definition at line 359 of file param.cc.

param_array ( const param_array orig)

Definition at line 365 of file param.cc.

~param_array ( )
virtual

Definition at line 375 of file param.cc.

Member Function Documentation

void append ( const param_array an_array)
inline

Definition at line 880 of file param.hh.

const param_array * array_at ( unsigned  a_index) const
inline

Returns a pointer to the param_array (static-ly cast) corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 794 of file param.hh.

param_array * array_at ( unsigned  a_index)
inline

Returns a pointer to the param_array (static-ly cast) corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 799 of file param.hh.

void assign ( unsigned  a_index,
const param a_value 
)
inline

Definition at line 844 of file param.hh.

void assign ( unsigned  a_index,
param a_value_ptr 
)
inline

Definition at line 851 of file param.hh.

const param * at ( unsigned  a_index) const
inline

Returns a pointer to the param corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 772 of file param.hh.

param * at ( unsigned  a_index)
inline

Returns a pointer to the param corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 777 of file param.hh.

const param * back ( ) const
inline

Definition at line 834 of file param.hh.

param * back ( )
inline

Definition at line 838 of file param.hh.

param_array::iterator begin ( )
inline

Definition at line 910 of file param.hh.

param_array::const_iterator begin ( ) const
inline

Definition at line 914 of file param.hh.

void clear ( )
inline

Definition at line 900 of file param.hh.

param * clone ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 729 of file param.hh.

bool empty ( ) const
inline

Definition at line 748 of file param.hh.

param_array::iterator end ( )
inline

Definition at line 919 of file param.hh.

param_array::const_iterator end ( ) const
inline

Definition at line 923 of file param.hh.

void erase ( unsigned  a_index)
inline

Definition at line 889 of file param.hh.

const param * front ( ) const
inline

Definition at line 825 of file param.hh.

param * front ( )
inline

Definition at line 829 of file param.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 ParamValue Throws an error if a_name is not present or is not of type ParamValue

Definition at line 753 of file param.hh.

XValType get_value ( unsigned  a_index) const

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

Definition at line 714 of file param.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 ParamValue Returns a_default if a_name is not present or is not of type ParamValue

Definition at line 760 of file param.hh.

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

Definition at line 767 of file param.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 ParamValue Returns a_default if a_name is not present or is not of type ParamValue

Definition at line 722 of file param.hh.

bool has_subset ( const param a_subset) const
virtual

Reimplemented from param.

Definition at line 390 of file param.cc.

bool is_array ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 739 of file param.hh.

bool is_null ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 734 of file param.hh.

const param_node * node_at ( unsigned  a_index) const
inline

Returns a pointer to the param_node (static-ly cast) corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 805 of file param.hh.

param_node * node_at ( unsigned  a_index)
inline

Returns a pointer to the param_node (static-ly cast) corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 810 of file param.hh.

param_array & operator= ( const param_array rhs)

Definition at line 380 of file param.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 816 of file param.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 820 of file param.hh.

void push_back ( const param a_value)
inline

Definition at line 858 of file param.hh.

void push_back ( param a_value_ptr)
inline

Definition at line 863 of file param.hh.

void push_front ( const param a_value)
inline

Definition at line 869 of file param.hh.

void push_front ( param a_value_ptr)
inline

Definition at line 874 of file param.hh.

param_array::reverse_iterator rbegin ( )
inline

Definition at line 928 of file param.hh.

param_array::const_reverse_iterator rbegin ( ) const
inline

Definition at line 932 of file param.hh.

param * remove ( unsigned  a_index)
inline

Definition at line 894 of file param.hh.

Definition at line 937 of file param.hh.

param_array::const_reverse_iterator rend ( ) const
inline

Definition at line 941 of file param.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 406 of file param.cc.

unsigned size ( ) const
inline

Definition at line 744 of file param.hh.

std::string to_string ( ) const
virtual

Reimplemented from param.

Definition at line 417 of file param.cc.

const param_value * value_at ( unsigned  a_index) const
inline

Returns a pointer to the param_value (static-ly cast) corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 783 of file param.hh.

param_value * value_at ( unsigned  a_index)
inline

Returns a pointer to the param_value (static-ly cast) corresponding to a_name. Returns NULL if a_name is not present.

Definition at line 788 of file param.hh.

Member Data Documentation

contents f_contents
protected

Definition at line 295 of file param.hh.


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