low-level parser that extracts but does not interpret ACL options More...

Collaboration diagram for Acl::OptionExtractor:

Public Member Functions

bool extractOne ()
const SBufvalue () 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 21 of file Options.cc.

Member Function Documentation

bool Acl::OptionExtractor::advance ( )
bool Acl::OptionExtractor::extractOne ( )

parses the next option and fills public members with its details

whether option extraction was successful

Definition at line 86 of file Options.cc.

References TexcHere, and ToSBuf().

Referenced by Acl::OptionsParser::parse().

void Acl::OptionExtractor::extractShort ( )

Definition at line 156 of file Options.cc.

References debugs.

void Acl::OptionExtractor::extractWhole ( )

Definition at line 146 of file Options.cc.

References debugs.

const SBuf & Acl::OptionExtractor::value ( ) const

Definition at line 79 of file Options.cc.

References Must.

Referenced by Acl::OptionsParser::parse().

Member Data Documentation

bool Acl::OptionExtractor::hasValue = false

Definition at line 30 of file Options.cc.

Referenced by Acl::OptionsParser::parse().

SBuf::size_type Acl::OptionExtractor::letterPos_ = 0

Definition at line 41 of file Options.cc.

SBuf Acl::OptionExtractor::name

Definition at line 29 of file Options.cc.

Referenced by Acl::OptionsParser::parse().

SBuf Acl::OptionExtractor::prefix_

Definition at line 39 of file Options.cc.

bool Acl::OptionExtractor::sawValue_ = false

Definition at line 42 of file Options.cc.

SBuf Acl::OptionExtractor::value_

Definition at line 40 of file Options.cc.

The documentation for this class was generated from the following file:






Web Site Translations