Options.h
Go to the documentation of this file.
60 explicit Option(const char *nameThatEnables, const char *nameThatDisables = nullptr, ValueExpectation vex = valueNone);
133 explicit TypedOption(const char *nameThatEnables, const char *nameThatDisables = nullptr, ValueExpectation vex = valueNone):
146 bool disabled() const override { return recipient_ && recipient_->disabled && /* paranoid: */ offName; }
a type-specific Option (e.g., a boolean –toggle or -m=SBuf)
Definition: Options.h:129
TypedOption(const char *nameThatEnables, const char *nameThatDisables=nullptr, ValueExpectation vex=valueNone)
Definition: Options.h:133
virtual bool configured() const =0
virtual void unconfigure() const =0
clear enable(), configureWith(), or disable() effects
void linkWith(Recipient *recipient) const
who to tell when this option is enabled
Definition: Options.h:137
virtual void disable() const =0
called after parsing offName (e.g., +i or –disable-x)
void configureWith(const SBuf &rawValue) const override
called after parsing onName and a value (e.g., -x=v or –enable-x=v)
Definition: Options.h:163
void disable() const override
called after parsing offName (e.g., +i or –disable-x)
Definition: Options.h:172
void enable() const override
called after parsing onName without a value (e.g., -x or –enable-x)
Definition: Options.h:154
bool enabled() const
whether the option is explicitly turned "on" (with or without a value)
Definition: Options.h:114
A single option supported by an ACL: -x[=value] or –name[=value].
Definition: Options.h:56
virtual void enable() const =0
called after parsing onName without a value (e.g., -x or –enable-x)
const char *const onName
A name that must be used to explicitly enable this Option (required).
Definition: Options.h:88
Stores configuration of a typical boolean flag or a single-value Option.
Definition: Options.h:99
virtual void configureWith(const SBuf &rawValue) const =0
called after parsing onName and a value (e.g., -x=v or –enable-x=v)
void unconfigure() const override
clear enable(), configureWith(), or disable() effects
Definition: Options.h:149
Option(const char *nameThatEnables, const char *nameThatDisables=nullptr, ValueExpectation vex=valueNone)
Definition: Options.cc:66
virtual bool valued() const =0
virtual void print(std::ostream &os) const =0
prints a configuration snippet (as an admin could have typed)
void print(std::ostream &os) const override
prints a configuration snippet (as an admin could have typed)
Definition: Options.h:181
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products