SEGS  0.6.1-develop [d2cac982]
Super Entity Game Server
MessageBusEndpoint.h
Go to the documentation of this file.
1 /*
2  * SEGS - Super Entity Game Server
3  * http://www.segs.io/
4  * Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
5  * This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
6  */
7 
8 #pragma once
9 #include "EventProcessor.h"
10 #include <vector>
11 
19 {
20  EventProcessor &m_true_handler;
21  MessageBusEndpoint(const MessageBusEndpoint &) = delete;
22  MessageBusEndpoint &operator =(const MessageBusEndpoint &) = delete;
23  std::vector<uint32_t> m_active_subscriptions;
24 public:
25  MessageBusEndpoint(EventProcessor &h) : m_true_handler(h) {}
28  {
29  m_true_handler.putq(e);
30  }
31  void subscribe(uint32_t ev_type);
32  void unsubscribe(uint32_t ev_type);
33 };
34 
35 
Definition: SEGSEvent.h:35
void putq(SEGSEvents::Event *e)
Definition: MessageBusEndpoint.h:27
~MessageBusEndpoint()
Definition: MessageBusEndpoint.cpp:18
void subscribe(uint32_t ev_type)
Definition: MessageBusEndpoint.cpp:24
MessageBusEndpoint(EventProcessor &h)
Definition: MessageBusEndpoint.h:25
The MessageBusEndpoint class is responsible for:
Definition: MessageBusEndpoint.h:18
Definition: EventProcessor.h:22
virtual int putq(SEGSEvents::Event *ev, ACE_Time_Value *timeout=nullptr)
Definition: EventProcessor.cpp:88
void unsubscribe(uint32_t ev_type)
Definition: MessageBusEndpoint.cpp:30