18 std::function<
void(
const std::any&)>&& func,
19 std::function<
void()>&& cleanup)
20 : m_func(
std::move(func)), m_cleanup(
std::move(cleanup))
27 std::function<
void(
const std::any&)>&& func,
28 std::function<
void()>&& cleanup)
30 return Ptr(
new Subscriber(std::move(func), std::move(cleanup)));
41 std::lock_guard<std::mutex> lock(
m_mutex);
50 std::lock_guard<std::mutex> lock(
m_mutex);
59 std::lock_guard<std::mutex> lock(
m_mutex);
std::function< void(const std::any &)> m_func
void cleanupTopic(const std::string &key)
void publish(const std::any &any)
void pub(const std::any &a)
std::shared_ptr< TopicDirectory > Ptr
static Ptr create(std::function< void(const std::any &)> &&func, std::function< void()> &&cleanup)
Subscriber(std::function< void(const std::any &)> &&func, std::function< void()> &&cleanup)
std::function< void()> m_cleanup
GLsizei const GLchar ** string
std::function< void()> m_cleanup
std::unordered_map< std::string, std::weak_ptr< Topic > > m_mapService
std::shared_ptr< Subscriber > Ptr
void cleanupSubscriber(std::list< std::weak_ptr< Subscriber >>::iterator it)
Serial and networking devices and utilities.
std::list< std::weak_ptr< Subscriber > > m_subs
The central directory of existing topics for pub/sub.
GLubyte GLubyte GLubyte a
Topic(std::function< void()> &&cleanup)