Scarab  v2.4.9
Project 8 C++ Utility Library
Namespaces | Classes | Typedefs | Functions | Variables
scarab Namespace Reference

Namespaces

 detail
 

Classes

class  authentication
 
class  base_registrar
 
class  base_registrar< XBaseType, void >
 
class  cancelable
 
class  concurrent_queue
 
class  config_decorator
 Adds the ability to create options and subcommands that are tied to a main_app's master config. More...
 
class  configurator
 
class  destroyer
 
struct  dig_calib_params
 Collection of parameters used for converting between analog and digital data. More...
 
struct  do_a_thing
 
class  error
 
class  factory
 
class  factory< XBaseType, void >
 
struct  get_or_set
 
struct  is_unique
 
struct  is_unique_impl
 
struct  is_unique_impl< T, FirstType >
 
class  logger
 
class  main_app
 Primary application class. More...
 
class  map_deref_iterator
 
class  nonoption_parser
 
class  param
 
class  param_array
 
class  param_input_codec
 
class  param_input_json
 Convert JSON to Param. More...
 
class  param_input_yaml
 Convert YAML to Param. More...
 
class  param_node
 
class  param_output_codec
 
class  param_output_json
 Convert Param to JSON. More...
 
class  param_output_yaml
 Convert Param to YAML. More...
 
class  param_translator
 
class  param_value
 
class  parsable
 
class  parser
 
class  registrar
 
class  registrar< XBaseType, XDerivedType, void >
 
class  signal_handler
 
struct  simple_parser
 
class  singleton
 
struct  type_list
 
struct  unique_append_impl
 
struct  unique_append_impl< T, type_list< ListItems... > >
 
struct  unique_append_impl< T, type_list<> >
 
class  version
 
class  version_ifc
 
class  version_semantic
 
class  version_wrapper
 

Typedefs

typedef CLI::App app
 
typedef std::deque< std::unique_ptr< param > > param_array_contents
 
typedef boost::indirect_iterator< param_array_contents::iterator, paramparam_array_iterator
 
typedef boost::indirect_iterator< param_array_contents::const_iterator, const paramparam_array_const_iterator
 
typedef std::unique_ptr< paramparam_ptr_t
 
typedef std::map< std::string, std::unique_ptr< param > > param_node_contents
 
typedef map_deref_iterator< std::string, param, param_node_contents::iterator > param_node_iterator
 
typedef map_deref_iterator< std::string, const param, param_node_contents::const_iterator > param_node_const_iterator
 
template<typename condition >
using enable_if_signed = typename std::enable_if< condition::value, detail::is_signed >::type
 
template<typename condition >
using enable_if_unsigned = typename std::enable_if< condition::value, detail::is_unsigned >::type
 
typedef fs::path path
 
template<typename T , typename List >
using unique_append = typename unique_append_impl< T, List >::type
 

Functions

 LOGGER (mtlog, "authentication")
 
 LOGGER (slog, "configurator")
 
 LOGGER (dlog, "parsable")
 
const string & EndColor ()
 
const string & FatalColor ()
 
const string & ErrorColor ()
 
const string & WarnColor ()
 
const string & InfoColor ()
 
const string & ProgColor ()
 
const string & DebugColor ()
 
const string & TraceColor ()
 
const string & OtherColor ()
 
 LOGGER (dlog, "param")
 
 REGISTER_PARAM_INPUT_CODEC (param_input_json, "json")
 
 REGISTER_PARAM_OUTPUT_CODEC (param_output_json, "json")
 
 LOGGER (dlog_param_json, "param_json")
 
 LOGGER (slog, "param_yaml")
 
 REGISTER_PARAM_INPUT_CODEC (param_input_yaml, "yaml")
 
 REGISTER_PARAM_OUTPUT_CODEC (param_output_yaml, "yaml")
 
SCARAB_API std::ostream & operator<< (std::ostream &out, const param_array &a_value)
 
SCARAB_API std::ostream & operator<< (std::ostream &out, const param &a_value)
 
SCARAB_API std::ostream & operator<< (std::ostream &out, const param_node &a_value)
 
SCARAB_API std::ostream & operator<< (std::ostream &out, const param_value &a_value)
 
template<>
std::string param_value::as< std::string > () const
 
template<>
scarab::path param_value::as< scarab::path > () const
 
int throw_exception ()
 
int foo2 ()
 
int foo1 ()
 
 LOGGER (slog, "cancelable")
 
 LOGGER (slog_cq, "concurrent_queue")
 
void get_calib_params (unsigned n_bits, unsigned data_type_size, double v_offset, double v_range, bool bits_r_aligned, dig_calib_params *params)
 Calculate the digitizer calibration parameters with basic parameters: number of bits, Voffset, and Vrange. More...
 
void get_calib_params2 (unsigned n_bits, unsigned data_type_size, double v_offset, double v_range, double dac_gain, bool bits_r_aligned, dig_calib_params *params)
 Calculate the digitizer calibration parameters when given the DAC gain (e.g. from a digitizer's own calibration) More...
 
template<typename dig_type , typename an_type >
an_type d2a (dig_type dig, const struct dig_calib_params *params)
 Convert a signed or unsigned digital value to an analog value. More...
 
template<typename an_type , typename dig_type , enable_if_unsigned< std::is_unsigned< dig_type > > ...>
dig_type a2d (an_type analog, const struct dig_calib_params *params)
 Convert an analog value to an unsigned digital value. More...
 
 LOGGER (slog_fact, "factory")
 
template<typename x_key , typename x_value >
const x_value & at (const std::map< x_key, x_value > &a_map, const x_key &a_key, const x_value &a_default)
 
path expand_path (const string &a_path)
 
 LOGGER (slog, "signal_handler")
 
void terminate ()
 
std::string get_formatted_now ()
 
std::string demangle (const char *a_name)
 
template<class x_type >
std::string type (const x_type &a_param)
 
 LOGGER (slog, "scarab_version")
 

Variables

char date_time_format [] = "%Y-%m-%dT%H:%M:%SZ"
 

Detailed Description

The standard scarab namespace.

Typedef Documentation

◆ app

typedef CLI::App app

Definition at line 18 of file application.hh.

◆ enable_if_signed

using enable_if_signed = typename std::enable_if< condition::value, detail::is_signed >::type

Definition at line 69 of file digital.hh.

◆ enable_if_unsigned

using enable_if_unsigned = typename std::enable_if< condition::value, detail::is_unsigned >::type

Definition at line 72 of file digital.hh.

◆ param_array_const_iterator

typedef boost::indirect_iterator< param_array_contents::const_iterator, const param > param_array_const_iterator

Definition at line 29 of file param_array.hh.

◆ param_array_contents

typedef std::deque< std::unique_ptr< param > > param_array_contents

Definition at line 24 of file param_array.hh.

◆ param_array_iterator

typedef boost::indirect_iterator< param_array_contents::iterator, param > param_array_iterator

Definition at line 28 of file param_array.hh.

◆ param_node_const_iterator

typedef map_deref_iterator< std::string, const param, param_node_contents::const_iterator > param_node_const_iterator

Definition at line 66 of file param_node.hh.

◆ param_node_contents

typedef std::map< std::string, std::unique_ptr< param > > param_node_contents

Definition at line 63 of file param_node.hh.

◆ param_node_iterator

typedef map_deref_iterator< std::string, param, param_node_contents::iterator > param_node_iterator

Definition at line 65 of file param_node.hh.

◆ param_ptr_t

typedef std::unique_ptr< param > param_ptr_t

Definition at line 23 of file param_base.hh.

◆ path

typedef fs::path path

Definition at line 25 of file path.hh.

◆ unique_append

using unique_append = typename unique_append_impl< T, List >::type

Definition at line 68 of file unique_typelist.hh.

Function Documentation

◆ a2d()

dig_type a2d ( an_type  analog,
const struct dig_calib_params params 
)

Convert an analog value to an unsigned digital value.

Convert an analog value to a signed digital value.

Definition at line 84 of file digital.hh.

◆ at()

const x_value& scarab::at ( const std::map< x_key, x_value > &  a_map,
const x_key &  a_key,
const x_value &  a_default 
)

Definition at line 16 of file map_at_default.hh.

◆ d2a()

an_type scarab::d2a ( dig_type  dig,
const struct dig_calib_params params 
)

Convert a signed or unsigned digital value to an analog value.

Definition at line 76 of file digital.hh.

◆ DebugColor()

const string& scarab::DebugColor ( )

Definition at line 36 of file logger.cc.

◆ demangle()

std::string demangle ( const char *  a_name)

Definition at line 60 of file typename.cc.

◆ EndColor()

const string& scarab::EndColor ( )

Definition at line 30 of file logger.cc.

◆ ErrorColor()

const string& scarab::ErrorColor ( )

Definition at line 32 of file logger.cc.

◆ expand_path()

path expand_path ( const string &  a_path)

Definition at line 19 of file path.cc.

◆ FatalColor()

const string& scarab::FatalColor ( )

Definition at line 31 of file logger.cc.

◆ foo1()

int scarab::foo1 ( )

Definition at line 29 of file test_terminate.cc.

◆ foo2()

int scarab::foo2 ( )

Definition at line 23 of file test_terminate.cc.

◆ get_calib_params()

void get_calib_params ( unsigned  n_bits,
unsigned  data_type_size,
double  v_offset,
double  v_range,
bool  bits_r_aligned,
dig_calib_params params 
)

Calculate the digitizer calibration parameters with basic parameters: number of bits, Voffset, and Vrange.

Definition at line 18 of file digital.cc.

◆ get_calib_params2()

void get_calib_params2 ( unsigned  n_bits,
unsigned  data_type_size,
double  v_offset,
double  v_range,
double  dac_gain,
bool  bits_r_aligned,
dig_calib_params params 
)

Calculate the digitizer calibration parameters when given the DAC gain (e.g. from a digitizer's own calibration)

Definition at line 32 of file digital.cc.

◆ get_formatted_now()

std::string get_formatted_now ( )

Definition at line 21 of file time.cc.

◆ InfoColor()

const string& scarab::InfoColor ( )

Definition at line 34 of file logger.cc.

◆ LOGGER() [1/11]

scarab::LOGGER ( dlog  ,
"parsable"   
)

◆ LOGGER() [2/11]

scarab::LOGGER ( slog  ,
"cancelable"   
)

◆ LOGGER() [3/11]

scarab::LOGGER ( mtlog  ,
"authentication"   
)

◆ LOGGER() [4/11]

scarab::LOGGER ( slog_fact  ,
"factory"   
)

◆ LOGGER() [5/11]

scarab::LOGGER ( slog  ,
"param_yaml"   
)

◆ LOGGER() [6/11]

scarab::LOGGER ( slog  ,
"signal_handler"   
)

◆ LOGGER() [7/11]

scarab::LOGGER ( dlog  ,
"param"   
)

◆ LOGGER() [8/11]

scarab::LOGGER ( slog_cq  ,
"concurrent_queue"   
)

◆ LOGGER() [9/11]

scarab::LOGGER ( dlog_param_json  ,
"param_json"   
)

◆ LOGGER() [10/11]

scarab::LOGGER ( slog  ,
"scarab_version"   
)

◆ LOGGER() [11/11]

scarab::LOGGER ( slog  ,
"configurator"   
)

◆ operator<<() [1/4]

SCARAB_API std::ostream & operator<< ( std::ostream &  out,
const param a_value 
)

Definition at line 60 of file param_base.cc.

◆ operator<<() [2/4]

SCARAB_API std::ostream & operator<< ( std::ostream &  out,
const param_node a_value 
)

Definition at line 144 of file param_node.cc.

◆ operator<<() [3/4]

SCARAB_API std::ostream & operator<< ( std::ostream &  out,
const param_value a_value 
)

Definition at line 165 of file param_value.cc.

◆ operator<<() [4/4]

SCARAB_API std::ostream & operator<< ( std::ostream &  out,
const param_array a_value 
)

Definition at line 167 of file param_array.cc.

◆ OtherColor()

const string& scarab::OtherColor ( )

Definition at line 38 of file logger.cc.

◆ param_value::as< scarab::path >()

Definition at line 395 of file param_value.hh.

◆ param_value::as< std::string >()

std::string scarab::param_value::as< std::string > ( ) const
inline

Definition at line 389 of file param_value.hh.

◆ ProgColor()

const string& scarab::ProgColor ( )

Definition at line 35 of file logger.cc.

◆ REGISTER_PARAM_INPUT_CODEC() [1/2]

scarab::REGISTER_PARAM_INPUT_CODEC ( param_input_yaml  ,
"yaml"   
)

◆ REGISTER_PARAM_INPUT_CODEC() [2/2]

scarab::REGISTER_PARAM_INPUT_CODEC ( param_input_json  ,
"json"   
)

◆ REGISTER_PARAM_OUTPUT_CODEC() [1/2]

scarab::REGISTER_PARAM_OUTPUT_CODEC ( param_output_yaml  ,
"yaml"   
)

◆ REGISTER_PARAM_OUTPUT_CODEC() [2/2]

scarab::REGISTER_PARAM_OUTPUT_CODEC ( param_output_json  ,
"json"   
)

◆ terminate()

void terminate ( )

Definition at line 35 of file terminate.cc.

◆ throw_exception()

int scarab::throw_exception ( )

Definition at line 16 of file test_terminate.cc.

◆ TraceColor()

const string& scarab::TraceColor ( )

Definition at line 37 of file logger.cc.

◆ type()

std::string scarab::type ( const x_type &  a_param)

Definition at line 24 of file typename.hh.

◆ WarnColor()

const string& scarab::WarnColor ( )

Definition at line 33 of file logger.cc.

Variable Documentation

◆ date_time_format

char date_time_format = "%Y-%m-%dT%H:%M:%SZ"

Definition at line 19 of file time.cc.