|
ORE Studio 0.0.4
|
Registry of available event channels. More...
#include <event_channel_registry.hpp>

Public Member Functions | |
| event_channel_registry (const event_channel_registry &)=delete | |
| event_channel_registry & | operator= (const event_channel_registry &)=delete |
| event_channel_registry (event_channel_registry &&)=delete | |
| event_channel_registry & | operator= (event_channel_registry &&)=delete |
| template<domain::has_event_traits Event> | |
| void | register_channel (const std::string &description) |
| Register a channel for a typed event. | |
| void | register_channel (const std::string &name, const std::string &description) |
| Register a channel by name. | |
| std::vector< domain::event_channel_info > | get_channels () const |
| Get all registered channels. | |
| bool | is_registered (const std::string &name) const |
| Check if a channel is registered. | |
| std::size_t | size () const |
| Get the number of registered channels. | |
Registry of available event channels.
Tracks all event channels that clients can subscribe to, along with their descriptions. Channels are registered during application initialization when entity-to-event mappings are configured.
Thread Safety:
Usage:
| void register_channel | ( | const std::string & | description | ) |
Register a channel for a typed event.
Uses event_traits to get the channel name automatically.
| Event | The domain event type (must have event_traits specialization). |
| description | Human-readable description of the channel. |

| void register_channel | ( | const std::string & | name, |
| const std::string & | description | ||
| ) |
Register a channel by name.
| name | The channel name (e.g., "ores.refdata.currency_changed"). |
| description | Human-readable description of the channel. |
| std::vector< domain::event_channel_info > get_channels | ( | ) | const |
Get all registered channels.
| bool is_registered | ( | const std::string & | name | ) | const |
Check if a channel is registered.
| name | The channel name to check. |
| std::size_t size | ( | ) | const |
Get the number of registered channels.