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 147 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 ()
u_int32_t size () const

Private Attributes

char * buf_
u_int32_t size_
bool own_buf_


Constructor & Destructor Documentation

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

Definition at line 149 of file TypeShims.h.

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

Definition at line 152 of file TypeShims.h.

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

Definition at line 155 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 162 of file TypeShims.h.

References snprintf().

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 167 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 176 of file TypeShims.h.

References buf_.

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

Definition at line 177 of file TypeShims.h.

References buf_, and own_buf_.

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

Definition at line 178 of file TypeShims.h.

References size_.


Member Data Documentation

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

Definition at line 181 of file TypeShims.h.

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

u_int32_t oasys::ByteBufShim::size_ [private]

Definition at line 182 of file TypeShims.h.

Referenced by serialize(), and size().

bool oasys::ByteBufShim::own_buf_ [private]

Definition at line 183 of file TypeShims.h.

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


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