|
Squid Web Cache v8/master
|
a type-specific Option (e.g., a boolean –toggle or -m=SBuf) More...
#include <Options.h>
Public Types | |
| enum | ValueExpectation { valueNone , valueOptional , valueRequired } |
Public Member Functions | |
| TypedOption (const char *nameThatEnables, const char *nameThatDisables=nullptr, ValueExpectation vex=valueNone) | |
| void | linkWith (Recipient *recipient) const |
| who to tell when this option is enabled | |
| bool | configured () const override |
| bool | disabled () const override |
| whether disable() has been called | |
| bool | valued () const override |
| void | unconfigure () const override |
| clear enable(), configureWith(), or disable() effects | |
| void | enable () const override |
| called after parsing onName without a value (e.g., -x or –enable-x) | |
| void | configureWith (const SBuf &rawValue) const override |
| called after parsing onName and a value (e.g., -x=v or –enable-x=v) | |
| void | disable () const override |
| called after parsing offName (e.g., +i or –disable-x) | |
| void | print (std::ostream &os) const override |
| prints a configuration snippet (as an admin could have typed) | |
Public Attributes | |
| const char *const | onName = nullptr |
| A name that must be used to explicitly enable this Option (required). | |
| const char *const | offName = nullptr |
| ValueExpectation | valueExpectation = valueNone |
| expect "=value" part? | |
Private Member Functions | |
| void | import (const SBuf &rawValue) const |
| void | printValue (std::ostream &os) const |
| void | import (const SBuf &rawValue) const |
| void | printValue (std::ostream &os) const |
Private Attributes | |
| Recipient * | recipient_ = nullptr |
| parsing results storage | |
|
inherited |
|
inlineexplicit |
|
inlineoverridevirtual |
whether the admin explicitly specified this option (i.e., whether enable(), configureWith(), or disable() has been called)
Implements Acl::Option.
Definition at line 145 of file Options.h.
References Acl::TypedOption< Recipient >::recipient_.
Referenced by Acl::TypedOption< Recipient >::print().
|
inlineoverridevirtual |
Implements Acl::Option.
Definition at line 163 of file Options.h.
References assert, and Acl::TypedOption< Recipient >::recipient_.
|
inlineoverridevirtual |
Implements Acl::Option.
Definition at line 172 of file Options.h.
References assert, and Acl::TypedOption< Recipient >::recipient_.
|
inlineoverridevirtual |
Implements Acl::Option.
Definition at line 146 of file Options.h.
References Acl::Option::offName, and Acl::TypedOption< Recipient >::recipient_.
Referenced by Acl::TypedOption< Recipient >::print().
|
inlineoverridevirtual |
Implements Acl::Option.
Definition at line 154 of file Options.h.
References assert, and Acl::TypedOption< Recipient >::recipient_.
|
inlineprivate |
Definition at line 25 of file CharacterSetOption.h.
References SBuf::c_str().
|
inlineprivate |
Definition at line 194 of file Options.h.
References Acl::TypedOption< Recipient >::recipient_.
|
inline |
Definition at line 137 of file Options.h.
References assert, and Acl::TypedOption< Recipient >::recipient_.
Referenced by Acl::DestinationDomainCheck::options(), ACLDestinationIP::options(), Acl::AnnotationCheck::options(), Acl::ServerNameCheck::options(), and ACLMaxUserIP::options().
|
inlineoverridevirtual |
Implements Acl::Option.
Definition at line 181 of file Options.h.
References Acl::TypedOption< Recipient >::configured(), Acl::TypedOption< Recipient >::disabled(), Acl::Option::offName, Acl::Option::onName, Acl::TypedOption< Recipient >::printValue(), and Acl::TypedOption< Recipient >::valued().
|
inlineprivate |
Definition at line 33 of file CharacterSetOption.h.
|
inlineprivate |
Definition at line 195 of file Options.h.
References Acl::TypedOption< Recipient >::recipient_.
Referenced by Acl::TypedOption< Recipient >::print().
|
inlineoverridevirtual |
Implements Acl::Option.
Definition at line 149 of file Options.h.
References assert, and Acl::TypedOption< Recipient >::recipient_.
|
inlineoverridevirtual |
Implements Acl::Option.
Definition at line 147 of file Options.h.
References Acl::TypedOption< Recipient >::recipient_.
Referenced by Acl::TypedOption< Recipient >::print().
|
inherited |
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().
|
inherited |
Definition at line 88 of file Options.h.
Referenced by Acl::Option::Option(), and Acl::TypedOption< Recipient >::print().
|
mutableprivate |
Definition at line 199 of file Options.h.
Referenced by Acl::TypedOption< Recipient >::configured(), Acl::TypedOption< Recipient >::configureWith(), Acl::TypedOption< Recipient >::disable(), Acl::TypedOption< Recipient >::disabled(), Acl::TypedOption< Recipient >::enable(), Acl::TypedOption< Recipient >::import(), Acl::TypedOption< Recipient >::linkWith(), Acl::TypedOption< Recipient >::printValue(), Acl::TypedOption< Recipient >::unconfigure(), and Acl::TypedOption< Recipient >::valued().
|
inherited |