Scarab  v3.2.1
Project 8 C++ Utility Library
Public Member Functions | Static Public Attributes | List of all members
param Class Reference

#include <param_base.hh>

Inheritance diagram for param:
Inheritance graph

Public Member Functions

 param ()
 
 param (const param &orig)
 
 param (param &&orig)
 
virtual ~param ()
 
paramoperator= (const param &rhs)
 
paramoperator= (param &&)
 
virtual param_ptr_t clone () const
 
virtual param_ptr_t move_clone ()
 
virtual bool is_null () const
 
virtual bool is_value () const
 
virtual bool is_array () const
 
virtual bool is_node () const
 
virtual bool has_subset (const param &a_subset) 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)
 
virtual std::string to_string () const
 

Static Public Attributes

static unsigned s_indent_level = 0
 

Detailed Description

Definition at line 26 of file param_base.hh.

Constructor & Destructor Documentation

◆ param() [1/3]

param ( )

Definition at line 23 of file param_base.cc.

◆ param() [2/3]

param ( const param orig)

Definition at line 27 of file param_base.cc.

◆ param() [3/3]

param ( param &&  orig)

Definition at line 31 of file param_base.cc.

◆ ~param()

~param ( )
virtual

Definition at line 35 of file param_base.cc.

Member Function Documentation

◆ as_array() [1/2]

param_array & as_array ( )
inline

Definition at line 74 of file param_base_impl.hh.

◆ as_array() [2/2]

const param_array & as_array ( ) const
inline

Definition at line 92 of file param_base_impl.hh.

◆ as_node() [1/2]

param_node & as_node ( )
inline

Definition at line 80 of file param_base_impl.hh.

◆ as_node() [2/2]

const param_node & as_node ( ) const
inline

Definition at line 98 of file param_base_impl.hh.

◆ as_value() [1/2]

param_value & as_value ( )
inline

Definition at line 68 of file param_base_impl.hh.

◆ as_value() [2/2]

const param_value & as_value ( ) const
inline

Definition at line 86 of file param_base_impl.hh.

◆ clone()

param_ptr_t clone ( ) const
inlinevirtual

Reimplemented in param_node, param_value, and param_array.

Definition at line 30 of file param_base_impl.hh.

◆ get_value() [1/6]

std::string get_value ( const std::string &  a_name,
const std::string &  a_default 
) const
inline

If the derived param type is param_node, forwards the reqeust to param_node; otherwise throws an error. 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 134 of file param_base_impl.hh.

◆ get_value() [2/6]

std::string get_value ( const std::string &  a_name,
const char *  a_default 
) const
inline

Definition at line 139 of file param_base_impl.hh.

◆ get_value() [3/6]

XValType get_value ( const std::string &  a_name,
XValType  a_default 
) const
inline

If the derived param type is param_node, forwards the reqeust to param_node; otherwise throws an error. 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 145 of file param_base_impl.hh.

◆ get_value() [4/6]

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

If the derived param type is param_node, forwards the reqeust to param_node; otherwise throws an error. 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 150 of file param_base_impl.hh.

◆ get_value() [5/6]

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

Definition at line 155 of file param_base_impl.hh.

◆ get_value() [6/6]

XValType get_value ( unsigned  a_index,
XValType  a_default 
) const
inline

If the derived param type is param_node, forwards the reqeust to param_node; otherwise throws an error. 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 161 of file param_base_impl.hh.

◆ has_subset()

bool has_subset ( const param a_subset) const
inlinevirtual

Reimplemented in param_node, param_value, and param_array.

Definition at line 62 of file param_base_impl.hh.

◆ is_array()

bool is_array ( ) const
inlinevirtual

Reimplemented in param_array.

Definition at line 52 of file param_base_impl.hh.

◆ is_node()

bool is_node ( ) const
inlinevirtual

Reimplemented in param_node.

Definition at line 57 of file param_base_impl.hh.

◆ is_null()

bool is_null ( ) const
inlinevirtual

Reimplemented in param_node, param_value, and param_array.

Definition at line 42 of file param_base_impl.hh.

◆ is_value()

bool is_value ( ) const
inlinevirtual

Reimplemented in param_value.

Definition at line 47 of file param_base_impl.hh.

◆ merge()

void merge ( const param a_param)
inline

Definition at line 39 of file param_base.cc.

◆ move_clone()

param_ptr_t move_clone ( )
inlinevirtual

Reimplemented in param_node, param_value, and param_array.

Definition at line 36 of file param_base_impl.hh.

◆ operator()() [1/2]

const param_value & operator() ( ) const
inline

Assumes that the parameter is a value, and returns a reference to itself.

Definition at line 104 of file param_base_impl.hh.

◆ operator()() [2/2]

param_value & operator() ( )
inline

Assumes that the parameter is a value, and returns a reference to itself.

Definition at line 109 of file param_base_impl.hh.

◆ operator=() [1/2]

param & operator= ( const param rhs)
inline

Definition at line 20 of file param_base_impl.hh.

◆ operator=() [2/2]

param & operator= ( param &&  )
inline

Definition at line 25 of file param_base_impl.hh.

◆ operator[]() [1/4]

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

Assumes that the parameter is an array, and returns a reference to the param at a_index. Behavior is undefined if a_index is out-of-range.

Definition at line 114 of file param_base_impl.hh.

◆ operator[]() [2/4]

param & operator[] ( unsigned  a_index)
inline

Assumes that the parameter is an array, and returns a reference to the param at a_index. Behavior is undefined if a_index is out-of-range.

Definition at line 119 of file param_base_impl.hh.

◆ operator[]() [3/4]

const param & operator[] ( const std::string &  a_name) const
inline

Assumes that the parameter is a node, and returns a reference to the param corresponding to a_name. Throws a scarab::error if a_name is not present.

Definition at line 124 of file param_base_impl.hh.

◆ operator[]() [4/4]

param & operator[] ( const std::string &  a_name)
inline

Assumes that the parameter is a node, and returns a reference to the param corresponding to a_name. Throws a scarab::error if a_name is not present.

Definition at line 129 of file param_base_impl.hh.

◆ to_string()

std::string to_string ( ) const
inlinevirtual

Reimplemented in param_node, param_array, and param_value.

Definition at line 166 of file param_base_impl.hh.

Member Data Documentation

◆ s_indent_level

SCARAB_API unsigned s_indent_level = 0
static

Definition at line 100 of file param_base.hh.


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