messagingBase

struct messagePointerData
#include <messagingBase.h>

Holds type-erased pointers to a message’s header and payload.

Public Members

void *header = nullptr

pointer to the message header

void *payload = nullptr

pointer to the message payload

class MessageBase
#include <messagingBase.h>

A base class for Message that enables type-erased pointer access.

Subclassed by Message< messageType >

Public Functions

inline messagePointerData *GetPointers(void)

Return a borrowed view of the type-erased message header and payload pointers.

The returned messagePointerData structure is owned by this object and remains valid only while the associated Message exists. Its header and payload addresses are non-owning and remain valid only for the lifetime of that message.

Protected Functions

inline void setPointerData(void *headerPointer, void *payloadPointer)

Update the stored pointers and any previously returned borrowed view.

Protected Attributes

messagePointerData pointers = {}

stores the message’s header/payload pointers

messagePointerData reference = {}

cached storage for the borrowed pointer view

class ReadFunctorBase
#include <messagingBase.h>

A base class for ReadFunctor that enables type-erased pointer access.

Subclassed by ReadFunctor< messageType >

Public Functions

ReadFunctorBase() = default

constructor

inline messagePointerData *GetPointers(void)

Return a borrowed view of the type-erased source header and payload pointers.

The returned messagePointerData structure is owned by this object and remains valid only while the associated ReadFunctor exists. Its non-null header and payload addresses are non-owning and remain valid only while the reader is subscribed and the source message exists.

Protected Functions

inline void setPointerData(void *headerPointer, void *payloadPointer)

Update the stored pointers and any previously returned borrowed view.

inline void clearPointerData()

Clear the stored pointers and any previously returned borrowed view.

Protected Attributes

void *headerVoidPtr = nullptr

type-erased header pointer for external interface access

void *payloadVoidPtr = nullptr

type-erased payload pointer for external interface access

messagePointerData reference = {}

cached storage for the borrowed pointer view