arg  1.2
a C++ command-line parser
Public Member Functions | List of all members
arg::Argument Class Reference

Positional arguments on command line. More...

#include <arg.hh>

Public Member Functions

 Argument (std::string const &name)
 positional argument with name More...
 
template<typename T >
Argumentstow (T &t)
 stow value to streamable variable
 
Argumentstore (std::shared_ptr< Value > ptr=0)
 store value to "* ptr", the Value will be released by the Argument
 
Argumenthelp (std::string const &text)
 help text
 
std::string const & get_name ()
 get name of the argument
 
std::string get_help ()
 get help text
 
void process (std::string const &str)
 process string data
 

Detailed Description

Positional arguments on command line.

Constructor & Destructor Documentation

◆ Argument()

Argument::Argument ( std::string const &  name)

positional argument with name

Parameters
namename for the argument