b2api
B2000++ API Reference Manual, VERSION 4.6
 
Loading...
Searching...
No Matches
b2000::cmdline::CmdOptDictionary Class Reference

#include "b2cmdline.H"

Inheritance diagram for b2000::cmdline::CmdOptDictionary:
Collaboration diagram for b2000::cmdline::CmdOptDictionary:

Public Member Functions

bool has_key (const std::string &key) const override
 
bool get_bool (const std::string &key) const override
 
int get_int (const std::string &key) const override
 
double get_double (const std::string &key) const override
 
b2000::csda< double > get_csda_double (const std::string &key) const override
 
std::complex< double > get_complex_double (const std::string &key) const override
 
std::string get_string (const std::string &key) const override
 
void get (const std::string &key, std::vector< int > &v) const override
 
void get (const std::string &key, std::vector< double > &v) const override
 
void get (const std::string &key, std::vector< b2000::csda< double > > &v) const override
 
void get (const std::string &key, std::vector< std::complex< double > > &v) const override
 
void warn_on_non_used_key () const override
 
- Public Member Functions inherited from b2000::Dictionary
virtual bool get_bool (const std::string &key, bool default_) const
 
virtual int get_int (const std::string &key, int default_) const
 
virtual double get_double (const std::string &key, double default_) const
 
virtual b2000::csda< double > get_csda_double (const std::string &key, b2000::csda< double > default_) const
 
virtual std::complex< double > get_complex_double (const std::string &key, std::complex< double > default_) const
 
virtual std::string get_string (const std::string &key, const std::string &default_) const
 
template<typename T >
get (const std::string &key) const
 
template<typename T >
get (const std::string &key, const T &default_) const
 
- Public Member Functions inherited from b2000::Object
virtual const std::string & get_object_name () const
 
virtual ~Object ()
 

Additional Inherited Members

- Static Public Member Functions inherited from b2000::Dictionary
static Dictionaryget_empty ()
 
- Static Public Attributes inherited from b2000::Object
static ObjectType type
 

Detailed Description

Command-line options for inserting (key,value) pair into a dictionary, with the values being of types bool, int, double, std::complex, and std::string.

Member Function Documentation

◆ get() [1/4]

void b2000::cmdline::CmdOptDictionary::get ( const std::string &  key,
std::vector< b2000::csda< double > > &  v 
) const
inlineoverridevirtual

Extract a vector of csda values.

Implements b2000::Dictionary.

◆ get() [2/4]

void b2000::cmdline::CmdOptDictionary::get ( const std::string &  key,
std::vector< double > &  v 
) const
inlineoverridevirtual

Extract a vector of double values.

Implements b2000::Dictionary.

◆ get() [3/4]

void b2000::cmdline::CmdOptDictionary::get ( const std::string &  key,
std::vector< int > &  v 
) const
inlineoverridevirtual

Extract a vector of int values.

Implements b2000::Dictionary.

◆ get() [4/4]

void b2000::cmdline::CmdOptDictionary::get ( const std::string &  key,
std::vector< std::complex< double > > &  v 
) const
inlineoverridevirtual

Extract a vector of complex values.

Implements b2000::Dictionary.

◆ get_bool()

bool b2000::cmdline::CmdOptDictionary::get_bool ( const std::string &  key) const
inlineoverridevirtual
Returns
A bool value.

Implements b2000::Dictionary.

◆ get_complex_double()

std::complex< double > b2000::cmdline::CmdOptDictionary::get_complex_double ( const std::string &  key) const
inlineoverridevirtual
Returns
A complex value.

Implements b2000::Dictionary.

◆ get_csda_double()

b2000::csda< double > b2000::cmdline::CmdOptDictionary::get_csda_double ( const std::string &  key) const
inlineoverridevirtual
Returns
A csda value.

Implements b2000::Dictionary.

◆ get_double()

double b2000::cmdline::CmdOptDictionary::get_double ( const std::string &  key) const
inlineoverridevirtual
Returns
A double value.

Implements b2000::Dictionary.

◆ get_int()

int b2000::cmdline::CmdOptDictionary::get_int ( const std::string &  key) const
inlineoverridevirtual
Returns
An integer value.

Implements b2000::Dictionary.

◆ get_string()

std::string b2000::cmdline::CmdOptDictionary::get_string ( const std::string &  key) const
inlineoverridevirtual
Returns
A string.

Implements b2000::Dictionary.

◆ has_key()

bool b2000::cmdline::CmdOptDictionary::has_key ( const std::string &  key) const
inlineoverridevirtual
Returns
Whether a key is present in the dictionary.

Implements b2000::Dictionary.

◆ warn_on_non_used_key()

void b2000::cmdline::CmdOptDictionary::warn_on_non_used_key ( ) const
inlineoverridevirtual

Can be used to give a warning on keys that were not set in the dictionary.

Implements b2000::Dictionary.


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