|
Support Class Library
A set of tools providing classes and utility
|
A channel to use for asynchronous communication of data in a queued manner. More...
#include "Channel.h"

Public Types | |
| using | lock_type = Lock |
| lock_type The type of locks used in the channel More... | |
| template<class L > | |
| using | guard_type = Guard< L > |
| using | queue_type = std::queue< T, Container > |
| queue_type The type of the channel's queue More... | |
| using | value_type = typename queue_type::value_type |
| The type of values exposed through the channel. More... | |
| using | size_type = typename queue_type::size_type |
| The type used to quantize the size of the queue. More... | |
| using | sender_type = details::ChannelSender< Channel > |
| The type of senders for the channel. More... | |
| using | receiver_type = details::ChannelReceiver< Channel > |
| The type of receivers for the channel. More... | |
| using | transport_traits = details::channel_transport_traits< Channel > |
| The type of the transport traits for the channel. More... | |
| using | transport_type = typename transport_traits::type |
| The type of the transport payload. More... | |
Public Member Functions | |
| Channel () | |
| Construct a channel. More... | |
| Channel (const Channel &)=delete | |
| Channel (Channel &&)=delete | |
| Channel & | operator= (const Channel &)=delete |
| Channel & | operator= (Channel &&)=delete |
| size_type | size () const |
| Retrieve the size of the queue. More... | |
| size_type | length () const |
| Alias for Channel::size. More... | |
| bool | isEmpty () const |
| Determine whether or not the channel is currently empty. More... | |
| receiver_type & | receiver () |
| Get a receiver for this channel. More... | |
| sender_type & | sender () |
| Get a sender for this channel. More... | |
| template<class U = value_type> | |
| sender_type & | operator<< (U &&value) |
| Forward a value into the channel. More... | |
| template<class U = value_type> | |
| receiver_type & | operator>> (U &value) |
| Extract a value from the channel. More... | |
Public Attributes | |
| friend | sender_type |
| friend | receiver_type |
Protected Member Functions | |
| transport_type | interface () |
| Implementation details to get a receiver and sender for this channel. More... | |
Protected Attributes | |
| lock_type | lock |
| The lock being used for the channel's queue. More... | |
| std::condition_variable_any | condition |
| The condition used to wait for the channel's queue. More... | |
| queue_type | queue |
| The underlying queue used to store data. More... | |
| sender_type | sender_ |
| The sender for this channel. More... | |
| receiver_type | receiver_ |
| The receiver for this channel. More... | |
Friends | |
| template<size_t I, class U , class L , template< class > class G, class C > | |
| auto | std::get (Channel< U, L, G, C > &chan) -> scl::tools::meta ::tuple_element_t< I, typename Channel< U, L, G, C >::transport_type > |
A channel to use for asynchronous communication of data in a queued manner.
| T | being the type of values |
| Lock | being the type of lock to use |
| Guard | being the type of guard to use |
| Container | being the container to use for the queue |
| scl::async::Channel< T, Lock, Guard, Container >::guard_type |
| using scl::async::Channel< T, Lock, Guard, Container >::lock_type = Lock |
| using scl::async::Channel< T, Lock, Guard, Container >::queue_type = std::queue<T, Container> |
| scl::async::Channel< T, Lock, Guard, Container >::receiver_type |
| scl::async::Channel< T, Lock, Guard, Container >::sender_type |
| scl::async::Channel< T, Lock, Guard, Container >::size_type |
| scl::async::Channel< T, Lock, Guard, Container >::transport_traits |
| scl::async::Channel< T, Lock, Guard, Container >::transport_type |
| scl::async::Channel< T, Lock, Guard, Container >::value_type |
|
inline |
|
delete |
|
delete |
|
inlineprotected |
|
inline |
|
inline |
Alias for Channel::size.
|
inline |
Forward a value into the channel.
| U | being the type of data to forward (defaults to Channel::value_type) |
| value | being the value to forward |
|
delete |
|
delete |
|
inline |
Extract a value from the channel.
| U | being the type to store the data into (defaults to Channel::value_type) |
| value | being where to store the data |
|
inline |
|
inline |
|
inline |
|
friend |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
| friend scl::async::Channel< T, Lock, Guard, Container >::receiver_type |
|
protected |
| friend scl::async::Channel< T, Lock, Guard, Container >::sender_type |
1.8.13