Go to the documentation of this file.
36 #ifndef _GetLongOption_h_
37 #define _GetLongOption_h_
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;
static char * basename(char *pathname)
Extract the base file name from a full path.
Definition: Ioss_GetLongOpt.C:73
Cell * table
Definition: Ioss_GetLongOpt.h:71
Definition: Ioss_GetLongOpt.h:50
const char * description
Definition: Ioss_GetLongOpt.h:57
const char * opt_value
Definition: Ioss_GetLongOpt.h:59
int parse(int argc, char *const *argv)
parse command line arguments
Definition: Ioss_GetLongOpt.C:151
The main namespace for the Ioss library.
Definition: Ioad_DatabaseIO.C:66
OptType type
Definition: Ioss_GetLongOpt.h:56
const char * ustring
Definition: Ioss_GetLongOpt.h:72
Cell * last
Definition: Ioss_GetLongOpt.h:74
const char * option
Definition: Ioss_GetLongOpt.h:55
Cell()
Definition: Ioss_GetLongOpt.h:62
GetLongOption(char optmark='-')
Create an empty options database.
Definition: Ioss_GetLongOpt.C:43
const char * value
Definition: Ioss_GetLongOpt.h:58
Definition: Ioss_GetLongOpt.h:50
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:98
const char * retrieve(const char *opt) const
Get a command line option object.
Definition: Ioss_GetLongOpt.C:129
Definition: Ioss_GetLongOpt.h:53
Cell * next
Definition: Ioss_GetLongOpt.h:60
char * pname
Definition: Ioss_GetLongOpt.h:73
int enroll_done
Definition: Ioss_GetLongOpt.h:75
char optmarker
Definition: Ioss_GetLongOpt.h:76
Definition: Ioss_GetLongOpt.h:50
void usage(std::ostream &outfile=std::cout) const
Print the program usage string.
Definition: Ioss_GetLongOpt.C:384
A database of program command line and environment variable options and methods for manipulating them...
Definition: Ioss_GetLongOpt.h:47
OptType
Definition: Ioss_GetLongOpt.h:50
std::string name(const Ioss::GroupingEntity *entity)
Definition: io_info.C:89
void usage(const char *str)
Set the program usage string.
Definition: Ioss_GetLongOpt.h:103
~GetLongOption()
Frees dynamically allocated memory.
Definition: Ioss_GetLongOpt.C:54
int setcell(Cell *c, char *valtoken, char *nexttoken, const char *name)
Definition: Ioss_GetLongOpt.C:332