CommRaT 2.0.0
C++20 Real-Time Messaging Framework
Loading...
Searching...
No Matches
typed_mailbox.hpp File Reference

Type-restricted mailbox with optimized buffer sizing (Phase 7) More...

#include "mailbox.hpp"
#include "../messaging/message_registry.hpp"
#include <type_traits>

Go to the source code of this file.

Classes

class  commrat::TypedMailbox< Registry, AllowedPayloadTypes >
 Type-restricted mailbox with optimized buffer sizing. More...
 
struct  commrat::ReceiveTypes< Ts >
 Tag type to mark send-only types in template parameter. More...
 
struct  commrat::SendOnlyTypes< Ts >
 
class  commrat::TypedMailbox< Registry, SendOnlyTypes< SendOnlyTypesInner... > >
 TypedMailbox with only send types (no receive) More...
 
class  commrat::TypedMailbox< Registry, ReceiveTypes< ReceiveTypesInner... >, SendOnlyTypes< SendOnlyTypesInner... > >
 TypedMailbox with separate send-only types. More...
 

Namespaces

namespace  commrat
 CommRaT - Modern C++ Real-Time Communication Framework.
 

Typedefs

template<typename Registry , typename PayloadT >
using commrat::SingleTypeMailbox = TypedMailbox< Registry, PayloadT >
 Create a typed mailbox for a single payload type.
 
template<typename Registry , typename... CommandTypes>
using commrat::CommandMailbox = TypedMailbox< Registry, CommandTypes... >
 Create a typed mailbox for command types.
 
template<typename Registry , typename... DataTypes>
using commrat::DataMailbox = TypedMailbox< Registry, DataTypes... >
 Create a typed mailbox for data types.
 

Detailed Description

Type-restricted mailbox with optimized buffer sizing (Phase 7)

TypedMailbox is a wrapper around Mailbox that restricts which message types can be sent/received and uses optimized buffer sizes based on those types.

Key Benefits:

  • 70-95% memory reduction per mailbox
  • Compile-time type safety (reject wrong message types)
  • Self-documenting (mailbox type shows what it handles)
  • Zero runtime overhead (all checks at compile time)
Author
CommRaT Development Team
Date
February 10, 2026

Definition in file typed_mailbox.hpp.