OpenM++ runtime library (libopenm)
openm::IPackedAdapter Struct Referenceabstract

public interface to pack and unpack rows of metadata db-table More...

#include <msg.h>

Inheritance diagram for openm::IPackedAdapter:

Public Member Functions

virtual MsgTag tag (void) const noexcept=0
 return message tag More...
 
virtual const vector< uint8_t > pack (const IRowBaseVec &i_rowVec) const =0
 pack vector of db rows into byte vector. More...
 
virtual void unpackTo (int i_packSize, void *i_packedData, IRowBaseVec &io_rowVec) const =0
 unpack from byte[] into vector of rows. More...
 

Static Public Member Functions

static IPackedAdaptercreate (MsgTag i_msgTag)
 pack adapter factory: create new adapter for metadata table db rows. More...
 
static size_t packedSize (const type_info &i_type, size_t i_size)
 return byte size to pack source array. More...
 
static unique_ptr< uint8_t[]> packArray (const type_info &i_type, size_t i_size, void *i_valueArr)
 return new allocated and packed copy of source array. More...
 

Detailed Description

public interface to pack and unpack rows of metadata db-table

Member Function Documentation

◆ create()

IPackedAdapter * IPackedAdapter::create ( MsgTag  i_msgTag)
static

pack adapter factory: create new adapter for metadata table db rows.

Parameters
[in]i_msgTagtag to identify message content (parameter or output data)

◆ pack()

virtual const vector< uint8_t > openm::IPackedAdapter::pack ( const IRowBaseVec i_rowVec) const
pure virtual

pack vector of db rows into byte vector.

Parameters
[in]i_rowVecvector of db rows to pack

Implemented in openm::EmptyPackedAdapter, and openm::MetaMpiPackedAdapter< rowMsgTag, TRow >.

◆ packArray()

unique_ptr< uint8_t[]> IPackedAdapter::packArray ( const type_info &  i_type,
size_t  i_size,
void *  i_valueArr 
)
static

return new allocated and packed copy of source array.

return pack'ed copy of source array: return always empty.

◆ packedSize()

size_t IPackedAdapter::packedSize ( const type_info &  i_type,
size_t  i_size 
)
static

return byte size to pack source array.

return byte size to pack source array: return always zero

◆ tag()

virtual MsgTag openm::IPackedAdapter::tag ( void  ) const
pure virtualnoexcept

◆ unpackTo()

virtual void openm::IPackedAdapter::unpackTo ( int  i_packSize,
void *  i_packedData,
IRowBaseVec io_rowVec 
) const
pure virtual

unpack from byte[] into vector of rows.

Parameters
[in]i_packSizesize of array to unpack
[in]i_packedDatabyte array to unpack
[in,out]io_rowVecvector to push back received db rows

Implemented in openm::MetaMpiPackedAdapter< rowMsgTag, TRow >, and openm::EmptyPackedAdapter.


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