A single option supported by an ACL: -x[=value] or –name[=value]. More...
#include <Options.h>
Public Types | |
enum | ValueExpectation { valueNone , valueOptional , valueRequired } |
Public Member Functions | |
Option (const char *nameThatEnables, const char *nameThatDisables=nullptr, ValueExpectation vex=valueNone) | |
virtual | ~Option () |
virtual bool | configured () const =0 |
virtual void | enable () const =0 |
called after parsing onName without a value (e.g., -x or –enable-x) More... | |
virtual void | configureWith (const SBuf &rawValue) const =0 |
called after parsing onName and a value (e.g., -x=v or –enable-x=v) More... | |
virtual void | disable () const =0 |
called after parsing offName (e.g., +i or –disable-x) More... | |
virtual void | unconfigure () const =0 |
clear enable(), configureWith(), or disable() effects More... | |
virtual bool | disabled () const =0 |
whether disable() has been called 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 | |
const char *const | onName = nullptr |
A name that must be used to explicitly enable this Option (required). More... | |
const char *const | offName = nullptr |
ValueExpectation | valueExpectation = valueNone |
expect "=value" part? More... | |
Detailed Description
Member Enumeration Documentation
◆ ValueExpectation
Constructor & Destructor Documentation
◆ Option()
|
explicit |
Definition at line 66 of file Options.cc.
◆ ~Option()
Member Function Documentation
◆ configured()
|
pure virtual |
whether the admin explicitly specified this option (i.e., whether enable(), configureWith(), or disable() has been called)
Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
◆ configureWith()
|
pure virtual |
Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
◆ disable()
|
pure virtual |
Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
◆ disabled()
|
pure virtual |
Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
◆ enable()
|
pure virtual |
Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
◆ print()
|
pure virtual |
Implemented in Acl::TypedOption< Recipient >, Acl::TypedOption< CharacterSetOptionValue >, Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
Referenced by Acl::operator<<().
◆ unconfigure()
|
pure virtual |
Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
◆ valued()
|
pure virtual |
Implemented in Acl::TypedOption< Recipient >, and Acl::TypedOption< CharacterSetOptionValue >.
Member Data Documentation
◆ offName
const char* const Acl::Option::offName = nullptr |
A name that must be used to explicitly disable this Option (optional). Nil for (and only for) options that cannot be disabled().
Definition at line 92 of file Options.h.
Referenced by Acl::TypedOption< Recipient >::disabled(), and Acl::TypedOption< Recipient >::print().
◆ onName
const char* const Acl::Option::onName = nullptr |
Definition at line 88 of file Options.h.
Referenced by Option(), and Acl::TypedOption< Recipient >::print().
◆ valueExpectation
ValueExpectation Acl::Option::valueExpectation = valueNone |
The documentation for this class was generated from the following files:
- src/acl/Options.h
- src/acl/Options.cc