Scarab  v2.4.6
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 merge (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
 
void merge (const param &a_param)
 

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

◆ const_iterator

Definition at line 36 of file param_array.hh.

◆ const_reverse_iterator

typedef contents::const_reverse_iterator const_reverse_iterator

Definition at line 38 of file param_array.hh.

◆ contents

Definition at line 34 of file param_array.hh.

◆ contents_type

typedef contents::value_type contents_type

Definition at line 39 of file param_array.hh.

◆ iterator

Definition at line 35 of file param_array.hh.

◆ reverse_iterator

typedef contents::reverse_iterator reverse_iterator

Definition at line 37 of file param_array.hh.

Constructor & Destructor Documentation

◆ param_array() [1/3]

Definition at line 23 of file param_array.cc.

◆ param_array() [2/3]

param_array ( const param_array orig)

Definition at line 29 of file param_array.cc.

◆ param_array() [3/3]

param_array ( param_array &&  orig)

Definition at line 39 of file param_array.cc.

◆ ~param_array()

~param_array ( )
virtual

Definition at line 50 of file param_array.cc.

Member Function Documentation

◆ append()

void append ( const param_array an_array)
inline

Definition at line 282 of file param_array.hh.

◆ assign() [1/4]

void assign ( unsigned  a_index,
const param a_value 
)
inline

Definition at line 209 of file param_array.hh.

◆ assign() [2/4]

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

Definition at line 216 of file param_array.hh.

◆ assign() [3/4]

void assign ( unsigned  a_index,
param_ptr_t  a_value_ptr 
)
inline

Definition at line 223 of file param_array.hh.

◆ assign() [4/4]

void assign ( unsigned  a_index,
a_value 
)
inline

Definition at line 231 of file param_array.hh.

◆ back() [1/2]

const param & back ( ) const
inline

Definition at line 199 of file param_array.hh.

◆ back() [2/2]

param & back ( )
inline

Definition at line 203 of file param_array.hh.

◆ begin() [1/2]

param_array::iterator begin ( )
inline

Definition at line 307 of file param_array.hh.

◆ begin() [2/2]

param_array::const_iterator begin ( ) const
inline

Definition at line 311 of file param_array.hh.

◆ clear()

void clear ( )
inline

Definition at line 301 of file param_array.hh.

◆ clone()

param_ptr_t clone ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 142 of file param_array.hh.

◆ empty()

bool empty ( ) const
inline

Definition at line 166 of file param_array.hh.

◆ end() [1/2]

param_array::iterator end ( )
inline

Definition at line 316 of file param_array.hh.

◆ end() [2/2]

param_array::const_iterator end ( ) const
inline

Definition at line 320 of file param_array.hh.

◆ erase()

void erase ( unsigned  a_index)
inline

Definition at line 291 of file param_array.hh.

◆ front() [1/2]

const param & front ( ) const
inline

Definition at line 190 of file param_array.hh.

◆ front() [2/2]

param & front ( )
inline

Definition at line 194 of file param_array.hh.

◆ get_value() [1/3]

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

◆ get_value() [2/3]

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

Definition at line 176 of file param_array.hh.

◆ get_value() [3/3]

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

◆ has_subset()

bool has_subset ( const param a_subset) const
virtual

Reimplemented from param.

Definition at line 89 of file param_array.cc.

◆ is_array()

bool is_array ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 157 of file param_array.hh.

◆ is_null()

bool is_null ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 152 of file param_array.hh.

◆ merge()

void merge ( const param_array an_array)

Definition at line 105 of file param_array.cc.

◆ move_clone()

param_ptr_t move_clone ( )
inlinevirtual

Reimplemented from param.

Definition at line 147 of file param_array.hh.

◆ operator=() [1/2]

param_array & operator= ( const param_array rhs)

Definition at line 54 of file param_array.cc.

◆ operator=() [2/2]

param_array & operator= ( param_array &&  rhs)

Definition at line 66 of file param_array.cc.

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ push_back() [1/4]

void push_back ( const param a_value)
inline

Definition at line 238 of file param_array.hh.

◆ push_back() [2/4]

void push_back ( param &&  a_value)
inline

Definition at line 243 of file param_array.hh.

◆ push_back() [3/4]

void push_back ( param_ptr_t  a_value_ptr)
inline

Definition at line 248 of file param_array.hh.

◆ push_back() [4/4]

void push_back ( a_value)
inline

Definition at line 254 of file param_array.hh.

◆ push_front() [1/4]

void push_front ( const param a_value)
inline

Definition at line 260 of file param_array.hh.

◆ push_front() [2/4]

void push_front ( param &&  a_value)
inline

Definition at line 265 of file param_array.hh.

◆ push_front() [3/4]

void push_front ( param_ptr_t  a_value_ptr)
inline

Definition at line 270 of file param_array.hh.

◆ push_front() [4/4]

void push_front ( a_value)
inline

Definition at line 276 of file param_array.hh.

◆ rbegin() [1/2]

param_array::reverse_iterator rbegin ( )
inline

Definition at line 325 of file param_array.hh.

◆ rbegin() [2/2]

param_array::const_reverse_iterator rbegin ( ) const
inline

Definition at line 329 of file param_array.hh.

◆ remove()

param_ptr_t remove ( unsigned  a_index)
inline

Definition at line 296 of file param_array.hh.

◆ rend() [1/2]

Definition at line 334 of file param_array.hh.

◆ rend() [2/2]

param_array::const_reverse_iterator rend ( ) const
inline

Definition at line 338 of file param_array.hh.

◆ resize()

void resize ( unsigned  a_size)

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

Definition at line 79 of file param_array.cc.

◆ size()

unsigned size ( ) const
inline

Definition at line 162 of file param_array.hh.

◆ to_string()

std::string to_string ( ) const
virtual

Reimplemented from param.

Definition at line 149 of file param_array.cc.

Member Data Documentation

◆ f_contents

contents f_contents
protected

Definition at line 132 of file param_array.hh.


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