Logo Search packages:      
Sourcecode: vbindiff version File versions  Download package

Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

GetOpt Class Reference

Collaboration diagram for GetOpt:
Collaboration graph
[legend]

List of all members.

Classes

struct  Option

Public Types

typedef bool( ArgFunc )(GetOpt *getopt, const Option *option, const char *asEntered, Connection connected, const char *argument, int *usedChars)
enum  Connection { nextArg, withEquals, adjacent }
typedef void( ErrorFunc )(const char *option, const char *message)
enum  Flag { needArg = 0x01, repeatable = 0x02 }
enum  Found { notFound, noArg, withArg }
enum  Type { optArg, optLong, optShort }

Public Member Functions

int currentArg () const
 GetOpt (const Option *aList)
void init (int theArgc, const char **theArgv)
bool nextOption (const Option *&option, const char *&asEntered)
int process (int theArgc, const char **theArgv)
void reportError (const char *option, const char *message)

Static Public Member Functions

static bool isFloat (GetOpt *getopt, const Option *option, const char *asEntered, Connection connected, const char *argument, int *usedChars)
static bool isLong (GetOpt *getopt, const Option *option, const char *asEntered, Connection connected, const char *argument, int *usedChars)
static bool isString (GetOpt *getopt, const Option *option, const char *asEntered, Connection connected, const char *argument, int *usedChars)
static void printError (const char *option, const char *message)

Public Attributes

bool error
ErrorFunc * errorOutput
const char * optionStart

Protected Member Functions

void checkReturnAll ()
const OptionfindLongOption (const char *option)
const OptionfindShortOption (char option) const
bool nextOption (const char *&option, Type &type, int &posArg)

Protected Attributes

int argc
int argi
const char ** argv
int chari
bool normalOnly
const OptionoptionList
const OptionreturningAll
char shortOptionBuf [3]

Detailed Description

Definition at line 16 of file GetOpt.hpp.


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

Generated by  Doxygen 1.6.0   Back to index