#include <KokoBuffer.h>
Public Member Functions | |
KokoBuffer (void) | |
KokoBuffer (unsigned int size) | |
KokoBuffer (unsigned char *buf, unsigned int size, bool pad=false) | |
KokoBuffer (const KokoBuffer &kbuf) | |
~KokoBuffer (void) | |
unsigned char * | GetData (void) |
unsigned char * | GetBuffer (void) |
operator unsigned char * (void) | |
operator void * (void) | |
bool | SetCurSize (unsigned int csize) |
void | Memcopy (unsigned char *bufp, unsigned int size) |
================================================================ Copy the given buffer into the KokoBuffer. | |
void | Pack (void) |
================================================================ Pack the given data to end of the current buffer. | |
bool | Pack (unsigned char *bufp, unsigned int size) |
void | Unpack (void) |
================================================================ Unpack/extract chunks of data from the buffer. | |
bool | Unpack (unsigned char *dest, unsigned int size) |
unsigned int | Size (void) |
================================================================ What size is the buffer (available and total). | |
unsigned int | TotalSize (void) |
void | Resize (unsigned int size) |
bool | Locked (void) |
================================================================= Simple buffer locking -- not thread safe... | |
void | Lock (void) |
void | Unlock (void) |
void | SetTag (KokoTag &tag) |
================================================================= Tag handling routines. | |
KokoTag | GetTag (void) |
Protected Member Functions | |
unsigned int | bytes_free (void) |
================================================================= How many bytes free to have to work with in this buffer? | |
unsigned int | bytes_remain (unsigned char *ucp) |
void | grow (unsigned int new_size) |
================================================================= Grow the buffer to accomodate the given new size. |
|
Definition at line 42 of file KokoBuffer.cpp. References KOKOBUF_GROWTH_FACTOR. |
|
Definition at line 59 of file KokoBuffer.cpp. References KOKOBUF_GROWTH_FACTOR, KokoTag, and size. |
|
Definition at line 76 of file KokoBuffer.cpp. References KOKOBUF_GROWTH_FACTOR, KokoTag, and size. |
|
Definition at line 98 of file KokoBuffer.cpp. References _aptr, _buf, _cursize, _eptr, _growfact, _size, and KokoTag. |
|
Definition at line 35 of file KokoBuffer.h. |
|
================================================================= How many bytes free to have to work with in this buffer?
Definition at line 136 of file KokoBuffer.h. Referenced by Pack(). |
|
Definition at line 139 of file KokoBuffer.h. |
|
Definition at line 47 of file KokoBuffer.h. Referenced by MPICommunicator::Broadcast(). |
|
Definition at line 44 of file KokoBuffer.h. |
|
Definition at line 242 of file KokoBuffer.cpp. References KOKO_ANY_TAG, and KokoTag. Referenced by MPICommunicator::Broadcast(). |
|
================================================================= Grow the buffer to accomodate the given new size. This keeps the current buffer data. Definition at line 261 of file KokoBuffer.cpp. |
|
Definition at line 114 of file KokoBuffer.h. Referenced by MPICommunicator::ARecv(), and MPICommunicator::ASend(). |
|
================================================================= Simple buffer locking -- not thread safe... Warning! For the most part the Lock() and Unlock methods are intended to be used by code that knows the buffer is not safe for use yet (in this case the Comminicator class in the Koko Library). Be extremely careful with these two routines if you are not implementing a feature inside a communicator. Definition at line 111 of file KokoBuffer.h. Referenced by MPICommunicator::ARecv(), MPICommunicator::ASend(), MPICommunicator::Broadcast(), MPICommunicator::Recv(), MPICommunicator::Send(), and MPICommunicator::SendRecv(). |
|
================================================================ Copy the given buffer into the KokoBuffer. This completely replaces any data in the buffer. Definition at line 118 of file KokoBuffer.cpp. |
|
Definition at line 50 of file KokoBuffer.h. |
|
Definition at line 53 of file KokoBuffer.h. |
|
Definition at line 150 of file KokoBuffer.cpp. References bytes_free(), grow(), and size. |
|
================================================================ Pack the given data to end of the current buffer. If you want to force the packing operation to start at the begining of the buffer call Pack() with no arguments. Definition at line 76 of file KokoBuffer.h. |
|
Definition at line 101 of file KokoBuffer.h. Referenced by Messenger::ResizeBuffer(). |
|
Definition at line 56 of file KokoBuffer.h. References KokoTag. Referenced by MPICommunicator::Broadcast(), and MPICommunicator::Recv(). |
|
================================================================= Tag handling routines. This routines are here as one possible work-around of some message passing libraries not formally supporting tagged messages. Definition at line 229 of file KokoBuffer.cpp. References KokoTag. Referenced by MPICommunicator::Broadcast(). |
|
================================================================ What size is the buffer (available and total).
Definition at line 95 of file KokoBuffer.h. Referenced by MPICommunicator::ARecv(), MPICommunicator::ASend(), MPICommunicator::Send(), and MPICommunicator::SendRecv(). |
|
Definition at line 98 of file KokoBuffer.h. References KokoTag. Referenced by MPICommunicator::Broadcast(), Messenger::BufferSize(), and MPICommunicator::Recv(). |
|
Definition at line 119 of file KokoBuffer.h. |
|
Definition at line 178 of file KokoBuffer.cpp. References size. |
|
================================================================ Unpack/extract chunks of data from the buffer. If you want to force the packing operations to start at the begining of the buffer call Unpack() with no arguments. Definition at line 88 of file KokoBuffer.h. |