oasys::ByteBufShim Class Reference

#include <TypeShims.h>

Inheritance diagram for oasys::ByteBufShim:

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

Detailed Description

Definition at line 169 of file TypeShims.h.

Public Member Functions

 ByteBufShim (char *buf, size_t size)
 ByteBufShim (const Builder &)
 ~ByteBufShim ()
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
char * take_buf ()
size_t size () const

Private Attributes

char * buf_
size_t size_
bool own_buf_


Constructor & Destructor Documentation

oasys::ByteBufShim::ByteBufShim ( char *  buf,
size_t  size 
) [inline]

Definition at line 171 of file TypeShims.h.

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

Definition at line 174 of file TypeShims.h.

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

Definition at line 177 of file TypeShims.h.

References buf_, and own_buf_.


Member Function Documentation

int oasys::ByteBufShim::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 184 of file TypeShims.h.

void oasys::ByteBufShim::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 189 of file TypeShims.h.

References oasys::SerializeAction::action_code(), oasys::Serialize::ALLOC_MEM, buf_, own_buf_, oasys::SerializeAction::process(), size_, and oasys::Serialize::UNMARSHAL.

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

Definition at line 199 of file TypeShims.h.

References buf_.

char* oasys::ByteBufShim::take_buf (  )  [inline]

Definition at line 200 of file TypeShims.h.

References buf_, and own_buf_.

size_t oasys::ByteBufShim::size (  )  const [inline]

Definition at line 201 of file TypeShims.h.

References size_.


Member Data Documentation

char* oasys::ByteBufShim::buf_ [private]

Definition at line 204 of file TypeShims.h.

Referenced by serialize(), take_buf(), value(), and ~ByteBufShim().

size_t oasys::ByteBufShim::size_ [private]

Definition at line 205 of file TypeShims.h.

Referenced by serialize(), and size().

bool oasys::ByteBufShim::own_buf_ [private]

Definition at line 206 of file TypeShims.h.

Referenced by serialize(), take_buf(), and ~ByteBufShim().


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