Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
toolbox::util::ArgvLexer Class Reference

#include <toolbox/util/Argv.hpp>

Public Types

using ConstIterator = ArgvSequence::ConstIterator
 

Public Member Functions

 ArgvLexer (ConstIterator begin, ConstIterator end) noexcept
 
 ArgvLexer (ArgvSequence argv) noexcept
 
 ArgvLexer (int argc, const char *const argv[]) noexcept
 
 ~ArgvLexer ()=default
 
 ArgvLexer (const ArgvLexer &) noexcept=default
 
ArgvLexeroperator= (const ArgvLexer &) noexcept=default
 
 ArgvLexer (ArgvLexer &&) noexcept=default
 
ArgvLexeroperator= (ArgvLexer &&) noexcept=default
 
bool empty () const noexcept
 
std::string_view arg () const noexcept
 
std::string_view opt () const noexcept
 
void pop () noexcept
 
void pop_switch ()
 
std::string_view pop_value ()
 

Detailed Description

Definition at line 54 of file Argv.hpp.

Member Typedef Documentation

◆ ConstIterator

Definition at line 56 of file Argv.hpp.

Constructor & Destructor Documentation

◆ ArgvLexer() [1/5]

toolbox::util::ArgvLexer::ArgvLexer ( ConstIterator  begin,
ConstIterator  end 
)
inlinenoexcept

Definition at line 57 of file Argv.hpp.

◆ ArgvLexer() [2/5]

toolbox::util::ArgvLexer::ArgvLexer ( ArgvSequence  argv)
inlineexplicitnoexcept

Definition at line 63 of file Argv.hpp.

◆ ArgvLexer() [3/5]

toolbox::util::ArgvLexer::ArgvLexer ( int  argc,
const char *const  argv[] 
)
inlinenoexcept

Definition at line 67 of file Argv.hpp.

◆ ~ArgvLexer()

toolbox::util::ArgvLexer::~ArgvLexer ( )
default

◆ ArgvLexer() [4/5]

toolbox::util::ArgvLexer::ArgvLexer ( const ArgvLexer )
defaultnoexcept

◆ ArgvLexer() [5/5]

toolbox::util::ArgvLexer::ArgvLexer ( ArgvLexer &&  )
defaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

ArgvLexer & toolbox::util::ArgvLexer::operator= ( const ArgvLexer )
defaultnoexcept

◆ operator=() [2/2]

ArgvLexer & toolbox::util::ArgvLexer::operator= ( ArgvLexer &&  )
defaultnoexcept

◆ empty()

bool toolbox::util::ArgvLexer::empty ( ) const
inlinenoexcept

Definition at line 81 of file Argv.hpp.

Referenced by pop_value().

◆ arg()

std::string_view toolbox::util::ArgvLexer::arg ( ) const
inlinenoexcept

Definition at line 83 of file Argv.hpp.

◆ opt()

std::string_view toolbox::util::ArgvLexer::opt ( ) const
inlinenoexcept

Definition at line 84 of file Argv.hpp.

Referenced by toolbox::util::Options::parse().

◆ pop()

void toolbox::util::ArgvLexer::pop ( )
inlinenoexcept

Definition at line 86 of file Argv.hpp.

◆ pop_switch()

void toolbox::util::ArgvLexer::pop_switch ( )

Use this pop overload when the current option is a switch. Throw std::runtime_error if the switch had an attached value.

Definition at line 25 of file Argv.cpp.

◆ pop_value()

string_view toolbox::util::ArgvLexer::pop_value ( )

Use this pop overload when the current option expects a value. Throw std::runtime_error if no value exists.

Definition at line 34 of file Argv.cpp.


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