PPL Logo

compressedBuffer Class Reference
[Charm++ Trace Module]

A class that reads/writes a buffer out of different types of data. More...

#include <trace-utilization.h>

Collaboration diagram for compressedBuffer:

Collaboration graph
[legend]

Public Member Functions

 compressedBuffer ()
 compressedBuffer (int bytes)
 compressedBuffer (void *buffer)
void init (void *buffer)
void * currentPtr ()
template<typename T>
T read (int offset)
template<typename T>
void write (T v, int offset)
template<typename T>
void increment (int offset)
template<typename T>
void accumulate (T v, int offset)
template<typename T>
int push (T v)
template<typename T>
T pop ()
template<typename T>
T peek ()
template<typename T0, typename T>
T peekSecond ()
int datalength ()
void * buffer ()
void freeBuf ()
 ~compressedBuffer ()
 compressedBuffer ()
 compressedBuffer (int bytes)
 compressedBuffer (void *buffer)
void init (void *buffer)
void * currentPtr ()
template<typename T>
T read (int offset)
template<typename T>
void write (T v, int offset)
template<typename T>
void increment (int offset)
template<typename T>
void accumulate (T v, int offset)
template<typename T>
int push (T v)
template<typename T>
T pop ()
template<typename T>
T peek ()
template<typename T0, typename T>
T peekSecond ()
int datalength ()
void * buffer ()
void freeBuf ()
 ~compressedBuffer ()

Data Fields

char * buf
int pos
 < byte position just beyond the previously read/written data
char * buf

Detailed Description

A class that reads/writes a buffer out of different types of data.

This class exists because I need to get references to parts of the buffer that have already been used so that I can increment counters inside the buffer.

Definition at line 39 of file trace-summary.C.


Constructor & Destructor Documentation

compressedBuffer::compressedBuffer (  )  [inline]

Definition at line 86 of file trace-utilization.h.

References buf, and pos.

compressedBuffer::compressedBuffer ( int  bytes  )  [inline]

Definition at line 91 of file trace-utilization.h.

References buf, malloc(), and pos.

compressedBuffer::compressedBuffer ( void *  buffer  )  [inline]

Definition at line 96 of file trace-utilization.h.

References buf, and pos.

compressedBuffer::~compressedBuffer (  )  [inline]

Definition at line 181 of file trace-utilization.h.


Member Function Documentation

void compressedBuffer::init ( void *  buffer  )  [inline]

Definition at line 101 of file trace-utilization.h.

References buf, and pos.

void* compressedBuffer::currentPtr (  )  [inline]

Definition at line 106 of file trace-utilization.h.

References buf, and pos.

template<typename T>
T compressedBuffer::read ( int  offset  )  [inline]

Definition at line 111 of file trace-utilization.h.

References buf.

template<typename T>
void compressedBuffer::write ( T  v,
int  offset 
) [inline]

Definition at line 119 of file trace-utilization.h.

References buf.

template<typename T>
void compressedBuffer::increment ( int  offset  )  [inline]

Definition at line 126 of file trace-utilization.h.

template<typename T>
void compressedBuffer::accumulate ( T  v,
int  offset 
) [inline]

Definition at line 134 of file trace-utilization.h.

template<typename T>
int compressedBuffer::push ( T  v  )  [inline]

Definition at line 142 of file trace-utilization.h.

References pos.

template<typename T>
T compressedBuffer::pop (  )  [inline]

Definition at line 150 of file trace-utilization.h.

References pos.

template<typename T>
T compressedBuffer::peek (  )  [inline]

Definition at line 157 of file trace-utilization.h.

References pos.

template<typename T0, typename T>
T compressedBuffer::peekSecond (  )  [inline]

Definition at line 163 of file trace-utilization.h.

References buf, and pos.

int compressedBuffer::datalength (  )  [inline]

Definition at line 169 of file trace-utilization.h.

References pos.

void* compressedBuffer::buffer (  )  [inline]

Definition at line 173 of file trace-utilization.h.

References buf.

void compressedBuffer::freeBuf (  )  [inline]

Definition at line 177 of file trace-utilization.h.

References buf, and free().


Field Documentation

Definition at line 41 of file trace-summary.C.

Referenced by buffer(), compressedBuffer(), currentPtr(), freeBuf(), init(), peekSecond(), read(), and write().

Definition at line 83 of file trace-utilization.h.


The documentation for this class was generated from the following files:

Generated on Fri May 25 08:02:47 2012 for Charm++ by  doxygen 1.5.5