dtn::EndpointIDOpt Class Reference

#include <EndpointIDOpt.h>

Inheritance diagram for dtn::EndpointIDOpt:

oasys::Opt

List of all members.


Detailed Description

Extension class to the oasys Opt hierarchy that validates that the option is a DTN endpoint identifier.

Definition at line 30 of file EndpointIDOpt.h.


Public Member Functions

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

Constructor & Destructor Documentation

dtn::EndpointIDOpt::EndpointIDOpt ( const char *  opt,
EndpointID 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 23 of file EndpointIDOpt.cc.

dtn::EndpointIDOpt::EndpointIDOpt ( char  shortopt,
const char *  longopt,
EndpointID 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 29 of file EndpointIDOpt.cc.


Member Function Documentation

int dtn::EndpointIDOpt::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 37 of file EndpointIDOpt.cc.

References oasys::Opt::setp_, and oasys::Opt::valp_.

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

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

Implements oasys::Opt.

Definition at line 52 of file EndpointIDOpt.cc.

References oasys::StringBuffer::append(), and oasys::Opt::valp_.


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 08:36:22 2007 for DTN Reference Implementation by  doxygen 1.5.3