hmbdc
simplify-high-performance-messaging-programming
Classes | Public Member Functions | Public Attributes | List of all members
hmbdc::tips::hasSharedPtrAttachment< Message, T > Struct Template Reference

internal use More...

#include <Messages.hpp>

Classes

struct  hmbdcSerialized
 internal use More...
 

Public Member Functions

 hasSharedPtrAttachment ()
 the length of the POD data More...
 
 hasSharedPtrAttachment (SP attachmentIn, size_t len=sizeof(T))
 Construct a new has Shared Ptr Attachment object. More...
 
auto toHmbdcSerialized () const
 internal use
 

Public Attributes

size_t len = 0
 the attachment
 

Detailed Description

template<MessageC Message, typename T>
struct hmbdc::tips::hasSharedPtrAttachment< Message, T >

internal use

Message that need to be IPCed and/or go through Network can derived from this type if it holds 1 (and only 1) shared ptr to an already serilized POD type

use this instead of app::hasMemoryAttachment directly to avoid the complication of releasing the attachment

Template Parameters
Mesasgethe concrete Message type thatderived from this tmeplate
Tthe underlying POD data type

Constructor & Destructor Documentation

◆ hasSharedPtrAttachment() [1/2]

template<MessageC Message, typename T>
hmbdc::tips::hasSharedPtrAttachment< Message, T >::hasSharedPtrAttachment ( )
inline

the length of the POD data

empty ctor

◆ hasSharedPtrAttachment() [2/2]

template<MessageC Message, typename T>
hmbdc::tips::hasSharedPtrAttachment< Message, T >::hasSharedPtrAttachment ( SP  attachmentIn,
size_t  len = sizeof(T) 
)
inline

Construct a new has Shared Ptr Attachment object.

Parameters
attachmentIninput shared_ptr
lenbyte size of the attachment

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