Toast Engine
Loading...
Searching...
No Matches
proto_event.hpp File Reference

FFI glue between native events and their protobuf. More...

#include "event.hpp"
#include "ffi/events.h"
#include "listener.hpp"
#include <cstdint>
#include <string>
#include <vector>
Include dependency graph for proto_event.hpp:

Go to the source code of this file.

Classes

struct  event::_detail::ProtoEntry
 Dispatch table for one protobuf-backed event type over the FFI. More...
struct  event::_detail::ProtoAutoRegister< T >

Macros

#define TOAST_PROTO_CAT_IMPL(a, b)
#define TOAST_PROTO_CAT(a, b)
#define TOAST_PROTO_EVENT(EventType)
 Place next to a ProtoTraits<EventType> specialization to expose it over the FFI.

Functions

void event::_detail::registerProtoEntry (std::string name, ProtoEntry entry)
 Inserts a ProtoEntry into the global proto registry under the protobuf message name.
template<ExposedEvent T>
void event::registerProtoEvent ()
auto event::_detail::protoRegistrars () -> std::vector< void(*)()> &
 Returns the global list of proto registration callbacks; each TOAST_PROTO_EVENT() macro appends one entry.

Detailed Description

FFI glue between native events and their protobuf.

Author
Xein
Date
15 Jun 2026

Macro Definition Documentation

◆ TOAST_PROTO_CAT

#define TOAST_PROTO_CAT ( a,
b )
Value:
TOAST_PROTO_CAT_IMPL(a, b)

◆ TOAST_PROTO_CAT_IMPL

#define TOAST_PROTO_CAT_IMPL ( a,
b )
Value:
a##b

◆ TOAST_PROTO_EVENT

#define TOAST_PROTO_EVENT ( EventType)
Value:
static const ::event::_detail::ProtoAutoRegister<EventType> TOAST_PROTO_CAT(_proto_auto_, __LINE__) { }

Place next to a ProtoTraits<EventType> specialization to expose it over the FFI.