OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Member Functions | Private Attributes | List of all members
MsgBuffer Class Reference

#include <MsgBuffer.h>

Collaboration diagram for MsgBuffer:
Collaboration graph
[legend]

Public Member Functions

 MsgBuffer (Format *f, int count, int offset=0)
 
 MsgBuffer (Format *f, char *d, int size)
 
bool add (Message *)
 
Messageget ()
 
template<class T >
void get (T &v)
 
template<class T >
void put (T &v)
 
int getSize ()
 
void * getBuffer ()
 
FormatgetFormat ()
 
 ~MsgBuffer ()
 

Private Attributes

Formatformat
 
unsigned int datasize
 
unsigned int writepos
 
unsigned int readpos
 
std::vector< char > data
 

Detailed Description

Definition at line 29 of file MsgBuffer.h.

Constructor & Destructor Documentation

◆ MsgBuffer() [1/2]

MsgBuffer::MsgBuffer ( Format f,
int  count,
int  offset = 0 
)

Definition at line 23 of file MsgBuffer.cpp.

References data, datasize, format, and Format::getSize().

Here is the call graph for this function:

◆ MsgBuffer() [2/2]

MsgBuffer::MsgBuffer ( Format f,
char *  d,
int  size 
)

Definition at line 31 of file MsgBuffer.cpp.

References data, and datasize.

◆ ~MsgBuffer()

MsgBuffer::~MsgBuffer ( )

Definition at line 40 of file MsgBuffer.cpp.

Member Function Documentation

◆ add()

bool MsgBuffer::add ( Message msg)

◆ get() [1/2]

Message * MsgBuffer::get ( )

◆ get() [2/2]

template<class T >
void MsgBuffer::get ( T &  v)
inline

Definition at line 39 of file MsgBuffer.h.

References data, readpos, and Attrib::Legacy::Distribution::T.

◆ getBuffer()

void * MsgBuffer::getBuffer ( )
inline

◆ getFormat()

Format * MsgBuffer::getFormat ( )
inline

Definition at line 59 of file MsgBuffer.h.

References format.

◆ getSize()

int MsgBuffer::getSize ( )
inline

◆ put()

template<class T >
void MsgBuffer::put ( T &  v)
inline

Definition at line 45 of file MsgBuffer.h.

References data, Attrib::Legacy::Distribution::T, and writepos.

Member Data Documentation

◆ data

std::vector<char> MsgBuffer::data
private

Definition at line 68 of file MsgBuffer.h.

Referenced by add(), get(), getBuffer(), MsgBuffer(), and put().

◆ datasize

unsigned int MsgBuffer::datasize
private

Definition at line 67 of file MsgBuffer.h.

Referenced by add(), get(), and MsgBuffer().

◆ format

Format* MsgBuffer::format
private

Definition at line 66 of file MsgBuffer.h.

Referenced by add(), get(), getFormat(), and MsgBuffer().

◆ readpos

unsigned int MsgBuffer::readpos
private

Definition at line 67 of file MsgBuffer.h.

Referenced by get().

◆ writepos

unsigned int MsgBuffer::writepos
private

Definition at line 67 of file MsgBuffer.h.

Referenced by add(), getSize(), and put().


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