36 #ifndef _GetLongOption_h_ 37 #define _GetLongOption_h_ 64 option = description = value = opt_value =
nullptr;
79 int setcell(
Cell *c,
char *valtoken,
char *nexttoken,
const char *
name);
85 static char *
basename(
char *pathname);
87 int parse(
int argc,
char *
const *argv);
88 int parse(
char *str,
char *p);
90 int enroll(
const char *opt,
OptType t,
const char *desc,
const char *val,
91 const char *optval =
nullptr);
92 const char *
retrieve(
const char *opt)
const;
94 void usage(std::ostream &outfile = std::cout)
const;
103 void usage(
const char *str) { ustring = str; }
Definition: Ioss_GetLongOpt.h:50
char optmarker
Definition: Ioss_GetLongOpt.h:76
Definition: Ioss_GetLongOpt.h:50
const char * ustring
Definition: Ioss_GetLongOpt.h:72
const char * description
Definition: Ioss_GetLongOpt.h:57
The main namespace for the Ioss library.
Definition: Iocgns_DatabaseIO.h:50
int parse(int argc, char *const *argv)
parse command line arguments
Definition: Ioss_GetLongOpt.C:151
Definition: Ioss_GetLongOpt.h:53
static char * basename(char *pathname)
Extract the base file name from a full path.
Definition: Ioss_GetLongOpt.C:72
Cell * next
Definition: Ioss_GetLongOpt.h:60
int enroll_done
Definition: Ioss_GetLongOpt.h:75
int setcell(Cell *c, char *valtoken, char *nexttoken, const char *name)
Definition: Ioss_GetLongOpt.C:334
char * pname
Definition: Ioss_GetLongOpt.h:73
const char * option
Definition: Ioss_GetLongOpt.h:55
void usage(const char *str)
Set the program usage string.
Definition: Ioss_GetLongOpt.h:103
OptType type
Definition: Ioss_GetLongOpt.h:56
const char * value
Definition: Ioss_GetLongOpt.h:58
GetLongOption(char optmark='-')
Create an empty options database.
Definition: Ioss_GetLongOpt.C:42
const char * retrieve(const char *opt) const
Get a command line option object.
Definition: Ioss_GetLongOpt.C:128
Definition: Ioss_GetLongOpt.h:50
A database of program command line and environment variable options and methods for manipulating them...
Definition: Ioss_GetLongOpt.h:47
~GetLongOption()
Frees dynamically allocated memory.
Definition: Ioss_GetLongOpt.C:53
OptType
Definition: Ioss_GetLongOpt.h:50
std::string name(Ioss::GroupingEntity *entity)
Definition: io_info.C:71
const char * opt_value
Definition: Ioss_GetLongOpt.h:59
Cell * table
Definition: Ioss_GetLongOpt.h:71
Cell * last
Definition: Ioss_GetLongOpt.h:74
int enroll(const char *opt, OptType t, const char *desc, const char *val, const char *optval=nullptr)
Enroll a command line option into the database.
Definition: Ioss_GetLongOpt.C:97
Cell()
Definition: Ioss_GetLongOpt.h:62
void usage(std::ostream &outfile=std::cout) const
Print the program usage string.
Definition: Ioss_GetLongOpt.C:387