mirror of
https://github.com/ZmnSCPxj/clboss.git
synced 2026-08-14 12:43:19 +02:00
42 lines
891 B
C++
42 lines
891 B
C++
#ifndef BOSS_MOD_CHANNELCREATEDESTROYMONITOR_HPP
|
|
#define BOSS_MOD_CHANNELCREATEDESTROYMONITOR_HPP
|
|
|
|
#include"Ln/NodeId.hpp"
|
|
#include<set>
|
|
|
|
namespace S { class Bus; }
|
|
|
|
namespace Boss { namespace Mod {
|
|
|
|
/** class Boss::Mod::ChannelCreateDestroyMonitor
|
|
*
|
|
* @brief module that monitors channel creation and
|
|
* destruction events, and informs other modules of
|
|
* these events.
|
|
*/
|
|
class ChannelCreateDestroyMonitor {
|
|
private:
|
|
S::Bus& bus;
|
|
bool initted;
|
|
std::set<Ln::NodeId> channeled;
|
|
|
|
void start();
|
|
|
|
public:
|
|
ChannelCreateDestroyMonitor() =delete;
|
|
ChannelCreateDestroyMonitor(ChannelCreateDestroyMonitor&&) =delete;
|
|
ChannelCreateDestroyMonitor(ChannelCreateDestroyMonitor const&)
|
|
=delete;
|
|
|
|
explicit
|
|
ChannelCreateDestroyMonitor(S::Bus& bus_
|
|
) : bus(bus_)
|
|
, initted(false)
|
|
{
|
|
start();
|
|
}
|
|
};
|
|
|
|
}}
|
|
|
|
#endif /* !defined(BOSS_MOD_CHANNELCREATEDESTROYMONITOR_HPP) */
|