MADNESS 0.10.1
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
madness::QCParameter Struct Reference

structure holding the value for a given parameter More...

#include <QCCalculationParametersBase.h>

Collaboration diagram for madness::QCParameter:
Collaboration graph
[legend]

Public Types

enum  { def , derived , defined }
 

Public Member Functions

 QCParameter ()
 
 QCParameter (const std::string v, const std::string t, const std::string comment="", const std::vector< std::string > allowed_values1={})
 
std::string get_comment () const
 
int get_print_order () const
 
std::string get_type () const
 
std::string get_value () const
 
hashT hash () const
 
bool is_user_defined () const
 
std::string print_line (const std::string &key) const
 
std::string print_precedence () const
 
template<typename Archive >
void serialize (Archive &ar)
 
void set_derived_value (const std::string val)
 
void set_user_defined_value (const std::string val)
 

Public Attributes

enum madness::QCParameter:: { ... }  precedence =def
 

Private Member Functions

bool check_allowed ()
 
std::string not_allowed_errmsg () const
 
void set_all ()
 

Private Attributes

std::vector< std::string > allowed_values =std::vector<std::string>()
 
std::string comment =""
 
std::string default_value =""
 
std::string derived_value =""
 
std::string null =""
 
int print_order =0
 
std::string type =""
 
std::string user_defined_value =""
 
std::string value
 

Detailed Description

structure holding the value for a given parameter

keeps logic about default, derived and user-defined settings (with increasing priority), as well as comments for the user (e.g. a recommended range for a given parameter).

might be extended to hold allowed values for certain parameters, e.g. localization procedures.

all values are stored as strings and must be converted to their respective types by the QCCalculationParametersBase class (see below)

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
def 
derived 
defined 

Constructor & Destructor Documentation

◆ QCParameter() [1/2]

madness::QCParameter::QCParameter ( )
inline

◆ QCParameter() [2/2]

madness::QCParameter::QCParameter ( const std::string  v,
const std::string  t,
const std::string  comment = "",
const std::vector< std::string >  allowed_values1 = {} 
)
inline

Member Function Documentation

◆ check_allowed()

bool madness::QCParameter::check_allowed ( )
inlineprivate

References allowed_values, and value.

Referenced by set_all().

◆ get_comment()

std::string madness::QCParameter::get_comment ( ) const
inline

References comment.

Referenced by print_line().

◆ get_print_order()

int madness::QCParameter::get_print_order ( ) const
inline

References print_order.

◆ get_type()

std::string madness::QCParameter::get_type ( ) const
inline

◆ get_value()

std::string madness::QCParameter::get_value ( ) const
inline

◆ hash()

hashT madness::QCParameter::hash ( ) const
inline

References madness::hash_value(), and value.

◆ is_user_defined()

bool madness::QCParameter::is_user_defined ( ) const
inline

◆ not_allowed_errmsg()

std::string madness::QCParameter::not_allowed_errmsg ( ) const
inlineprivate

References allowed_values, errmsg(), and value.

Referenced by set_all().

◆ print_line()

std::string madness::QCParameter::print_line ( const std::string &  key) const
inline

◆ print_precedence()

std::string madness::QCParameter::print_precedence ( ) const
inline

References def, defined, derived, and precedence.

Referenced by print_line().

◆ serialize()

template<typename Archive >
void madness::QCParameter::serialize ( Archive &  ar)
inline

◆ set_all()

void madness::QCParameter::set_all ( )
inlineprivate

◆ set_derived_value()

void madness::QCParameter::set_derived_value ( const std::string  val)
inline

◆ set_user_defined_value()

void madness::QCParameter::set_user_defined_value ( const std::string  val)
inline

Member Data Documentation

◆ allowed_values

std::vector<std::string> madness::QCParameter::allowed_values =std::vector<std::string>()
private

◆ comment

std::string madness::QCParameter::comment =""
private

Referenced by get_comment(), and serialize().

◆ default_value

std::string madness::QCParameter::default_value =""
private

Referenced by serialize(), and set_all().

◆ derived_value

std::string madness::QCParameter::derived_value =""
private

◆ null

std::string madness::QCParameter::null =""
private

Referenced by serialize(), and set_all().

◆ []

enum { ... } madness::QCParameter::precedence

◆ print_order

int madness::QCParameter::print_order =0
private

Referenced by get_print_order(), and serialize().

◆ type

std::string madness::QCParameter::type =""
private

Referenced by get_type(), and serialize().

◆ user_defined_value

std::string madness::QCParameter::user_defined_value =""
private

◆ value

std::string madness::QCParameter::value
private

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