Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
Cmdline Class Reference

#include "lib/cmdline.hpp"

Description

Abstraction of the usual int argc, int** argv-Commandline, to be able to treat it as a vector of strings.

Inherits from vector<std::string>, but provides convenient conversions to string (joining delimited by space)...

Definition at line 48 of file cmdline.hpp.

Public Member Functions

 Cmdline (int argc, const char **argv)
 create as a tokenised copy of the current commandline.
 
 Cmdline (const string cmdline)
 create by tokenising a string (e.g.
 
 operator string () const
 conversion to string by joining the tokens
 
VectSoperator= (const VectS &source)
 
template<class In >
 Cmdline (In first, In last)
 
 Cmdline ()
 

Constructor & Destructor Documentation

◆ Cmdline() [1/4]

Cmdline ( int  argc,
const char **  argv 
)

create as a tokenised copy of the current commandline.

Note that argv[0] is always ignored.

Definition at line 41 of file cmdline.cpp.

◆ Cmdline() [2/4]

Cmdline ( const string  cmdline)
explicit

create by tokenising a string (e.g.

"fake" cmdline, separated by whitespace)

Definition at line 55 of file cmdline.cpp.

◆ Cmdline() [3/4]

template<class In >
Cmdline ( In  first,
In  last 
)
inline

Definition at line 59 of file cmdline.hpp.

◆ Cmdline() [4/4]

Cmdline ( )
inline

Definition at line 60 of file cmdline.hpp.

Member Function Documentation

◆ operator string()

operator string ( ) const

conversion to string by joining the tokens

Definition at line 73 of file cmdline.cpp.

◆ operator=()

VectS & operator= ( const VectS source)
inline

Definition at line 55 of file cmdline.hpp.

+ Inheritance diagram for Cmdline:
+ Collaboration diagram for Cmdline:

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