#include <Options.h>

Definition at line 392 of file Options.h.
Public Member Functions | |
| CharBufOpt (const char *opt, char *valp, size_t *lenp, size_t buflen, const char *valdesc="", const char *desc="", bool *setp=NULL) | |
| Basic constructor. | |
| CharBufOpt (char shortopt, const char *longopt, char *valp, size_t *lenp, size_t buflen, 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. | |
| void | get (StringBuffer *buf) |
| Virtual callback to get a string version of the current value. | |
Protected Attributes | |
| size_t | buflen_ |
| size_t * | lenp_ |
| oasys::CharBufOpt::CharBufOpt | ( | const char * | opt, | |
| char * | valp, | |||
| size_t * | lenp, | |||
| size_t | buflen, | |||
| const char * | valdesc = "", |
|||
| const char * | desc = "", |
|||
| bool * | setp = NULL | |||
| ) |
Basic constructor.
| opt | the option string | |
| valp | pointer to the value | |
| lenp | pointer to the length | |
| buflen | length of the buffer | |
| valdesc | short description for the value | |
| desc | descriptive string | |
| setp | optional pointer to indicate whether or not the option was set |
Definition at line 386 of file Options.cc.
| oasys::CharBufOpt::CharBufOpt | ( | char | shortopt, | |
| const char * | longopt, | |||
| char * | valp, | |||
| size_t * | lenp, | |||
| size_t | buflen, | |||
| 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 | |
| valp | pointer to the value | |
| lenp | pointer to the length | |
| buflen | length of the buffer | |
| valdesc | short description for the value | |
| desc | descriptive string | |
| setp | optional pointer to indicate whether or not the option was set |
Definition at line 393 of file Options.cc.
| int oasys::CharBufOpt::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 403 of file Options.cc.
References buflen_, lenp_, oasys::Opt::setp_, and oasys::Opt::valp_.
| void oasys::CharBufOpt::get | ( | StringBuffer * | buf | ) | [protected, virtual] |
Virtual callback to get a string version of the current value.
Implements oasys::Opt.
Definition at line 421 of file Options.cc.
References oasys::StringBuffer::appendf(), lenp_, and oasys::Opt::valp_.
size_t oasys::CharBufOpt::buflen_ [protected] |
size_t* oasys::CharBufOpt::lenp_ [protected] |
1.5.3