Scarab  v2.4.4
Project 8 C++ Utility Library
Classes | Public Member Functions | Private Attributes | List of all members
param_value Class Reference

#include <param_value.hh>

Inheritance diagram for param_value:
Inheritance graph

Classes

class  as_bool_visitor
 
class  as_double_visitor
 
class  as_int_visitor
 
class  as_path_visitor
 
class  as_string_visitor
 
class  as_uint_visitor
 
class  clear_visitor
 
class  get_visitor
 
class  is_bool_visitor
 
class  is_double_visitor
 
class  is_int_visitor
 
class  is_string_visitor
 
class  is_uint_visitor
 
class  type_visitor
 

Public Member Functions

 param_value ()
 
 param_value (bool a_value)
 
 param_value (uint8_t a_value)
 
 param_value (uint16_t a_value)
 
 param_value (uint32_t a_value)
 
 param_value (uint64_t a_value)
 
 param_value (int8_t a_value)
 
 param_value (int16_t a_value)
 
 param_value (int32_t a_value)
 
 param_value (int64_t a_value)
 
 param_value (float a_value)
 
 param_value (double a_value)
 
 param_value (const std::string &a_value)
 
 param_value (const char *a_value)
 
 param_value (const param_value &orig)
 
 param_value (param_value &&orig)
 
virtual ~param_value ()
 
param_valueoperator= (const param_value &rhs)
 
param_valueoperator= (param_value &&rhs)
 
virtual param_ptr_t clone () const
 
virtual param_ptr_t move_clone ()
 
bool empty () const
 
virtual bool is_null () const
 
virtual bool is_value () const
 
virtual bool has_subset (const param &a_subset) const
 
std::string type () const
 
bool is_bool () const
 
bool is_uint () const
 
bool is_int () const
 
bool is_double () const
 
bool is_string () const
 
bool as_bool () const
 
uint64_t as_uint () const
 
int64_t as_int () const
 
double as_double () const
 
std::string as_string () const
 
path as_path () const
 
template<typename XValType >
XValType as () const
 
template<typename XValType , typename std::enable_if< std::is_convertible< XValType, param_value >::value, XValType >::type * = nullptr>
void set (XValType a_value)
 
virtual std::string to_string () const
 
void clear ()
 
template<>
bool as () const
 
template<>
uint64_t as () const
 
template<>
int64_t as () const
 
template<>
double as () 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_array () 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)
 

Private Attributes

boost::variant< bool, uint64_t, int64_t, double, std::string > f_value
 

Additional Inherited Members

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

Detailed Description

Definition at line 27 of file param_value.hh.

Constructor & Destructor Documentation

◆ param_value() [1/16]

Definition at line 24 of file param_value.cc.

◆ param_value() [2/16]

param_value ( bool  a_value)

Definition at line 31 of file param_value.cc.

◆ param_value() [3/16]

param_value ( uint8_t  a_value)

Definition at line 39 of file param_value.cc.

◆ param_value() [4/16]

param_value ( uint16_t  a_value)

Definition at line 46 of file param_value.cc.

◆ param_value() [5/16]

param_value ( uint32_t  a_value)

Definition at line 53 of file param_value.cc.

◆ param_value() [6/16]

param_value ( uint64_t  a_value)

Definition at line 60 of file param_value.cc.

◆ param_value() [7/16]

param_value ( int8_t  a_value)

Definition at line 67 of file param_value.cc.

◆ param_value() [8/16]

param_value ( int16_t  a_value)

Definition at line 74 of file param_value.cc.

◆ param_value() [9/16]

param_value ( int32_t  a_value)

Definition at line 82 of file param_value.cc.

◆ param_value() [10/16]

param_value ( int64_t  a_value)

Definition at line 89 of file param_value.cc.

◆ param_value() [11/16]

param_value ( float  a_value)

Definition at line 96 of file param_value.cc.

◆ param_value() [12/16]

param_value ( double  a_value)

Definition at line 103 of file param_value.cc.

◆ param_value() [13/16]

param_value ( const std::string &  a_value)

Definition at line 117 of file param_value.cc.

◆ param_value() [14/16]

param_value ( const char *  a_value)

Definition at line 110 of file param_value.cc.

◆ param_value() [15/16]

param_value ( const param_value orig)

Definition at line 124 of file param_value.cc.

◆ param_value() [16/16]

param_value ( param_value &&  orig)

Definition at line 131 of file param_value.cc.

◆ ~param_value()

~param_value ( )
virtual

Definition at line 137 of file param_value.cc.

Member Function Documentation

◆ as() [1/5]

XValType as ( ) const

Definition at line 401 of file param_value.hh.

◆ as() [2/5]

bool as ( ) const
inline

Definition at line 365 of file param_value.hh.

◆ as() [3/5]

uint64_t as ( ) const
inline

Definition at line 371 of file param_value.hh.

◆ as() [4/5]

int64_t as ( ) const
inline

Definition at line 377 of file param_value.hh.

◆ as() [5/5]

double as ( ) const
inline

Definition at line 383 of file param_value.hh.

◆ as_bool()

bool as_bool ( ) const
inline

Definition at line 458 of file param_value.hh.

◆ as_double()

double as_double ( ) const
inline

Definition at line 473 of file param_value.hh.

◆ as_int()

int64_t as_int ( ) const
inline

Definition at line 468 of file param_value.hh.

◆ as_path()

path as_path ( ) const
inline

Definition at line 483 of file param_value.hh.

◆ as_string()

std::string as_string ( ) const
inline

Definition at line 478 of file param_value.hh.

◆ as_uint()

uint64_t as_uint ( ) const
inline

Definition at line 463 of file param_value.hh.

◆ clear()

void clear ( )
inline

Definition at line 500 of file param_value.hh.

◆ clone()

param_ptr_t clone ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 407 of file param_value.hh.

◆ empty()

bool empty ( ) const

◆ has_subset()

bool has_subset ( const param a_subset) const
virtual

Reimplemented from param.

Definition at line 159 of file param_value.cc.

◆ is_bool()

bool is_bool ( ) const
inline

Definition at line 433 of file param_value.hh.

◆ is_double()

bool is_double ( ) const
inline

Definition at line 448 of file param_value.hh.

◆ is_int()

bool is_int ( ) const
inline

Definition at line 443 of file param_value.hh.

◆ is_null()

bool is_null ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 423 of file param_value.hh.

◆ is_string()

bool is_string ( ) const
inline

Definition at line 453 of file param_value.hh.

◆ is_uint()

bool is_uint ( ) const
inline

Definition at line 438 of file param_value.hh.

◆ is_value()

bool is_value ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 428 of file param_value.hh.

◆ move_clone()

param_ptr_t move_clone ( )
inlinevirtual

Reimplemented from param.

Definition at line 413 of file param_value.hh.

◆ operator=() [1/2]

param_value & operator= ( const param_value rhs)

Definition at line 141 of file param_value.cc.

◆ operator=() [2/2]

param_value & operator= ( param_value &&  rhs)

Definition at line 150 of file param_value.cc.

◆ set()

void set ( XValType  a_value)

Definition at line 489 of file param_value.hh.

◆ to_string()

std::string to_string ( ) const
inlinevirtual

Reimplemented from param.

Definition at line 495 of file param_value.hh.

◆ type()

std::string type ( ) const
inline

Definition at line 418 of file param_value.hh.

Member Data Documentation

◆ f_value

boost::variant< bool, uint64_t, int64_t, double, std::string > f_value
private

Definition at line 89 of file param_value.hh.


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