oasys::CharBufOpt Class Reference

#include <Options.h>

Inheritance diagram for oasys::CharBufOpt:

oasys::Opt List of all members.

Detailed Description

Char buffer option class.

Definition at line 355 of file Options.h.

Public Member Functions

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

Protected Attributes

size_t buflen_
size_t * lenp_


Constructor & Destructor Documentation

oasys::CharBufOpt::CharBufOpt ( const char *  opt,
char *  valp,
size_t *  lenp,
size_t  buflen,
const char *  valdesc = "",
const char *  desc = "",
bool setp = NULL 
)

Basic constructor.

Parameters:
opt the option string
valp pointer to the value
lenp pointer to the length
buflen length of the buffer
valdesc short description for the value
desc descriptive string
setp optional pointer to indicate whether or not the option was set

Definition at line 316 of file Options.cc.

oasys::CharBufOpt::CharBufOpt ( char  shortopt,
const char *  longopt,
char *  valp,
size_t *  lenp,
size_t  buflen,
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
lenp pointer to the length
buflen length of the buffer
valdesc short description for the value
desc descriptive string
setp optional pointer to indicate whether or not the option was set

Definition at line 323 of file Options.cc.


Member Function Documentation

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

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


Member Data Documentation

size_t oasys::CharBufOpt::buflen_ [protected]

Definition at line 393 of file Options.h.

Referenced by set().

size_t* oasys::CharBufOpt::lenp_ [protected]

Definition at line 394 of file Options.h.

Referenced by set().


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