A move-only handle representing a connection to a Publisher.
More...
#include <Observer.h>
A move-only handle representing a connection to a Publisher.
Definition at line 70 of file Observer.h.
◆ Subscription() [1/3]
Observer::Subscription::Subscription |
( |
| ) |
|
|
default |
◆ Subscription() [2/3]
◆ ~Subscription()
Observer::Subscription::~Subscription |
( |
| ) |
|
|
inlinenoexcept |
Calls Reset.
Definition at line 77 of file Observer.h.
void Reset() noexcept
Breaks the connection (constant time)
◆ Subscription() [3/3]
Definition at line 86 of file Observer.cpp.
std::weak_ptr< detail::RecordBase > m_wRecord
◆ Expired()
bool Observer::Subscription::Expired |
( |
| ) |
const |
|
inline |
- Returns
- true iff there is no connection (Publisher was destroyed, or this was not reassigned since it was last Reset(), default-constructed, or moved from)
Definition at line 87 of file Observer.h.
◆ operator bool()
Observer::Subscription::operator bool |
( |
| ) |
const |
|
inlineexplicit |
- Returns
- not expired
Definition at line 90 of file Observer.h.
◆ operator=()
Definition at line 89 of file Observer.cpp.
90{
91 const bool inequivalent =
92 m_wRecord.owner_before(other.m_wRecord) ||
94 if (inequivalent) {
97 }
98 return *this;
99}
References m_wRecord, and Reset().
◆ Reset()
void Observer::Subscription::Reset |
( |
| ) |
|
|
noexcept |
◆ m_wRecord
The documentation for this class was generated from the following files: