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 22 of file Options.cc.

Member Function Documentation

◆ advance()

bool Acl::OptionExtractor::advance ( )
protected

◆ 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()

void Acl::OptionExtractor::extractShort ( )
protected

Definition at line 154 of file Options.cc.

References debugs.

◆ extractWhole()

void Acl::OptionExtractor::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_

SBuf::size_type Acl::OptionExtractor::letterPos_ = 0
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_

SBuf Acl::OptionExtractor::prefix_
private

Definition at line 40 of file Options.cc.

◆ sawValue_

bool Acl::OptionExtractor::sawValue_ = false
private

Definition at line 43 of file Options.cc.

◆ value_

SBuf Acl::OptionExtractor::value_
private

Definition at line 41 of file Options.cc.


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors