dtn::APIEndpointIDOpt Class Reference

#include <APIEndpointIDOpt.h>

Inheritance diagram for dtn::APIEndpointIDOpt:

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 (i.e.

a URI).

Definition at line 53 of file APIEndpointIDOpt.h.

Public Member Functions

 APIEndpointIDOpt (const char *opt, dtn_endpoint_id_t *valp, const char *valdesc="", const char *desc="", bool *setp=NULL)
 Basic constructor.
 APIEndpointIDOpt (char shortopt, const char *longopt, dtn_endpoint_id_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.


Constructor & Destructor Documentation

dtn::APIEndpointIDOpt::APIEndpointIDOpt ( const char *  opt,
dtn_endpoint_id_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 44 of file APIEndpointIDOpt.cc.

dtn::APIEndpointIDOpt::APIEndpointIDOpt ( char  shortopt,
const char *  longopt,
dtn_endpoint_id_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 51 of file APIEndpointIDOpt.cc.


Member Function Documentation

int dtn::APIEndpointIDOpt::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 60 of file APIEndpointIDOpt.cc.

References DTN_MAX_ENDPOINT_ID, dtn_parse_eid_string(), oasys::Opt::setp_, and oasys::Opt::valp_.


The documentation for this class was generated from the following files:
Generated on Fri Dec 22 14:48:03 2006 for DTN Reference Implementation by  doxygen 1.5.1