oasys::BdAddrOpt Class Reference

#include <Options.h>

Inheritance diagram for oasys::BdAddrOpt:

oasys::Opt List of all members.

Detailed Description

Bluetooth address (colon-separated hex) option class.

Definition at line 531 of file Options.h.

Public Member Functions

 BdAddrOpt (const char *opt, bdaddr_t *valp, const char *valdesc="", const char *desc="", bool *setp=NULL)
 Basic constructor.
 BdAddrOpt (char shortopt, const char *longopt, bdaddr_t *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.
void get (StringBuffer *buf)
 Virtual callback to get a string version of the current value.


Constructor & Destructor Documentation

oasys::BdAddrOpt::BdAddrOpt ( const char *  opt,
bdaddr_t *  valp,
const char *  valdesc = "",
const char *  desc = "",
bool setp = NULL 
)

Basic constructor.

Parameters:
opt the option string
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 526 of file Options.cc.

oasys::BdAddrOpt::BdAddrOpt ( char  shortopt,
const char *  longopt,
bdaddr_t *  valp,
const char *  valdesc = "",
const char *  desc = "",
bool setp = NULL 
)

Alternative constructor with both short and long options, suitable for getopt calls.

Parameters:
shortopt short option character
longopt long option string
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 533 of file Options.cc.


Member Function Documentation

int oasys::BdAddrOpt::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 541 of file Options.cc.

References oasys::Opt::setp_, oasys::Bluetooth::strtoba(), and oasys::Opt::valp_.

void oasys::BdAddrOpt::get ( StringBuffer buf  )  [protected, virtual]

Virtual callback to get a string version of the current value.

Implements oasys::Opt.

Definition at line 561 of file Options.cc.

References oasys::StringBuffer::appendf(), bd2str, and oasys::Opt::valp_.


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 16:57:03 2007 for DTN Reference Implementation by  doxygen 1.5.1