low-level parser that extracts but does not interpret ACL options More...
Public Member Functions | |
bool | extractOne () |
const SBuf & | value () const |
extracted option value (requires hasValue) More... | |
Public Attributes | |
SBuf | name |
extracted option name, including dash(es) More... | |
bool | hasValue = false |
whether the option has a value (-x=value) More... | |
Protected Member Functions | |
bool | advance () |
extracts a token with the next option/flag(s) or returns false More... | |
void | extractWhole () |
handles -x[=option] or –foo[=option] More... | |
void | extractShort () |
handles one flag letter inside an -xyx[=option] or +xyz[=option] sequence More... | |
Private Attributes | |
SBuf | prefix_ |
option name(s), including leading dash(es) More... | |
SBuf | value_ |
the last seen value of some option More... | |
SBuf::size_type | letterPos_ = 0 |
letter position inside an -xyz sequence More... | |
bool | sawValue_ = false |
the current option sequence had a value More... | |
Detailed Description
Definition at line 22 of file Options.cc.
Member Function Documentation
◆ advance()
|
protected |
Definition at line 117 of file Options.cc.
References ConfigParser::NextKvPair(), ConfigParser::NextToken(), ConfigParser::PeekAtToken(), TexcHere, and ToSBuf().
◆ extractOne()
bool Acl::OptionExtractor::extractOne | ( | ) |
parses the next option and fills public members with its details
- Returns
- whether option extraction was successful
Definition at line 84 of file Options.cc.
References TexcHere, and ToSBuf().
Referenced by Acl::OptionsParser::parse().
◆ extractShort()
|
protected |
Definition at line 154 of file Options.cc.
References debugs.
◆ extractWhole()
|
protected |
Definition at line 144 of file Options.cc.
References debugs.
◆ value()
const SBuf & Acl::OptionExtractor::value | ( | ) | const |
Definition at line 77 of file Options.cc.
References Must.
Referenced by Acl::OptionsParser::parse().
Member Data Documentation
◆ hasValue
bool Acl::OptionExtractor::hasValue = false |
Definition at line 31 of file Options.cc.
Referenced by Acl::OptionsParser::parse().
◆ letterPos_
|
private |
Definition at line 42 of file Options.cc.
◆ name
SBuf Acl::OptionExtractor::name |
Definition at line 30 of file Options.cc.
Referenced by Acl::OptionsParser::parse().
◆ prefix_
|
private |
Definition at line 40 of file Options.cc.
◆ sawValue_
|
private |
Definition at line 43 of file Options.cc.
◆ value_
|
private |
Definition at line 41 of file Options.cc.
The documentation for this class was generated from the following file:
- src/acl/Options.cc