R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3B::Option< Type > Class Template Reference

#include <R3BProgramOptions.h>

Public Types

using type = Type
 

Public Member Functions

 Option (const Option &)=delete
 
 Option (Option &&)=delete
 
auto operator= (const Option &) -> Option &=delete
 
auto operator= (Option &&) -> Option &=delete
 
 Option (std::string name, Type defaultValue, ProgramOptions *program)
 
 ~Option () override
 
void add (const std::string &desc, bool is_requried=false)
 
void as_positional (int option)
 
void retrieve (const po::variables_map &varMap) override
 
void set_required (bool p_rq=true)
 
auto value () const
 
auto is_required () const -> bool
 
auto is_positional () const -> bool
 
- Public Member Functions inherited from R3B::OptionConcept
 OptionConcept (const OptionConcept &)=delete
 
 OptionConcept (OptionConcept &&)=delete
 
auto operator= (const OptionConcept &) -> OptionConcept &=delete
 
auto operator= (OptionConcept &&) -> OptionConcept &=delete
 
virtual ~OptionConcept ()=default
 
 OptionConcept ()=default
 

Detailed Description

template<typename Type>
class R3B::Option< Type >

Definition at line 95 of file R3BProgramOptions.h.

Member Typedef Documentation

◆ type

template<typename Type>
using R3B::Option< Type >::type = Type

Definition at line 98 of file R3BProgramOptions.h.

Constructor & Destructor Documentation

◆ Option() [1/3]

template<typename Type>
R3B::Option< Type >::Option ( const Option< Type > & )
delete

◆ Option() [2/3]

template<typename Type>
R3B::Option< Type >::Option ( Option< Type > && )
delete

◆ Option() [3/3]

template<typename Type>
R3B::Option< Type >::Option ( std::string name,
Type defaultValue,
ProgramOptions * program )
inline

Definition at line 103 of file R3BProgramOptions.h.

◆ ~Option()

template<typename Type>
R3B::Option< Type >::~Option ( )
inlineoverride

Definition at line 117 of file R3BProgramOptions.h.

Member Function Documentation

◆ add()

template<typename Type>
void R3B::Option< Type >::add ( const std::string & desc,
bool is_requried = false )
inline

Definition at line 119 of file R3BProgramOptions.h.

◆ as_positional()

template<typename Type>
void R3B::Option< Type >::as_positional ( int option)
inline

Definition at line 144 of file R3BProgramOptions.h.

◆ is_positional()

template<typename Type>
auto R3B::Option< Type >::is_positional ( ) const -> bool
inlinenodiscard

Definition at line 175 of file R3BProgramOptions.h.

◆ is_required()

template<typename Type>
auto R3B::Option< Type >::is_required ( ) const -> bool
inlinenodiscard

Definition at line 174 of file R3BProgramOptions.h.

◆ operator=() [1/2]

template<typename Type>
auto R3B::Option< Type >::operator= ( const Option< Type > & ) -> Option &=delete
delete

◆ operator=() [2/2]

template<typename Type>
auto R3B::Option< Type >::operator= ( Option< Type > && ) -> Option &=delete
delete

◆ retrieve()

template<typename Type>
void R3B::Option< Type >::retrieve ( const po::variables_map & varMap)
inlineoverridevirtual

Implements R3B::OptionConcept.

Definition at line 150 of file R3BProgramOptions.h.

◆ set_required()

template<typename Type>
void R3B::Option< Type >::set_required ( bool p_rq = true)
inline

Definition at line 171 of file R3BProgramOptions.h.

◆ value()

template<typename Type>
auto R3B::Option< Type >::value ( ) const
inlinenodiscard

Definition at line 173 of file R3BProgramOptions.h.


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