FFSM++
1.1.0
French Forest Sector Model ++
|
#include <anyoption.h>
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+1] |
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 |
Definition at line 32 of file anyoption.h.
AnyOption | ( | ) |
AnyOption | ( | int | maxoptions | ) |
AnyOption | ( | int | maxoptions, |
int | maxcharoptions | ||
) |
~AnyOption | ( | ) |
|
private |
Definition at line 521 of file anyoption.cpp.
Referenced by setCommandFlag(), setCommandOption(), setFileFlag(), setFileOption(), setFlag(), and setOption().
|
private |
|
private |
Definition at line 560 of file anyoption.cpp.
Referenced by addOption().
|
private |
Definition at line 571 of file anyoption.cpp.
void addUsage | ( | const char * | line | ) |
Definition at line 1153 of file anyoption.cpp.
Referenced by main().
|
private |
Definition at line 1166 of file anyoption.cpp.
Referenced by addUsage().
|
private |
Definition at line 143 of file anyoption.cpp.
Referenced by init().
void autoUsagePrint | ( | bool | flag | ) |
Definition at line 362 of file anyoption.cpp.
|
private |
Definition at line 1053 of file anyoption.cpp.
Referenced by justValue(), and valuePairs().
|
private |
Definition at line 253 of file anyoption.cpp.
Referenced by ~AnyOption().
|
private |
Definition at line 298 of file anyoption.cpp.
Referenced by processCommandArgs().
|
private |
Definition at line 971 of file anyoption.cpp.
Referenced by processFile().
|
private |
Definition at line 215 of file anyoption.cpp.
Referenced by addOption().
|
private |
Definition at line 194 of file anyoption.cpp.
Referenced by addOption().
|
private |
Definition at line 238 of file anyoption.cpp.
Referenced by addUsage().
|
private |
Definition at line 304 of file anyoption.cpp.
Referenced by processFile().
|
private |
Definition at line 829 of file anyoption.cpp.
Referenced by getFlag().
int getArgc | ( | ) |
Definition at line 905 of file anyoption.cpp.
Referenced by main().
char * getArgv | ( | int | index | ) |
Definition at line 911 of file anyoption.cpp.
bool getFlag | ( | const char * | _option | ) |
Definition at line 793 of file anyoption.cpp.
Referenced by main().
bool getFlag | ( | char | _optchar | ) |
char * getValue | ( | const char * | _option | ) |
Definition at line 780 of file anyoption.cpp.
Referenced by main().
char * getValue | ( | char | _optchar | ) |
bool hasOptions | ( | ) |
Definition at line 356 of file anyoption.cpp.
|
private |
Definition at line 87 of file anyoption.cpp.
Referenced by AnyOption().
|
private |
|
private |
Definition at line 1096 of file anyoption.cpp.
Referenced by processLine().
|
private |
Definition at line 738 of file anyoption.cpp.
Referenced by parsePOSIX().
|
private |
Definition at line 715 of file anyoption.cpp.
Referenced by parseGNU().
void noPOSIX | ( | ) |
Definition at line 310 of file anyoption.cpp.
|
private |
Definition at line 680 of file anyoption.cpp.
Referenced by processCommandArgs().
|
private |
Definition at line 653 of file anyoption.cpp.
Referenced by processCommandArgs().
|
private |
Definition at line 316 of file anyoption.cpp.
Referenced by addOption(), and processCommandArgs().
void printAutoUsage | ( | ) |
Definition at line 1133 of file anyoption.cpp.
Referenced by matchChar(), matchOpt(), parseGNU(), parsePOSIX(), and processCommandArgs().
void printHelp | ( | ) |
void printUsage | ( | ) |
Definition at line 1139 of file anyoption.cpp.
Referenced by main(), and printAutoUsage().
|
private |
Definition at line 335 of file anyoption.cpp.
|
private |
Definition at line 342 of file anyoption.cpp.
|
private |
Definition at line 349 of file anyoption.cpp.
|
private |
Definition at line 329 of file anyoption.cpp.
Referenced by addOption(), justValue(), matchChar(), matchOpt(), parseGNU(), parsePOSIX(), processCommandArgs(), and valuePairs().
void processCommandArgs | ( | ) |
Definition at line 610 of file anyoption.cpp.
Referenced by main(), and processCommandArgs().
void processCommandArgs | ( | int | max_args | ) |
void processCommandArgs | ( | int | _argc, |
char ** | _argv | ||
) |
void processCommandArgs | ( | int | _argc, |
char ** | _argv, | ||
int | max_args | ||
) |
bool processFile | ( | ) |
Definition at line 922 of file anyoption.cpp.
Referenced by processFile().
bool processFile | ( | const char * | _filename | ) |
|
private |
Definition at line 1023 of file anyoption.cpp.
Referenced by consumeFile().
void processOptions | ( | ) |
|
private |
Definition at line 937 of file anyoption.cpp.
Referenced by processFile().
|
private |
Definition at line 947 of file anyoption.cpp.
void setCommandFlag | ( | const char * | opt_string | ) |
void setCommandFlag | ( | char | opt_char | ) |
void setCommandFlag | ( | const char * | opt_string, |
char | opt_char | ||
) |
void setCommandLongPrefix | ( | char * | _prefix | ) |
Definition at line 275 of file anyoption.cpp.
void setCommandOption | ( | const char * | opt_string | ) |
void setCommandOption | ( | char | opt_char | ) |
void setCommandOption | ( | const char * | opt_string, |
char | opt_char | ||
) |
void setCommandPrefixChar | ( | char | _prefix | ) |
Definition at line 269 of file anyoption.cpp.
void setFileCommentChar | ( | char | _comment | ) |
Definition at line 285 of file anyoption.cpp.
void setFileDelimiterChar | ( | char | _delimiter | ) |
Definition at line 292 of file anyoption.cpp.
void setFileFlag | ( | const char * | opt_string | ) |
void setFileFlag | ( | char | opt_char | ) |
void setFileFlag | ( | 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 setFlag | ( | const char * | opt_string | ) |
Definition at line 499 of file anyoption.cpp.
Referenced by main().
void setFlag | ( | char | opt_char | ) |
void setFlag | ( | const char * | opt_string, |
char | opt_char | ||
) |
|
private |
Definition at line 859 of file anyoption.cpp.
Referenced by justValue(), matchChar(), and matchOpt().
|
private |
void setOption | ( | const char * | opt_string | ) |
Definition at line 477 of file anyoption.cpp.
Referenced by main().
void setOption | ( | char | opt_char | ) |
void setOption | ( | const char * | opt_string, |
char | opt_char | ||
) |
|
private |
Definition at line 844 of file anyoption.cpp.
Referenced by parseGNU(), parsePOSIX(), processCommandArgs(), and valuePairs().
|
private |
void setVerbose | ( | ) |
Definition at line 323 of file anyoption.cpp.
void useCommandArgs | ( | int | _argc, |
char ** | _argv | ||
) |
Definition at line 368 of file anyoption.cpp.
Referenced by processCommandArgs().
void useFiileName | ( | const char * | _filename | ) |
Definition at line 378 of file anyoption.cpp.
Referenced by processFile().
|
private |
Definition at line 1065 of file anyoption.cpp.
Referenced by processLine().
|
private |
Definition at line 761 of file anyoption.cpp.
Referenced by getFlag(), getValue(), processCommandArgs(), processFile(), processOptions(), setFlagOn(), and setValue().
|
private |
Definition at line 166 of file anyoption.h.
Referenced by init(), and useCommandArgs().
|
private |
Definition at line 163 of file anyoption.h.
Referenced by init(), processCommandArgs(), and useCommandArgs().
|
private |
Definition at line 164 of file anyoption.h.
Referenced by getArgv(), init(), processCommandArgs(), and useCommandArgs().
|
private |
Definition at line 219 of file anyoption.h.
Referenced by autoUsagePrint(), init(), and printAutoUsage().
|
private |
Definition at line 196 of file anyoption.h.
Referenced by CommandSet(), init(), and useCommandArgs().
|
private |
Definition at line 209 of file anyoption.h.
Referenced by consumeFile(), and init().
|
private |
Definition at line 210 of file anyoption.h.
Referenced by init(), and processLine().
|
private |
Definition at line 211 of file anyoption.h.
Referenced by consumeFile(), and init().
|
private |
Definition at line 208 of file anyoption.h.
Referenced by init(), parseGNU(), and parsePOSIX().
|
private |
Definition at line 207 of file anyoption.h.
Referenced by init(), and setFileDelimiterChar().
|
private |
Definition at line 206 of file anyoption.h.
Referenced by init(), and setFileCommentChar().
|
private |
Definition at line 197 of file anyoption.h.
Referenced by FileSet(), init(), and useFiileName().
|
private |
Definition at line 165 of file anyoption.h.
Referenced by init(), readFile(), and useFiileName().
|
private |
Definition at line 189 of file anyoption.h.
Referenced by addOption(), init(), setCommandFlag(), setCommandOption(), setFileFlag(), setFileOption(), setFlag(), setOption(), and valueStoreOK().
|
private |
Definition at line 218 of file anyoption.h.
Referenced by hasOptions(), init(), and useCommandArgs().
|
private |
Definition at line 205 of file anyoption.h.
Referenced by init(), processCommandArgs(), and setCommandLongPrefix().
|
private |
Definition at line 181 of file anyoption.h.
Referenced by addOption(), alloc(), doubleCharStorage(), and init().
|
private |
Definition at line 170 of file anyoption.h.
Referenced by init(), and processCommandArgs().
|
private |
Definition at line 174 of file anyoption.h.
Referenced by addOption(), alloc(), doubleOptStorage(), and init().
|
private |
Definition at line 193 of file anyoption.h.
Referenced by addUsage(), alloc(), doubleUsageStorage(), and init().
|
private |
Definition at line 198 of file anyoption.h.
Referenced by alloc(), init(), and ~AnyOption().
|
private |
Definition at line 169 of file anyoption.h.
Referenced by getArgc(), getArgv(), init(), and processCommandArgs().
|
private |
Definition at line 168 of file anyoption.h.
Referenced by cleanup(), getArgv(), init(), and processCommandArgs().
|
private |
Definition at line 213 of file anyoption.h.
Referenced by chomp(), init(), and processLine().
|
private |
Definition at line 216 of file anyoption.h.
Referenced by init(), and printUsage().
|
private |
Definition at line 204 of file anyoption.h.
Referenced by init(), processCommandArgs(), and setCommandPrefixChar().
|
private |
Definition at line 185 of file anyoption.h.
Referenced by addOption(), getFlag(), getValue(), init(), justValue(), matchChar(), setFlagOn(), setValue(), and valuePairs().
|
private |
Definition at line 184 of file anyoption.h.
Referenced by addOption(), alloc(), cleanup(), doubleCharStorage(), getFlag(), getValue(), setFlagOn(), and setValue().
|
private |
Definition at line 183 of file anyoption.h.
Referenced by addOption(), alloc(), cleanup(), doubleCharStorage(), justValue(), matchChar(), and valuePairs().
|
private |
Definition at line 178 of file anyoption.h.
Referenced by addOption(), getFlag(), getValue(), init(), justValue(), matchOpt(), setFlagOn(), setValue(), and valuePairs().
|
private |
Definition at line 182 of file anyoption.h.
Referenced by addOption(), alloc(), cleanup(), doubleCharStorage(), getFlag(), getValue(), justValue(), matchChar(), setFlagOn(), setValue(), and valuePairs().
|
private |
Definition at line 177 of file anyoption.h.
Referenced by addOption(), alloc(), cleanup(), doubleOptStorage(), getFlag(), getValue(), setFlagOn(), and setValue().
|
private |
Definition at line 175 of file anyoption.h.
Referenced by addOption(), alloc(), cleanup(), doubleOptStorage(), getFlag(), getValue(), justValue(), matchOpt(), parseGNU(), processCommandArgs(), setFlagOn(), setValue(), and valuePairs().
|
private |
Definition at line 176 of file anyoption.h.
Referenced by addOption(), alloc(), cleanup(), doubleOptStorage(), justValue(), matchOpt(), and valuePairs().
|
private |
Definition at line 199 of file anyoption.h.
|
private |
Definition at line 202 of file anyoption.h.
|
private |
Definition at line 201 of file anyoption.h.
|
private |
Definition at line 215 of file anyoption.h.
|
private |
Definition at line 192 of file anyoption.h.
Referenced by addUsage(), alloc(), cleanup(), doubleUsageStorage(), and printUsage().
|
private |
Definition at line 194 of file anyoption.h.
Referenced by addUsage(), init(), and printUsage().
|
private |
Definition at line 188 of file anyoption.h.
Referenced by cleanup(), getFlag(), getValue(), init(), setFlagOn(), setValue(), and valueStoreOK().
|
private |
Definition at line 200 of file anyoption.h.
Referenced by init(), printVerbose(), and setVerbose().
|
private |
Definition at line 212 of file anyoption.h.
Referenced by chomp(), init(), and parsePOSIX().