#include <Option.h>
Inheritance diagram for rs::cmdline::ProgramInfo:
Public Methods | |
ProgramInfo (const char *program_name_, int main_version_, int sub_version_, const char *program_description_, const char *creation_date_=__DATE__) | |
Create the global program information. More... | |
~ProgramInfo () | |
void | init (int argc_, char *argv_[]) |
Process command line options and arguments. More... | |
void | needOne (CmdLineOptionArray options) |
Declare options, where one of them has to be given. More... | |
void | neededBy (const CmdLineOption &drug, const CmdLineOption &addict) |
Declare dependencies between CmdLineOptions. More... | |
void | infos (std::ostream &out) const |
Display program help. More... | |
bool | optionsSpecified () const |
Test if any options were given on command line. More... | |
void | throw_Error (const std::string &msg) const |
Throws an InfoError. If you print the error the program help is also shown. More... | |
const std::string & | CallPath () const |
returns the directory the program was called from. More... | |
const std::string & | ProgramPath () const |
returns the directory where the program is stored. More... | |
Exclude | |
Declaration of options that cannot be used together.
Each of the exclude-functions declares two (sets of) CmdLineOption's which may not be used together. If the user of your program uses any of them together, an InfoError will be raised. | |
void | exclude (CmdLineOptionArray opt1, CmdLineOptionArray opt2) |
void | exclude (CmdLineOption &opt1, CmdLineOptionArray opt2) |
void | exclude (CmdLineOptionArray opt1, CmdLineOption &opt2) |
void | exclude (CmdLineOption &opt1, CmdLineOption &opt2) |
Private Methods | |
void | setProgramPaths (const char *argv0) |
Private Attributes | |
std::string | program_name |
int | main_version |
int | sub_version |
std::string | program_description |
std::string | creation_date |
bool | any_option_given |
std::string | program_path |
std::string | call_path |
Definition at line 460 of file Option.h.
|
Create the global program information. Every program using the command line interface has to declare exactly one global instance of ProgramInfo.
Definition at line 436 of file Option.cpp. |
|
|
|
Definition at line 489 of file Option.cpp. Referenced by ProgramInfo::init(). |
|
Process command line options and arguments. When init is called, all declared options and arguments are scanned. If option -?, -h or --help is given or if an error occurs, then some help for the usage of the program is displayed.
Definition at line 518 of file Option.cpp. |
|
Definition at line 886 of file Option.cpp. |
|
|
|
|
|
|
|
Declare options, where one of them has to be given.
Definition at line 906 of file Option.cpp. |
|
Declare dependencies between CmdLineOptions.
Definition at line 921 of file Option.cpp. |
|
Display program help.
Definition at line 742 of file Option.cpp. |
|
Test if any options were given on command line.
|
|
Throws an InfoError. If you print the error the program help is also shown.
Definition at line 929 of file Option.cpp. |
|
returns the directory the program was called from.
Definition at line 936 of file Option.cpp. |
|
returns the directory where the program is stored.
Definition at line 945 of file Option.cpp. |
|
Definition at line 461 of file Option.h. Referenced by ProgramInfo::infos(), and ProgramInfo::setProgramPaths(). |
|
Definition at line 462 of file Option.h. Referenced by ProgramInfo::infos(). |
|
Definition at line 463 of file Option.h. Referenced by ProgramInfo::infos(). |
|
Definition at line 464 of file Option.h. Referenced by ProgramInfo::infos(). |
|
Definition at line 465 of file Option.h. Referenced by ProgramInfo::infos(). |
|
Definition at line 467 of file Option.h. Referenced by ProgramInfo::init(). |
|
Definition at line 471 of file Option.h. Referenced by ProgramInfo::ProgramPath(), and ProgramInfo::setProgramPaths(). |
|
Definition at line 472 of file Option.h. Referenced by ProgramInfo::CallPath(), and ProgramInfo::setProgramPaths(). |
Contact me in case of errors or questions. This documentation is powered by ![]() |
(C) 2000-2002 ![]() |