19 auto pPrev =
prev.lock();
22 if (
auto &pNext = (pPrev->next =
next))
23 pNext->prev = move(
prev);
27 : m_pPolicy{ pPolicy }
28 , m_visitor{ visitor }
36 auto pRecord = move(
next);
38 pRecord = move(pRecord->next);
45 if (
auto &pNext = (pRecord->next = move(
next)))
46 pNext->prev = pRecord;
47 pRecord->prev = weak_from_this();
58 for (
auto pRecord =
next; pRecord; pRecord = pRecord->next) {
87 : m_wRecord{ move(pRecord) } {}
91 const bool inequivalent =
92 m_wRecord.owner_before(other.m_wRecord) ||
A move-only handle representing a connection to a Publisher.
void Reset() noexcept
Breaks the connection (constant time)
std::weak_ptr< detail::RecordBase > m_wRecord
Subscription & operator=(Subscription &&)
May be supplied to constructor of Publisher to customize exception handling.
virtual void OnEndPublish() noexcept(false)=0
Called at the end of each publication, if exiting normally; may throw.
virtual bool OnEachFailedCallback() noexcept(false)=0
virtual ~ExceptionPolicy() noexcept
virtual void OnBeginPublish()=0
Called at the start of each publication.
std::weak_ptr< RecordLink > prev
std::shared_ptr< RecordBase > next
Subscription Subscribe(std::shared_ptr< RecordBase > pRecord)
bool(*)(const RecordBase &record, const void *arg) Visitor
Type of function visiting the list; stop visit on true return.
ExceptionPolicy *const m_pPolicy
bool Visit(const void *arg)
RecordList(ExceptionPolicy *pPolicy, Visitor visitor)