b2api
B2000++ API Reference Manual, VERSION 4.6
 
Loading...
Searching...
No Matches
b2000::cmdline::CmdLine Class Reference

#include "b2cmdline.H"

Public Member Functions

 CmdLine (int argc_, char *argv_[])
 
CmdLineoperator<< (CmdOptBase &opt)
 
CmdLineoperator<< (CmdArgBase &opt)
 
CmdLineoperator<< (CmdArgListBase &opt)
 
void parse (bool only_opt=false)
 
void print_short_desc (std::ostream &out) const
 
void print_long_desc (std::ostream &out) const
 
std::string get_command_name () const
 
std::string get_command_line () const
 

Detailed Description

The command-line parser.

Constructor & Destructor Documentation

◆ CmdLine()

b2000::cmdline::CmdLine::CmdLine ( int  argc_,
char *  argv_[] 
)
inline

Constructor. It is initialized with the parameters of the main() function.

Parameters
argc_The number of command-line arguments.
argv_An array of pointers to '\0'-terminated character strings.

Member Function Documentation

◆ get_command_line()

std::string b2000::cmdline::CmdLine::get_command_line ( ) const

Returns the full command line.

◆ get_command_name()

std::string b2000::cmdline::CmdLine::get_command_name ( ) const

Returns the name of the command.

◆ operator<<() [1/3]

CmdLine & b2000::cmdline::CmdLine::operator<< ( CmdArgBase opt)
inline

Register a single command-line argument.

◆ operator<<() [2/3]

CmdLine & b2000::cmdline::CmdLine::operator<< ( CmdArgListBase opt)
inline

Register a command-line argument-list.

◆ operator<<() [3/3]

CmdLine & b2000::cmdline::CmdLine::operator<< ( CmdOptBase opt)
inline

Register a command-line option.

◆ parse()

void b2000::cmdline::CmdLine::parse ( bool  only_opt = false)

Initializes the CmdOpt and CmdArg instances with the given values.

◆ print_long_desc()

void b2000::cmdline::CmdLine::print_long_desc ( std::ostream &  out) const

Prints a more detailed message how to use.

◆ print_short_desc()

void b2000::cmdline::CmdLine::print_short_desc ( std::ostream &  out) const

Prints a short message how to use.


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