#include <Options.h>

Inheritance diagram for Acl::Option:
Collaboration diagram for Acl::Option:

Public Types

enum  ValueExpectation {
  valueNone,
  valueOptional,
  valueRequired
}
 

Public Member Functions

 Option (ValueExpectation vex=valueNone)
 
virtual ~Option ()
 
virtual bool configured () const =0
 
virtual void configureDefault () const =0
 called after parsing -x or –name More...
 
virtual void configureWith (const SBuf &rawValue) const =0
 called after parsing -x=value or –name=value More...
 
virtual bool valued () const =0
 
virtual void print (std::ostream &os) const =0
 prints a configuration snippet (as an admin could have typed) More...
 

Public Attributes

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

Detailed Description

A single option supported by an ACL: -x[=value] or –name[=value] Unlike a parameter flag, this option applies to all ACL parameters.

Definition at line 39 of file Options.h.

Member Enumeration Documentation

◆ ValueExpectation

Enumerator
valueNone 
valueOptional 
valueRequired 

Definition at line 42 of file Options.h.

Constructor & Destructor Documentation

◆ Option()

Acl::Option::Option ( ValueExpectation  vex = valueNone)
inlineexplicit

Definition at line 43 of file Options.h.

◆ ~Option()

virtual Acl::Option::~Option ( )
inlinevirtual

Definition at line 44 of file Options.h.

References configured(), configureDefault(), configureWith(), print(), and valued().

Member Function Documentation

◆ configured()

virtual bool Acl::Option::configured ( ) const
pure virtual

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

Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.

Referenced by Acl::OptionValue< CharacterSet >::operator bool(), Acl::OptionsParser::parse(), and ~Option().

◆ configureDefault()

virtual void Acl::Option::configureDefault ( ) const
pure virtual

◆ configureWith()

virtual void Acl::Option::configureWith ( const SBuf rawValue) const
pure virtual

◆ print()

virtual void Acl::Option::print ( std::ostream &  os) const
pure virtual

◆ valued()

virtual bool Acl::Option::valued ( ) const
pure virtual

Member Data Documentation

◆ valueExpectation

ValueExpectation Acl::Option::valueExpectation = valueNone

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