Go to the documentation of this file.
10 #ifndef _GetLongOption_h_
11 #define _GetLongOption_h_
53 int setcell(
Cell *c,
char *valtoken,
char *nexttoken,
const char *
name);
59 static char *
basename(
char *pathname);
61 int parse(
int argc,
char *
const *argv);
62 int parse(
char *str,
char *p);
64 int enroll(
const char *opt,
OptType t,
const char *desc,
const char *val,
65 const char *optval =
nullptr);
66 const char *
retrieve(
const char *opt)
const;
69 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:47
Cell * table
Definition: Ioss_GetLongOpt.h:45
@ MandatoryValue
Definition: Ioss_GetLongOpt.h:24
const char * description
Definition: Ioss_GetLongOpt.h:31
const char * opt_value
Definition: Ioss_GetLongOpt.h:33
int parse(int argc, char *const *argv)
parse command line arguments
Definition: Ioss_GetLongOpt.C:127
The main namespace for the Ioss library.
Definition: Ioad_DatabaseIO.C:40
OptType type
Definition: Ioss_GetLongOpt.h:30
const char * ustring
Definition: Ioss_GetLongOpt.h:46
Cell * last
Definition: Ioss_GetLongOpt.h:48
const char * option
Definition: Ioss_GetLongOpt.h:29
Cell()
Definition: Ioss_GetLongOpt.h:36
GetLongOption(char optmark='-')
Create an empty options database.
Definition: Ioss_GetLongOpt.C:17
const char * value
Definition: Ioss_GetLongOpt.h:32
@ OptionalValue
Definition: Ioss_GetLongOpt.h:24
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:72
const char * retrieve(const char *opt) const
Get a command line option object.
Definition: Ioss_GetLongOpt.C:105
Definition: Ioss_GetLongOpt.h:28
Cell * next
Definition: Ioss_GetLongOpt.h:34
char * pname
Definition: Ioss_GetLongOpt.h:47
int enroll_done
Definition: Ioss_GetLongOpt.h:49
char optmarker
Definition: Ioss_GetLongOpt.h:50
@ NoValue
Definition: Ioss_GetLongOpt.h:24
void usage(std::ostream &outfile=std::cout) const
Print the program usage string.
Definition: Ioss_GetLongOpt.C:360
A database of program command line and environment variable options and methods for manipulating them...
Definition: Ioss_GetLongOpt.h:22
OptType
Definition: Ioss_GetLongOpt.h:24
std::string name(const Ioss::GroupingEntity *entity)
Definition: io_info.C:65
void usage(const char *str)
Set the program usage string.
Definition: Ioss_GetLongOpt.h:78
~GetLongOption()
Frees dynamically allocated memory.
Definition: Ioss_GetLongOpt.C:28
int setcell(Cell *c, char *valtoken, char *nexttoken, const char *name)
Definition: Ioss_GetLongOpt.C:308
const char * program_name() const
Definition: Ioss_GetLongOpt.C:98