#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 38 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. | |
virtual void | get (StringBuffer *buf)=0 |
Virtual callback to get a string version of the current value. | |
Protected Attributes | |
char | shortopt_ |
const char * | longopt_ |
void * | valp_ |
bool * | setp_ |
bool | needval_ |
const char * | valdesc_ |
const char * | desc_ |
Friends | |
class | Getopt |
class | OptParser |
class | TclCommand |
oasys::Opt::~Opt | ( | ) | [virtual] |
Definition at line 49 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::UInt64Opt, 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().
virtual void oasys::Opt::get | ( | StringBuffer * | buf | ) | [protected, pure virtual] |
Virtual callback to get a string version of the current value.
Implemented in dtn::APIEndpointIDOpt, oasys::BoolOpt, oasys::IntOpt, oasys::UIntOpt, oasys::UInt64Opt, oasys::UInt16Opt, oasys::UInt8Opt, oasys::DoubleOpt, oasys::StringOpt, oasys::CharBufOpt, oasys::InAddrOpt, oasys::EnumOpt, oasys::BdAddrOpt, and dtn::EndpointIDOpt.
friend class TclCommand [friend] |
char oasys::Opt::shortopt_ [protected] |
Definition at line 64 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 66 of file Options.h.
Referenced by oasys::BdAddrOpt::get(), oasys::EnumOpt::get(), oasys::InAddrOpt::get(), oasys::CharBufOpt::get(), oasys::StringOpt::get(), oasys::DoubleOpt::get(), oasys::UInt8Opt::get(), oasys::UInt16Opt::get(), oasys::UInt64Opt::get(), oasys::UIntOpt::get(), oasys::IntOpt::get(), oasys::BoolOpt::get(), dtn::EndpointIDOpt::get(), dtn::APIEndpointIDOpt::get(), 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::UInt64Opt::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 67 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::UInt64Opt::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 68 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] |