#include <Options.h>
Inheritance diagram for oasys::Opt:
These can be used either with the Getopt class for parsing argv-style declarations or with the OptParser class for parsing argument strings or arrays of strings.
Definition at line 53 of file Options.h.
Public Member Functions | |
virtual | ~Opt () |
Protected Member Functions | |
Opt (char shortopt, const char *longopt, void *valp, bool *setp, bool needval, const char *valdesc, const char *desc) | |
Private constructor. | |
virtual int | set (const char *val, size_t len)=0 |
Virtual callback to set the option to the given string value. | |
Protected Attributes | |
char | shortopt_ |
const char * | longopt_ |
void * | valp_ |
bool * | setp_ |
bool | needval_ |
const char * | valdesc_ |
const char * | desc_ |
Opt * | next_ |
Friends | |
class | Getopt |
class | OptParser |
oasys::Opt::~Opt | ( | ) | [virtual] |
Definition at line 71 of file Options.cc.
virtual int oasys::Opt::set | ( | const char * | val, | |
size_t | len | |||
) | [protected, pure virtual] |
Virtual callback to set the option to the given string value.
Implemented in dtn::APIEndpointIDOpt, oasys::BoolOpt, oasys::IntOpt, oasys::UIntOpt, oasys::UInt16Opt, oasys::UInt8Opt, oasys::DoubleOpt, oasys::StringOpt, oasys::CharBufOpt, oasys::InAddrOpt, oasys::EnumOpt, oasys::BdAddrOpt, and dtn::EndpointIDOpt.
Referenced by oasys::OptParser::parse_opt().
char oasys::Opt::shortopt_ [protected] |
Definition at line 73 of file Options.h.
Referenced by oasys::Getopt::addopt(), and oasys::Getopt::getopt().
const char* oasys::Opt::longopt_ [protected] |
void* oasys::Opt::valp_ [protected] |
Definition at line 75 of file Options.h.
Referenced by oasys::BdAddrOpt::set(), oasys::EnumOpt::set(), oasys::InAddrOpt::set(), oasys::CharBufOpt::set(), oasys::StringOpt::set(), oasys::DoubleOpt::set(), oasys::UInt8Opt::set(), oasys::UInt16Opt::set(), oasys::UIntOpt::set(), oasys::IntOpt::set(), oasys::BoolOpt::set(), dtn::EndpointIDOpt::set(), and dtn::APIEndpointIDOpt::set().
bool* oasys::Opt::setp_ [protected] |
Definition at line 76 of file Options.h.
Referenced by oasys::BdAddrOpt::set(), oasys::EnumOpt::set(), oasys::InAddrOpt::set(), oasys::CharBufOpt::set(), oasys::StringOpt::set(), oasys::DoubleOpt::set(), oasys::UInt8Opt::set(), oasys::UInt16Opt::set(), oasys::UIntOpt::set(), oasys::IntOpt::set(), oasys::BoolOpt::set(), dtn::EndpointIDOpt::set(), and dtn::APIEndpointIDOpt::set().
bool oasys::Opt::needval_ [protected] |
Definition at line 77 of file Options.h.
Referenced by oasys::Getopt::getopt(), and oasys::OptParser::parse_opt().
const char* oasys::Opt::valdesc_ [protected] |
const char* oasys::Opt::desc_ [protected] |
Opt* oasys::Opt::next_ [protected] |