Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

cmdoptns.h File Reference

Command line option parsing interface. More...

#include <cc++/string.h>

Go to the source code of this file.

Namespaces

namespace  ost

Classes

class  ost::CommandOption
 CommandOption is the base class for all command line options. More...
class  ost::CommandOptionWithArg
 Derived class of CommandOption for options that have a value associated with them. More...
class  ost::CommandOptionArg
 Class for options with an argument e.g. More...
class  ost::CommandOptionRest
 It only makes sense to have a single one of these set and it is exclusive with CommandOptionCollect. CommandOption to take the rest of the command line. More...
class  ost::CommandOptionCollect
 It only makes sense to have a single one of these set and it is also exclusive with CommandOptionRest. CommandOption to collect parameters that are not options. More...
class  ost::CommandOptionNoArg
 CommandOption type for flags. More...
class  ost::CommandOptionParse
 This is the CommandOptionParse interface class. More...

Functions

__EXPORT CommandOptionParse * makeCommandOptionParse (int argc, char **argv, char *comment, CommandOption *options=defaultCommandOptionList)
 makeCommandOptionParse will create an implementation of a CommandOptionParse object.

Variables

__EXPORT CommandOption * defaultCommandOptionList
 This defines a linked list head pointer for all the command line options that use the default list.


Detailed Description

Command line option parsing interface.


Function Documentation

__EXPORT CommandOptionParse* makeCommandOptionParse int  argc,
char **  argv,
char *  comment,
CommandOption *  options = defaultCommandOptionList
 

makeCommandOptionParse will create an implementation of a CommandOptionParse object.

This particular implementation is a wrapper around getopt_long(3). That interface unfortunatly does not provide enough information to give the best error messages with malformed input. If the implementation changes there is a good chance that the binary interface will remain the same.

Examples:
cmdlineopt.cpp.


Variable Documentation

__EXPORT CommandOption* ost::defaultCommandOptionList
 

This defines a linked list head pointer for all the command line options that use the default list.

It will most likely be used in most cases without being explicitly referenced in application code. It is a default value of various method's parameters.


Generated on Sat May 12 17:58:21 2007 for GNU CommonC++ by  doxygen 1.3.9.1