hdk-grid 0.0.1
Header-only foundational library for the Hollow Development Kit.
Loading...
Searching...
No Matches
hdk::grid::eps::TapScope Class Reference

#include <EPS.hpp>

Public Member Functions

 TapScope ()=default
 TapScope (const TapScope &)=delete
TapScopeoperator= (const TapScope &)=delete
 TapScope (TapScope &&)=delete
TapScopeoperator= (TapScope &&)=delete
 ~TapScope ()
template<typename TapT>
void Add (TapT tap)
 Add a subscription to this group.
template<typename TapT>
TapScopeoperator<< (TapT tap)
 Fluent API for adding subscriptions.
void DetachAll ()
 Detach all contained subscriptions.
void PauseAll ()
void ResumeAll ()
void Clear ()
 Clear all subscriptions without unsubscribing.
std::size_t Size () const
 Get the number of subscriptions in this group.

Detailed Description

Definition at line 216 of file EPS.hpp.

Constructor & Destructor Documentation

◆ TapScope() [1/3]

hdk::grid::eps::TapScope::TapScope ( )
default

◆ TapScope() [2/3]

hdk::grid::eps::TapScope::TapScope ( const TapScope & )
delete

References TapScope().

◆ TapScope() [3/3]

hdk::grid::eps::TapScope::TapScope ( TapScope && )
delete

References TapScope().

◆ ~TapScope()

hdk::grid::eps::TapScope::~TapScope ( )
inline

Definition at line 223 of file EPS.hpp.

References DetachAll().

Member Function Documentation

◆ Add()

template<typename TapT>
void hdk::grid::eps::TapScope::Add ( TapT tap)
inline

Add a subscription to this group.

Takes ownership of the subscription. When DetachAll() is called or the group is destroyed, this subscription will be unsubscribed.

Template Parameters
SubscriptionTThe subscription type (typically Conduit::Tap)
Parameters
subscriptionThe subscription to add (moved into the group)
Note
Has no effect if the subscription is not active

Definition at line 225 of file EPS.hpp.

Referenced by operator<<().

◆ Clear()

void hdk::grid::eps::TapScope::Clear ( )
inline

Clear all subscriptions without unsubscribing.

Removes all subscriptions from this group without calling Detach(). The subscriptions remain active (tied to their original dispatchers).

Note
Rarely needed - use DetachAll() in most cases

Definition at line 263 of file EPS.hpp.

◆ DetachAll()

void hdk::grid::eps::TapScope::DetachAll ( )
inline

Detach all contained subscriptions.

Immediately removes all subscriptions in this group. Called automatically on destruction. Safe to call multiple times.

Definition at line 238 of file EPS.hpp.

Referenced by ~TapScope().

◆ operator<<()

template<typename TapT>
TapScope & hdk::grid::eps::TapScope::operator<< ( TapT tap)
inline

Fluent API for adding subscriptions.

Provides a more concise syntax for adding multiple subscriptions:

group << dispatcher1.Attach(callback1)
<< dispatcher2.Attach(callback2)
<< dispatcher3.Attach(callback3);
Template Parameters
SubscriptionTThe subscription type
Parameters
subscriptionThe subscription to add (moved into the group)
Returns
Reference to this group for chaining

Definition at line 233 of file EPS.hpp.

References Add(), and TapScope().

◆ operator=() [1/2]

TapScope & hdk::grid::eps::TapScope::operator= ( const TapScope & )
delete

References TapScope().

◆ operator=() [2/2]

TapScope & hdk::grid::eps::TapScope::operator= ( TapScope && )
delete

References TapScope().

◆ PauseAll()

void hdk::grid::eps::TapScope::PauseAll ( )
inline

Definition at line 249 of file EPS.hpp.

◆ ResumeAll()

void hdk::grid::eps::TapScope::ResumeAll ( )
inline

Definition at line 256 of file EPS.hpp.

◆ Size()

std::size_t hdk::grid::eps::TapScope::Size ( ) const
inline

Get the number of subscriptions in this group.

Returns
The number of subscriptions currently in this group

Definition at line 268 of file EPS.hpp.


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