Command Line object. More...
#include <cmdline.h>
Public Member Functions | |
virtual | ~CommandLine (void) throw () |
virtual void | getKeys (OUT VecString &keys)=0 throw () |
virtual bool | getValues (IN const char *key, OUT VecString &values)=0 throw () |
Static Public Member Functions | |
static smart_ptr< CommandLine > | create (IN int argc, IN const char *argv[]) throw () |
Command Line object.
Create one of these from the command line strings, and then query it about options you care about.
Example:
int main(int argc, char * argv[]) { smart_ptr<CommandLine> cmdline = CommandLine::create(argc, argv); const char * file = getSingleKeyValue(cmdline, "file", false); if (!file) { std::cout << "recommended usage: "; std::cout << "my_program --file <path>"; } return 0; }
Definition at line 79 of file cmdline.h.
CommandLine::~CommandLine | ( | void | ) | throw () [virtual] |
Definition at line 39 of file cmdline.cpp.