17#ifndef IOX_POSH_POPO_EVENT_CALLBACK_HPP
18#define IOX_POSH_POPO_EVENT_CALLBACK_HPP
20#include "iceoryx_hoofs/cxx/attributes.hpp"
26template <
typename OriginType,
typename ContextDataType>
35using GenericCallbackPtr_t = void (*)();
36using GenericCallbackRef_t = void (&)();
38using TranslationCallbackRef_t = void (&)(
void*
const,
void*
const, GenericCallbackPtr_t
const);
39using TranslationCallbackPtr_t = void (*)(
void*
const,
void*
const, GenericCallbackPtr_t
const);
41template <
typename T,
typename ContextDataType>
42struct TranslateAndCallTypelessCallback
44 static void call(
void*
const origin,
void*
const userType, GenericCallbackPtr_t underlyingCallback)
noexcept;
48struct TranslateAndCallTypelessCallback<T, NoType_t>
50 static void call(
void*
const origin,
void*
const userType, GenericCallbackPtr_t underlyingCallback)
noexcept;
56template <
typename OriginType,
typename ContextDataType>
59 using Ref_t = void (&)(OriginType*
const, ContextDataType*
const);
60 using Ptr_t = void (*)(OriginType*
const, ContextDataType*
const);
62 Ptr_t m_callback =
nullptr;
63 ContextDataType* m_contextData =
nullptr;
67template <
typename OriginType>
70 using Ref_t = void (&)(OriginType*
const);
71 using Ptr_t = void (*)(OriginType*
const);
73 Ptr_t m_callback =
nullptr;
74 internal::NoType_t* m_contextData =
nullptr;
80template <
typename OriginType,
typename ContextDataType =
internal::NoType_t>
81NotificationCallback<OriginType, ContextDataType>
82createNotificationCallback(
void (&callback)(OriginType*
const))
noexcept;
88template <
typename OriginType,
typename ContextDataType>
89NotificationCallback<OriginType, ContextDataType> createNotificationCallback(
void (&callback)(OriginType*
const,
90 ContextDataType*
const),
91 ContextDataType& userValue)
noexcept;
96#include "iceoryx_posh/internal/popo/notification_callback.inl"
Definition: notification_callback.hpp:27
the struct describes a callback with a user defined type which can be attached to a WaitSet or a List...
Definition: notification_callback.hpp:58