Goby3  3.1.5a
2024.05.23
goby::middleware::detail::SubscriptionStore< Data > Class Template Reference

Storage class for a specific interthread subscription (and related data). Used by InterThreadTransporter. More...

#include <goby/middleware/transport/detail/subscription_store.h>

Inheritance diagram for goby::middleware::detail::SubscriptionStore< Data >:
goby::middleware::detail::SubscriptionStoreBase

Static Public Member Functions

static void subscribe (std::function< void(std::shared_ptr< const Data >)> func, const Group &group, std::thread::id thread_id, std::shared_ptr< std::mutex > data_mutex, std::shared_ptr< std::condition_variable_any > cv, std::shared_ptr< std::timed_mutex > poller_mutex)
 
static void unsubscribe (const Group &group, std::thread::id thread_id)
 
static void publish (std::shared_ptr< const Data > data, const Group &group, const Publisher< Data > &publisher)
 
- Static Public Member Functions inherited from goby::middleware::detail::SubscriptionStoreBase
static int poll_all (std::thread::id thread_id, std::unique_ptr< std::unique_lock< std::timed_mutex >> &lock)
 
static void unsubscribe_all (std::thread::id thread_id)
 
static void remove (std::thread::id thread_id)
 

Additional Inherited Members

- Public Member Functions inherited from goby::middleware::detail::SubscriptionStoreBase
 SubscriptionStoreBase ()=default
 
virtual ~SubscriptionStoreBase ()=default
 
- Static Protected Member Functions inherited from goby::middleware::detail::SubscriptionStoreBase
template<typename StoreType >
static void insert (std::thread::id thread_id)
 

Detailed Description

template<typename Data>
class goby::middleware::detail::SubscriptionStore< Data >

Storage class for a specific interthread subscription (and related data). Used by InterThreadTransporter.

Definition at line 127 of file subscription_store.h.

Member Function Documentation

◆ publish()

template<typename Data >
static void goby::middleware::detail::SubscriptionStore< Data >::publish ( std::shared_ptr< const Data >  data,
const Group group,
const Publisher< Data > &  publisher 
)
inlinestatic

Definition at line 191 of file subscription_store.h.

◆ subscribe()

template<typename Data >
static void goby::middleware::detail::SubscriptionStore< Data >::subscribe ( std::function< void(std::shared_ptr< const Data >)>  func,
const Group group,
std::thread::id  thread_id,
std::shared_ptr< std::mutex >  data_mutex,
std::shared_ptr< std::condition_variable_any >  cv,
std::shared_ptr< std::timed_mutex >  poller_mutex 
)
inlinestatic

Definition at line 130 of file subscription_store.h.

◆ unsubscribe()

template<typename Data >
static void goby::middleware::detail::SubscriptionStore< Data >::unsubscribe ( const Group group,
std::thread::id  thread_id 
)
inlinestatic

Definition at line 163 of file subscription_store.h.


The documentation for this class was generated from the following file: