Public Member Functions | Static Public Member Functions

CommandLine Class Reference
[Command Line API]

Command Line object. More...

#include <cmdline.h>

Inheritance diagram for CommandLine:
Inheritance graph

List of all members.

Public Member Functions

virtual ~CommandLine (void) throw ()
virtual void getKeys (VecString &keys)=0 throw ()
virtual bool getValues (const char *key, VecString &values)=0 throw ()

Static Public Member Functions

static smart_ptr< CommandLinecreate (int argc, const char *argv[]) throw ()

Detailed Description

Command Line object.

Create one of these from the command line strings, and then query it about options you care about.


        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.

Constructor & Destructor Documentation

CommandLine::~CommandLine ( void   )  throw () [virtual]

Definition at line 39 of file cmdline.cpp.

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