vSMC
vSMC: Scalable Monte Carlo
Public Member Functions | Protected Member Functions | List of all members
vsmc::ProgramOptionDefault< T > Class Template Reference

Option with a default value. More...

#include <vsmc/utility/program_option.hpp>

Public Member Functions

 ProgramOptionDefault (const std::string &desc)
 
template<typename V >
 ProgramOptionDefault (const std::string &desc, V val)
 
std::string default_str () const
 
std::string description () const
 
bool is_bool () const
 
- Public Member Functions inherited from vsmc::ProgramOption
 ProgramOption ()=default
 
 ProgramOption (const ProgramOption &)=default
 
virtual ~ProgramOption ()
 
virtual bool is_vector () const =0
 
ProgramOptionoperator= (const ProgramOption &)=default
 
virtual bool set (const std::string &, const std::string &, bool, std::ostream &)=0
 
virtual bool set_default ()=0
 

Protected Member Functions

bool set_value_default (T *dest)
 
- Protected Member Functions inherited from vsmc::ProgramOption
bool set_value (const std::string &name, const std::string &sval, bool *dest, bool silent, std::ostream &os)
 
bool set_value (const std::string &, const std::string &sval, std::string *dest, bool, std::ostream &)
 
template<typename T >
bool set_value (const std::string &name, const std::string &sval, T *dest, bool silent, std::ostream &os)
 

Detailed Description

template<typename T>
class vsmc::ProgramOptionDefault< T >

Option with a default value.

Definition at line 201 of file program_option.hpp.

Constructor & Destructor Documentation

template<typename T >
vsmc::ProgramOptionDefault< T >::ProgramOptionDefault ( const std::string &  desc)
inline

Definition at line 204 of file program_option.hpp.

template<typename T >
template<typename V >
vsmc::ProgramOptionDefault< T >::ProgramOptionDefault ( const std::string &  desc,
val 
)
inline

Definition at line 210 of file program_option.hpp.

Member Function Documentation

template<typename T >
std::string vsmc::ProgramOptionDefault< T >::default_str ( ) const
inlinevirtual

Implements vsmc::ProgramOption.

Definition at line 219 of file program_option.hpp.

template<typename T >
std::string vsmc::ProgramOptionDefault< T >::description ( ) const
inlinevirtual

Implements vsmc::ProgramOption.

Definition at line 217 of file program_option.hpp.

template<typename T >
bool vsmc::ProgramOptionDefault< T >::is_bool ( ) const
inlinevirtual

Implements vsmc::ProgramOption.

Definition at line 215 of file program_option.hpp.

template<typename T >
bool vsmc::ProgramOptionDefault< T >::set_value_default ( T *  dest)
inlineprotected

Definition at line 225 of file program_option.hpp.