#include <TokenBroadcaster.h>
A broadcaster of query results.
Definition at line 17 of file TokenBroadcaster.h.
◆ TokenBroadcaster() [1/2]
TokenBroadcaster::TokenBroadcaster |
( |
| ) |
|
◆ ~TokenBroadcaster() [1/2]
TokenBroadcaster::~TokenBroadcaster |
( |
| ) |
|
|
override |
◆ TokenBroadcaster() [2/2]
knowrob::TokenBroadcaster::TokenBroadcaster |
( |
| ) |
|
◆ ~TokenBroadcaster() [2/2]
knowrob::TokenBroadcaster::~TokenBroadcaster |
( |
| ) |
|
|
override |
◆ addSubscriber() [1/2]
void TokenBroadcaster::addSubscriber |
( |
const std::shared_ptr< Channel > & |
subscriber | ) |
|
Add a subscriber to this broadcast. The subscriber will receive input from the broadcast after this call.
- Parameters
-
subscriber | a query result stream. |
Definition at line 23 of file TokenBroadcaster.cpp.
24 std::lock_guard<std::mutex> lock(
mtx_);
◆ addSubscriber() [2/2]
void knowrob::TokenBroadcaster::addSubscriber |
( |
const std::shared_ptr< Channel > & |
subscriber | ) |
|
Add a subscriber to this broadcast. The subscriber will receive input from the broadcast after this call.
- Parameters
-
subscriber | a query result stream. |
◆ push() [1/2]
void TokenBroadcaster::push |
( |
const TokenPtr & |
tok | ) |
|
|
overrideprotectedvirtual |
◆ push() [2/2]
void knowrob::TokenBroadcaster::push |
( |
const TokenPtr & |
tok | ) |
|
|
overrideprotectedvirtual |
◆ pushToBroadcast() [1/2]
void TokenBroadcaster::pushToBroadcast |
( |
const TokenPtr & |
tok | ) |
|
|
protectedvirtual |
◆ pushToBroadcast() [2/2]
virtual void knowrob::TokenBroadcaster::pushToBroadcast |
( |
const TokenPtr & |
tok | ) |
|
|
protectedvirtual |
◆ removeSubscriber() [1/2]
void TokenBroadcaster::removeSubscriber |
( |
const std::shared_ptr< Channel > & |
subscriber | ) |
|
Remove a previously added subscriber.
- Parameters
-
subscriber | a query result stream. |
Definition at line 28 of file TokenBroadcaster.cpp.
29 std::lock_guard<std::mutex> lock(
mtx_);
◆ removeSubscriber() [2/2]
void knowrob::TokenBroadcaster::removeSubscriber |
( |
const std::shared_ptr< Channel > & |
subscriber | ) |
|
Remove a previously added subscriber.
- Parameters
-
subscriber | a query result stream. |
◆ mtx_
std::mutex knowrob::TokenBroadcaster::mtx_ |
|
protected |
◆ subscribers_
std::list< std::shared_ptr< Channel > > knowrob::TokenBroadcaster::subscribers_ |
|
protected |
The documentation for this class was generated from the following files: