oasys::NullStringShim Class Reference

#include <TypeShims.h>

Inheritance diagram for oasys::NullStringShim:

oasys::Formatter oasys::SerializableObject List of all members.

Detailed Description

Definition at line 110 of file TypeShims.h.

Public Member Functions

 NullStringShim (const char *str, const char *name="string")
 NullStringShim (const Builder &)
 ~NullStringShim ()
int format (char *buf, size_t sz) const
 Virtual callback, called from this vsnprintf implementation whenever it encounters a format string of the form "*%p".
void serialize (SerializeAction *a)
 This should call v->process() on each of the types that are to be serialized in the object.
const char * value () const

Private Attributes

std::string name_
char * str_
bool free_mem_


Constructor & Destructor Documentation

oasys::NullStringShim::NullStringShim ( const char *  str,
const char *  name = "string" 
) [inline]

Definition at line 112 of file TypeShims.h.

References free_mem_.

oasys::NullStringShim::NullStringShim ( const Builder  )  [inline]

Definition at line 118 of file TypeShims.h.

oasys::NullStringShim::~NullStringShim (  )  [inline]

Definition at line 122 of file TypeShims.h.

References free_mem_, and str_.


Member Function Documentation

int oasys::NullStringShim::format ( char *  buf,
size_t  sz 
) const [inline, virtual]

Virtual callback, called from this vsnprintf implementation whenever it encounters a format string of the form "*%p".

The output routine must not write more than sz bytes and is not null terminated.

Returns:
The number of bytes written, or the number of bytes that would have been written if the output is truncated.
XXX/bowei -- this contract is fairly annoying to implement.

Implements oasys::Formatter.

Definition at line 125 of file TypeShims.h.

References snprintf(), and str_.

void oasys::NullStringShim::serialize ( SerializeAction a  )  [inline, virtual]

This should call v->process() on each of the types that are to be serialized in the object.

Implements oasys::SerializableObject.

Definition at line 130 of file TypeShims.h.

References oasys::Serialize::ALLOC_MEM, free_mem_, name_, oasys::Serialize::NULL_TERMINATED, oasys::SerializeAction::process(), and str_.

const char* oasys::NullStringShim::value (  )  const [inline]

Definition at line 138 of file TypeShims.h.

References str_.


Member Data Documentation

std::string oasys::NullStringShim::name_ [private]

Definition at line 141 of file TypeShims.h.

Referenced by serialize().

char* oasys::NullStringShim::str_ [private]

Definition at line 142 of file TypeShims.h.

Referenced by format(), serialize(), value(), and ~NullStringShim().

bool oasys::NullStringShim::free_mem_ [private]

Definition at line 143 of file TypeShims.h.

Referenced by NullStringShim(), serialize(), and ~NullStringShim().


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