fix8
version 1.4.0
Open Source C++ FIX Framework
|
Convenient program help/usage wrapper. Generates a standardised usage message. More...
#include <usage.hpp>
Public Member Functions | |
UsageMan (const std::string &prognm, const std::string &argstr, const std::string ¶ms, int splen=3, int argoptlen=23) | |
virtual | ~UsageMan () |
Dtor. More... | |
bool | add (const char sw, const std::string &lsw, const std::string &help) |
void | add (const std::string &xtr) |
void | setdesc (const std::string &desc) |
void | print (std::ostream &os) const |
Private Types | |
using | OPTEL = std::map< const char, const std::pair< const std::string, const std::string >> |
Private Attributes | |
const std::string | prognm_ |
const std::string | params_ |
std::string | argstr_ |
std::string | description_ |
OPTEL | optels_ |
std::list< std::string > | xtrlines_ |
const int | splen_ |
const int | argoptlen_ |
Convenient program help/usage wrapper. Generates a standardised usage message.
|
private |
|
inline |
|
inline |
Add a command line option.
sw | the single character switch |
lsw | the string switch (long version) |
help | the associated help string |
Definition at line 73 of file usage.hpp.
Referenced by print_usage().
|
inline |
|
inline |
|
inline |
Set the usage description string.
desc | the description string |
Definition at line 91 of file usage.hpp.
Referenced by print_usage().