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

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

Inheritance diagram for openm::IPackedAdapter:

Public Member Functions

virtual MsgTag tag (void) const noexcept=0
 return message tag
 
virtual const vector< char > pack (const IRowBaseVec &i_rowVec) const =0
 pack vector of db rows into char vector. More...
 
virtual void unpackTo (int i_packSize, void *i_packedData, IRowBaseVec &io_rowVec) const =0
 unpack from char[] 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< char > 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<char> openm::IPackedAdapter::pack ( const IRowBaseVec i_rowVec) const
pure virtual

pack vector of db rows into char vector.

Parameters
[in]i_rowVecvector of db rows to pack

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

◆ packArray()

unique_ptr< char > 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: reurn always zero

◆ unpackTo()

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

unpack from char[] into vector of rows.

Parameters
[in]i_packSizesize of array to unpack
[in]i_packedDatachar 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: