pianod2
multisource multiuser scriptable networked music player
Public Member Functions | Private Attributes | List of all members
Parsnip::ArgvCursor Class Reference

An iterator for argument vectors. More...

#include <parsnip_argv.h>

Collaboration diagram for Parsnip::ArgvCursor:
Collaboration graph
[legend]

Public Member Functions

 ArgvCursor (const ArgumentVector *the_argv)
 
 ArgvCursor (const ArgvCursor &from)=default
 
 ArgvCursor (ArgvCursor &&from)=default
 
ArgvCursoroperator= (const ArgvCursor &from)=default
 
ArgvCursoroperator= (ArgvCursor &&from)=default
 
bool isStart () const
 Check if the cursor is at the start of the command line. More...
 
bool isEnd () const
 Check if the cursor is at the end of the command line. More...
 
ArgvCursoroperator++ ()
 
ArgvCursor operator++ (int)
 
ArgvCursor operator+ (int value) const
 
ArgvCursor operator- (int value) const
 
const ArgumentVector::StringTypevalue () const
 Return the current token. More...
 
const ArgumentVector::StringType remainingString () const
 Return the raw, unsplit remainder of the command line. More...
 
std::vector< ArgumentVector::StringTyperemainingTokens () const
 

Private Attributes

const ArgumentVectorargv {nullptr}
 
ArgumentVector::size_type point = 0
 

Detailed Description

An iterator for argument vectors.

Constructor & Destructor Documentation

◆ ArgvCursor() [1/3]

Parsnip::ArgvCursor::ArgvCursor ( const ArgumentVector the_argv)
inline

◆ ArgvCursor() [2/3]

Parsnip::ArgvCursor::ArgvCursor ( const ArgvCursor from)
inlinedefault

◆ ArgvCursor() [3/3]

Parsnip::ArgvCursor::ArgvCursor ( ArgvCursor &&  from)
inlinedefault

Member Function Documentation

◆ isEnd()

bool Parsnip::ArgvCursor::isEnd ( ) const
inline

Check if the cursor is at the end of the command line.

Returns
True if the cursor is at the end. it does not point to a valid token.
Here is the caller graph for this function:

◆ isStart()

bool Parsnip::ArgvCursor::isStart ( ) const
inline

Check if the cursor is at the start of the command line.

Returns
True if it is at the beginning.
Here is the caller graph for this function:

◆ operator+()

ArgvCursor Parsnip::ArgvCursor::operator+ ( int  value) const
inline
Here is the call graph for this function:

◆ operator++() [1/2]

ArgvCursor& Parsnip::ArgvCursor::operator++ ( void  )
inline

◆ operator++() [2/2]

ArgvCursor Parsnip::ArgvCursor::operator++ ( int  )
inline

◆ operator-()

ArgvCursor Parsnip::ArgvCursor::operator- ( int  value) const
inline
Here is the call graph for this function:

◆ operator=() [1/2]

ArgvCursor& Parsnip::ArgvCursor::operator= ( ArgvCursor &&  from)
inlinedefault

◆ operator=() [2/2]

ArgvCursor& Parsnip::ArgvCursor::operator= ( const ArgvCursor from)
inlinedefault

◆ remainingString()

const ArgumentVector::StringType Parsnip::ArgvCursor::remainingString ( ) const
inline

Return the raw, unsplit remainder of the command line.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remainingTokens()

std::vector<ArgumentVector::StringType> Parsnip::ArgvCursor::remainingTokens ( ) const

◆ value()

const ArgumentVector::StringType& Parsnip::ArgvCursor::value ( ) const
inline

Return the current token.

Here is the caller graph for this function:

Member Data Documentation

◆ argv

const ArgumentVector* Parsnip::ArgvCursor::argv {nullptr}
private

◆ point

ArgumentVector::size_type Parsnip::ArgvCursor::point = 0
private

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