AnyOption Class Reference

#include <anyoption.h>

List of all members.

Public Member Functions

 AnyOption ()
 AnyOption (int maxoptions)
 AnyOption (int maxoptions, int maxcharoptions)
 ~AnyOption ()
void setCommandPrefixChar (char _prefix)
void setCommandLongPrefix (char *_prefix)
void setFileCommentChar (char _comment)
void setFileDelimiterChar (char _delimiter)
void useCommandArgs (int _argc, char **_argv)
void useFiileName (const char *_filename)
void noPOSIX ()
void setVerbose ()
void setOption (const char *opt_string)
void setOption (char opt_char)
void setOption (const char *opt_string, char opt_char)
void setFlag (const char *opt_string)
void setFlag (char opt_char)
void setFlag (const char *opt_string, char opt_char)
void setCommandOption (const char *opt_string)
void setCommandOption (char opt_char)
void setCommandOption (const char *opt_string, char opt_char)
void setCommandFlag (const char *opt_string)
void setCommandFlag (char opt_char)
void setCommandFlag (const char *opt_string, char opt_char)
void setFileOption (const char *opt_string)
void setFileOption (char opt_char)
void setFileOption (const char *opt_string, char opt_char)
void setFileFlag (const char *opt_string)
void setFileFlag (char opt_char)
void setFileFlag (const char *opt_string, char opt_char)
void processOptions ()
void processCommandArgs ()
void processCommandArgs (int max_args)
bool processFile ()
void processCommandArgs (int _argc, char **_argv)
void processCommandArgs (int _argc, char **_argv, int max_args)
bool processFile (const char *_filename)
char * getValue (const char *_option)
bool getFlag (const char *_option)
char * getValue (char _optchar)
bool getFlag (char _optchar)
void printUsage ()
void printAutoUsage ()
void addUsage (const char *line)
void printHelp ()
void autoUsagePrint (bool flag)
int getArgc ()
char * getArgv (int index)
bool hasOptions ()

Private Member Functions

void init ()
void init (int maxopt, int maxcharopt)
bool alloc ()
void cleanup ()
bool valueStoreOK ()
bool doubleOptStorage ()
bool doubleCharStorage ()
bool doubleUsageStorage ()
bool setValue (const char *option, char *value)
bool setFlagOn (const char *option)
bool setValue (char optchar, char *value)
bool setFlagOn (char optchar)
void addOption (const char *option, int type)
void addOption (char optchar, int type)
void addOptionError (const char *opt)
void addOptionError (char opt)
bool findFlag (char *value)
void addUsageError (const char *line)
bool CommandSet ()
bool FileSet ()
bool POSIX ()
char parsePOSIX (char *arg)
int parseGNU (char *arg)
bool matchChar (char c)
int matchOpt (char *opt)
char * readFile ()
char * readFile (const char *fname)
bool consumeFile (char *buffer)
void processLine (char *theline, int length)
char * chomp (char *str)
void valuePairs (char *type, char *value)
void justValue (char *value)
void printVerbose (const char *msg)
void printVerbose (char *msg)
void printVerbose (char ch)
void printVerbose ()

Private Attributes

int argc
char ** argv
const char * filename
char * appname
int * new_argv
int new_argc
int max_legal_args
int max_options
const char ** options
int * optiontype
int * optionindex
int option_counter
int max_char_options
char * optionchars
int * optchartype
int * optcharindex
int optchar_counter
char ** values
int g_value_counter
const char ** usage
int max_usage_lines
int usage_lines
bool command_set
bool file_set
bool mem_allocated
bool posix_style
bool verbose
bool print_usage
bool print_help
char opt_prefix_char
char long_opt_prefix [MAX_LONG_PREFIX_LENGTH]
char file_delimiter_char
char file_comment_char
char equalsign
char comment
char delimiter
char endofline
char whitespace
char nullterminate
bool set
bool once
bool hasoptions
bool autousage

Constructor & Destructor Documentation

AnyOption::AnyOption (  ) 

Here is the call graph for this function:

AnyOption::AnyOption ( int  maxoptions  ) 

Here is the call graph for this function:

AnyOption::AnyOption ( int  maxoptions,
int  maxcharoptions 
)

Here is the call graph for this function:

AnyOption::~AnyOption (  ) 

Here is the call graph for this function:


Member Function Documentation

void AnyOption::addOption ( char  optchar,
int  type 
) [private]

Here is the call graph for this function:

void AnyOption::addOption ( const char *  option,
int  type 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::addOptionError ( char  opt  )  [private]
void AnyOption::addOptionError ( const char *  opt  )  [private]

Here is the caller graph for this function:

void AnyOption::addUsage ( const char *  line  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::addUsageError ( const char *  line  )  [private]

Here is the caller graph for this function:

bool AnyOption::alloc (  )  [private]

Here is the caller graph for this function:

void AnyOption::autoUsagePrint ( bool  flag  ) 
char * AnyOption::chomp ( char *  str  )  [private]

Here is the caller graph for this function:

void AnyOption::cleanup (  )  [private]

Here is the caller graph for this function:

bool AnyOption::CommandSet (  )  [private]

Here is the caller graph for this function:

bool AnyOption::consumeFile ( char *  buffer  )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::doubleCharStorage (  )  [private]

Here is the caller graph for this function:

bool AnyOption::doubleOptStorage (  )  [private]

Here is the caller graph for this function:

bool AnyOption::doubleUsageStorage (  )  [private]

Here is the caller graph for this function:

bool AnyOption::FileSet (  )  [private]

Here is the caller graph for this function:

bool AnyOption::findFlag ( char *  value  )  [private]

Here is the caller graph for this function:

int AnyOption::getArgc (  ) 
char * AnyOption::getArgv ( int  index  ) 
bool AnyOption::getFlag ( char  _optchar  ) 

Here is the call graph for this function:

bool AnyOption::getFlag ( const char *  _option  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

char * AnyOption::getValue ( char  _optchar  ) 

Here is the call graph for this function:

char * AnyOption::getValue ( const char *  _option  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::hasOptions (  ) 
void AnyOption::init ( int  maxopt,
int  maxcharopt 
) [private]

Here is the call graph for this function:

void AnyOption::init (  )  [private]

Here is the caller graph for this function:

void AnyOption::justValue ( char *  value  )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::matchChar ( char  c  )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

int AnyOption::matchOpt ( char *  opt  )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::noPOSIX (  ) 
int AnyOption::parseGNU ( char *  arg  )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

char AnyOption::parsePOSIX ( char *  arg  )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::POSIX (  )  [private]

Here is the caller graph for this function:

void AnyOption::printAutoUsage (  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::printHelp (  ) 
void AnyOption::printUsage (  ) 

Here is the caller graph for this function:

void AnyOption::printVerbose (  )  [private]

Here is the caller graph for this function:

void AnyOption::printVerbose ( char  ch  )  [private]
void AnyOption::printVerbose ( char *  msg  )  [private]
void AnyOption::printVerbose ( const char *  msg  )  [private]
void AnyOption::processCommandArgs ( int  _argc,
char **  _argv,
int  max_args 
)

Here is the call graph for this function:

void AnyOption::processCommandArgs ( int  _argc,
char **  _argv 
)

Here is the call graph for this function:

void AnyOption::processCommandArgs ( int  max_args  ) 

Here is the call graph for this function:

void AnyOption::processCommandArgs (  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::processFile ( const char *  _filename  ) 

Here is the call graph for this function:

bool AnyOption::processFile (  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::processLine ( char *  theline,
int  length 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::processOptions (  ) 

Here is the call graph for this function:

char * AnyOption::readFile ( const char *  fname  )  [private]
char * AnyOption::readFile (  )  [private]

Here is the caller graph for this function:

void AnyOption::setCommandFlag ( const char *  opt_string,
char  opt_char 
)

Here is the call graph for this function:

void AnyOption::setCommandFlag ( char  opt_char  ) 

Here is the call graph for this function:

void AnyOption::setCommandFlag ( const char *  opt_string  ) 

Here is the call graph for this function:

void AnyOption::setCommandLongPrefix ( char *  _prefix  ) 
void AnyOption::setCommandOption ( const char *  opt_string,
char  opt_char 
)

Here is the call graph for this function:

void AnyOption::setCommandOption ( char  opt_char  ) 

Here is the call graph for this function:

void AnyOption::setCommandOption ( const char *  opt_string  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::setCommandPrefixChar ( char  _prefix  ) 
void AnyOption::setFileCommentChar ( char  _comment  ) 
void AnyOption::setFileDelimiterChar ( char  _delimiter  ) 
void AnyOption::setFileFlag ( const char *  opt_string,
char  opt_char 
)

Here is the call graph for this function:

void AnyOption::setFileFlag ( char  opt_char  ) 

Here is the call graph for this function:

void AnyOption::setFileFlag ( const char *  opt_string  ) 

Here is the call graph for this function:

void AnyOption::setFileOption ( const char *  opt_string,
char  opt_char 
)

Here is the call graph for this function:

void AnyOption::setFileOption ( char  opt_char  ) 

Here is the call graph for this function:

void AnyOption::setFileOption ( const char *  opt_string  ) 

Here is the call graph for this function:

void AnyOption::setFlag ( const char *  opt_string,
char  opt_char 
)

Here is the call graph for this function:

void AnyOption::setFlag ( char  opt_char  ) 

Here is the call graph for this function:

void AnyOption::setFlag ( const char *  opt_string  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::setFlagOn ( char  optchar  )  [private]

Here is the call graph for this function:

bool AnyOption::setFlagOn ( const char *  option  )  [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::setOption ( const char *  opt_string,
char  opt_char 
)

Here is the call graph for this function:

void AnyOption::setOption ( char  opt_char  ) 

Here is the call graph for this function:

void AnyOption::setOption ( const char *  opt_string  ) 

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::setValue ( char  optchar,
char *  value 
) [private]

Here is the call graph for this function:

bool AnyOption::setValue ( const char *  option,
char *  value 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void AnyOption::setVerbose (  ) 
void AnyOption::useCommandArgs ( int  _argc,
char **  _argv 
)

Here is the caller graph for this function:

void AnyOption::useFiileName ( const char *  _filename  ) 

Here is the caller graph for this function:

void AnyOption::valuePairs ( char *  type,
char *  value 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

bool AnyOption::valueStoreOK (  )  [private]

Here is the caller graph for this function:


Member Data Documentation

char* AnyOption::appname [private]
int AnyOption::argc [private]
char** AnyOption::argv [private]
bool AnyOption::autousage [private]
bool AnyOption::command_set [private]
char AnyOption::comment [private]
char AnyOption::delimiter [private]
char AnyOption::endofline [private]
char AnyOption::equalsign [private]
bool AnyOption::file_set [private]
const char* AnyOption::filename [private]
bool AnyOption::hasoptions [private]
char AnyOption::long_opt_prefix[MAX_LONG_PREFIX_LENGTH] [private]
int AnyOption::max_options [private]
bool AnyOption::mem_allocated [private]
int AnyOption::new_argc [private]
int* AnyOption::new_argv [private]
char AnyOption::nullterminate [private]
bool AnyOption::once [private]
int* AnyOption::optcharindex [private]
int* AnyOption::optchartype [private]
char* AnyOption::optionchars [private]
int* AnyOption::optionindex [private]
const char** AnyOption::options [private]
int* AnyOption::optiontype [private]
bool AnyOption::posix_style [private]
bool AnyOption::print_help [private]
bool AnyOption::print_usage [private]
bool AnyOption::set [private]
const char** AnyOption::usage [private]
int AnyOption::usage_lines [private]
char** AnyOption::values [private]
bool AnyOption::verbose [private]
char AnyOption::whitespace [private]

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

Generated on 4 Mar 2010 for TReqS by  doxygen 1.6.1