a type-specific Option (e.g., a boolean –toggle or -m=SBuf) More...

#include <Options.h>

Inheritance diagram for Acl::TypedOption< Recipient >:
Collaboration diagram for Acl::TypedOption< Recipient >:

Public Types

enum  ValueExpectation {
  valueNone,
  valueOptional,
  valueRequired
}
 

Public Member Functions

 TypedOption (ValueExpectation vex=valueNone)
 
void linkWith (Recipient *recipient) const
 who to tell when this option is enabled More...
 
virtual bool configured () const override
 
virtual bool valued () const override
 
virtual void configureDefault () const override
 sets the default value when option is used without a value More...
 
virtual void configureWith (const SBuf &rawValue) const override
 sets the option value from rawValue More...
 
virtual void print (std::ostream &os) const override
 prints a configuration snippet (as an admin could have typed) More...
 
template<>
void print (std::ostream &os) const
 prints a configuration snippet (as an admin could have typed) More...
 

Public Attributes

ValueExpectation valueExpectation = valueNone
 expect "=value" part? More...
 

Private Member Functions

void import (const SBuf &rawValue) const
 
void setDefault () const
 
template<>
void import (const SBuf &rawValue) const
 

Private Attributes

Recipient * recipient_ = nullptr
 parsing results storage More...
 

Detailed Description

template<class Recipient>
class Acl::TypedOption< Recipient >

Definition at line 83 of file Options.h.

Member Enumeration Documentation

Enumerator
valueNone 
valueOptional 
valueRequired 

Definition at line 42 of file Options.h.

Constructor & Destructor Documentation

template<class Recipient>
Acl::TypedOption< Recipient >::TypedOption ( ValueExpectation  vex = valueNone)
inlineexplicit

Definition at line 87 of file Options.h.

Member Function Documentation

template<class Recipient>
virtual bool Acl::TypedOption< Recipient >::configured ( ) const
inlineoverridevirtual

whether the admin explicitly specified this option (i.e., whether configureWith() or configureDefault() has been called)

Implements Acl::Option.

Definition at line 98 of file Options.h.

template<class Recipient>
virtual void Acl::TypedOption< Recipient >::configureDefault ( ) const
inlineoverridevirtual

Implements Acl::Option.

Definition at line 102 of file Options.h.

template<class Recipient>
virtual void Acl::TypedOption< Recipient >::configureWith ( const SBuf rawValue) const
inlineoverridevirtual

Implements Acl::Option.

Definition at line 112 of file Options.h.

template<>
void Acl::TypedOption< CharacterSetOptionValue >::import ( const SBuf rawValue) const
inlineprivate

Definition at line 25 of file CharacterSetOption.h.

References SBuf::c_str().

void Acl::BooleanOption::import ( const SBuf rawValue) const
inlineprivate

Definition at line 123 of file Options.h.

template<class Recipient>
void Acl::TypedOption< Recipient >::linkWith ( Recipient *  recipient) const
inline
template<>
void Acl::TypedOption< CharacterSetOptionValue >::print ( std::ostream &  os) const
inlinevirtual

Implements Acl::Option.

Definition at line 34 of file CharacterSetOption.h.

template<class Recipient>
virtual void Acl::TypedOption< Recipient >::print ( std::ostream &  os) const
inlineoverridevirtual

Implements Acl::Option.

Definition at line 120 of file Options.h.

void Acl::BooleanOption::setDefault ( ) const
inlineprivate
template<class Recipient>
virtual bool Acl::TypedOption< Recipient >::valued ( ) const
inlineoverridevirtual

Implements Acl::Option.

Definition at line 99 of file Options.h.

Referenced by Acl::TypedOption< CharacterSetOptionValue >::print().

Member Data Documentation

ValueExpectation Acl::Option::valueExpectation = valueNone
inherited

Definition at line 61 of file Options.h.

Referenced by Acl::OptionsParser::parse().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors