OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
MsgBuffer Class Reference

#include <MsgBuffer.h>

Collaboration diagram for MsgBuffer:

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, readpos, and writepos.

◆ MsgBuffer() [2/2]

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

Definition at line 31 of file MsgBuffer.cpp.

References data, datasize, format, readpos, and writepos.

◆ ~MsgBuffer()

MsgBuffer::~MsgBuffer ( )

Definition at line 40 of file MsgBuffer.cpp.

Member Function Documentation

◆ add()

bool MsgBuffer::add ( Message * msg)

Definition at line 44 of file MsgBuffer.cpp.

References Message::MsgItem::data(), data, datasize, format, Message::item(), Message::MsgItem::numBytes(), Message::MsgItem::numElems(), Message::size(), and writepos.

Referenced by BoxLibLayout< T, Dim >::update().

Here is the call graph for this function:

◆ get() [1/2]

Message * MsgBuffer::get ( )

Definition at line 71 of file MsgBuffer.cpp.

References data, datasize, format, Message::putmsg(), readpos, Message::setCopy(), and Message::setDelete().

Referenced by IpplParticleBase< T >::ghostDestroy(), IpplParticleBase< T >::ghostPutMessage(), ParticlePos_t< double, 3 >::new_swap_particles(), ParticlePos_t< double, 3 >::new_swap_particles(), IpplParticleBase< PLayout >::readMsgBuffer(), and BoxLibLayout< T, Dim >::update().

Here is the call graph for this function:

◆ get() [2/2]

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

Definition at line 39 of file MsgBuffer.h.

References data, and readpos.

◆ 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, and writepos.

Member Data Documentation

◆ data

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

Definition at line 68 of file MsgBuffer.h.

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

◆ datasize

unsigned int MsgBuffer::datasize
private

Definition at line 67 of file MsgBuffer.h.

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

◆ format

Format* MsgBuffer::format
private

Definition at line 66 of file MsgBuffer.h.

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

◆ readpos

unsigned int MsgBuffer::readpos
private

Definition at line 67 of file MsgBuffer.h.

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

◆ writepos

unsigned int MsgBuffer::writepos
private

Definition at line 67 of file MsgBuffer.h.

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


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