RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
rtctk::componentFramework::RepositorySubscriberIf::Subscription Class Referencefinal

RAII wrapper class used to manage the life-time of individual subscriptions. More...

#include <rtctk/componentFramework/repositorySubscriberIf.hpp>

Public Types

using UnsubscribeMethod = std::function<void()>
 

Public Member Functions

 Subscription (UnsubscribeMethod)
 
 ~Subscription ()
 
 Subscription (const Subscription &)=delete
 
Subscriptionoperator= (const Subscription &)=delete
 
 Subscription (Subscription &&) noexcept
 
Subscriptionoperator= (Subscription &&) noexcept
 
void Unsubscribe ()
 

Detailed Description

RAII wrapper class used to manage the life-time of individual subscriptions.

A subscription can be prematurely stopped when Unsubscribe is called, otherwise it is stopped automatically when the subscription object is destroyed. The user can assume that no more callbacks will arrive after Unsubscribe or the destructor returns.

Thread Safety
thread-safe

Member Typedef Documentation

◆ UnsubscribeMethod

Constructor & Destructor Documentation

◆ Subscription() [1/3]

rtctk::componentFramework::RepositorySubscriberIf::Subscription::Subscription ( UnsubscribeMethod f)
explicit

◆ ~Subscription()

rtctk::componentFramework::RepositorySubscriberIf::Subscription::~Subscription ( )

◆ Subscription() [2/3]

rtctk::componentFramework::RepositorySubscriberIf::Subscription::Subscription ( const Subscription & )
delete

◆ Subscription() [3/3]

rtctk::componentFramework::RepositorySubscriberIf::Subscription::Subscription ( RepositorySubscriberIf::Subscription && other)
noexcept

Member Function Documentation

◆ operator=() [1/2]

Subscription & rtctk::componentFramework::RepositorySubscriberIf::Subscription::operator= ( const Subscription & )
delete

◆ operator=() [2/2]

RepositorySubscriberIf::Subscription & rtctk::componentFramework::RepositorySubscriberIf::Subscription::operator= ( RepositorySubscriberIf::Subscription && other)
noexcept

◆ Unsubscribe()

void rtctk::componentFramework::RepositorySubscriberIf::Subscription::Unsubscribe ( )

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