#include <Options.h>
Inheritance diagram for oasys::EnumOpt:
Definition at line 442 of file Options.h.
Public Member Functions | |
EnumOpt (const char *opt, Case *cases, int *valp, const char *valdesc="", const char *desc="", bool *setp=NULL) | |
Basic constructor. | |
EnumOpt (char shortopt, const char *longopt, Case *cases, int *valp, const char *valdesc="", const char *desc="", bool *setp=NULL) | |
Alternative constructor with both short and long options, suitable for getopt calls. | |
Protected Member Functions | |
int | set (const char *val, size_t len) |
Virtual callback to set the option to the given string value. | |
Protected Attributes | |
Case * | cases_ |
Classes | |
struct | Case |
oasys::EnumOpt::EnumOpt | ( | const char * | opt, | |
Case * | cases, | |||
int * | valp, | |||
const char * | valdesc = "" , |
|||
const char * | desc = "" , |
|||
bool * | setp = NULL | |||
) |
Basic constructor.
opt | option string | |
cases | pointer to the array of cases | |
valp | pointer to the value | |
valdesc | short description for the value | |
desc | descriptive string | |
setp | optional pointer to indicate whether or not the option was set |
Definition at line 384 of file Options.cc.
oasys::EnumOpt::EnumOpt | ( | char | shortopt, | |
const char * | longopt, | |||
Case * | cases, | |||
int * | valp, | |||
const char * | valdesc = "" , |
|||
const char * | desc = "" , |
|||
bool * | setp = NULL | |||
) |
Alternative constructor with both short and long options, suitable for getopt calls.
shortopt | short option character | |
longopt | long option string | |
cases | pointer to the array of cases | |
valp | pointer to the value | |
valdesc | short description for the value | |
desc | descriptive string | |
setp | optional pointer to indicate whether or not the option was set |
Definition at line 391 of file Options.cc.
int oasys::EnumOpt::set | ( | const char * | val, | |
size_t | len | |||
) | [protected, virtual] |
Virtual callback to set the option to the given string value.
Implements oasys::Opt.
Definition at line 401 of file Options.cc.
References cases_, oasys::Opt::setp_, oasys::EnumOpt::Case::val, and oasys::Opt::valp_.
Case* oasys::EnumOpt::cases_ [protected] |