Support Class Library
A set of tools providing classes and utility
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
scl::async::details::ChannelSender< Chan > Class Template Reference

Class used to send data to a Channel. More...

#include "Channel.h"

Collaboration diagram for scl::async::details::ChannelSender< Chan >:
Collaboration graph
[legend]

Public Types

using channel_type = Chan
 The type of the channel. More...
 
using sender_traits = channel_actor_traits< ChannelSender >
 The traits of the sender. More...
 
using lock_type = typename sender_traits::lock_type
 The type of lock used in the sender. More...
 
template<class L >
using guard_type = typename sender_traits::template guard_type< L >
 The type of guards used in the sender. More...
 
using queue_type = typename sender_traits::queue_type
 The type of queue used in the channel. More...
 
using value_type = typename sender_traits::value_type
 The type of values used in the channel. More...
 

Public Member Functions

 ChannelSender (const ChannelSender &)=delete
 
ChannelSenderoperator= (const ChannelSender &)=delete
 
 ChannelSender (ChannelSender &&)=delete
 
ChannelSenderoperator= (ChannelSender &&)=delete
 
template<class U = value_type>
ChannelSenderpush (U &&value)
 Forward a value into the queue. More...
 
template<class... Args>
ChannelSenderpushEmplace (Args &&... args)
 Construct and push in-place the value. More...
 
template<class U = value_type>
ChannelSenderqueue (U &&value)
 Alias for ChannelSender::push. More...
 
template<class U = value_type>
ChannelSenderenqueue (U &&value)
 Alias for ChannelSender::push. More...
 
template<class U = value_type>
ChannelSendersend (U &&value)
 Alias for ChannelSender::push. More...
 
template<class U = value_type>
ChannelSenderoperator<< (U &&value)
 Alias for ChannelSender::push. More...
 

Public Attributes

friend sender_traits
 
friend channel_type
 

Protected Member Functions

 ChannelSender (channel_type &chan)
 Construct a sender from a (safe) pointer to its channel. More...
 
template<class... Args>
ChannelSenderdoPush (Args &&... args)
 Implementation details to push data onto the channel. More...
 

Protected Attributes

channel_typechannel
 A (safe) pointer to the channel. More...
 
sender_traits traits
 The traits for the sender. More...
 

Detailed Description

template<class Chan>
class scl::async::details::ChannelSender< Chan >

Class used to send data to a Channel.

Template Parameters
Chanbeing the channel type

Definition at line 22 of file Channel.h.

Member Typedef Documentation

◆ channel_type

template<class Chan>
scl::async::details::ChannelSender< Chan >::channel_type

The type of the channel.

Definition at line 441 of file Channel.h.

◆ guard_type

template<class Chan>
template<class L >
scl::async::details::ChannelSender< Chan >::guard_type

The type of guards used in the sender.

Definition at line 460 of file Channel.h.

◆ lock_type

template<class Chan>
scl::async::details::ChannelSender< Chan >::lock_type

The type of lock used in the sender.

Definition at line 453 of file Channel.h.

◆ queue_type

template<class Chan>
scl::async::details::ChannelSender< Chan >::queue_type

The type of queue used in the channel.

Definition at line 466 of file Channel.h.

◆ sender_traits

template<class Chan>
scl::async::details::ChannelSender< Chan >::sender_traits

The traits of the sender.

Definition at line 447 of file Channel.h.

◆ value_type

template<class Chan>
scl::async::details::ChannelSender< Chan >::value_type

The type of values used in the channel.

Definition at line 472 of file Channel.h.

Constructor & Destructor Documentation

◆ ChannelSender() [1/3]

template<class Chan>
scl::async::details::ChannelSender< Chan >::ChannelSender ( channel_type chan)
inlineexplicitprotected

Construct a sender from a (safe) pointer to its channel.

Parameters
chanbeing the channel to construct from

Definition at line 492 of file Channel.h.

◆ ChannelSender() [2/3]

template<class Chan>
scl::async::details::ChannelSender< Chan >::ChannelSender ( const ChannelSender< Chan > &  )
delete

◆ ChannelSender() [3/3]

template<class Chan>
scl::async::details::ChannelSender< Chan >::ChannelSender ( ChannelSender< Chan > &&  )
delete

Member Function Documentation

◆ doPush()

template<class Chan>
template<class... Args>
ChannelSender& scl::async::details::ChannelSender< Chan >::doPush ( Args &&...  args)
inlineprotected

Implementation details to push data onto the channel.

Template Parameters
Argsbeing the type of the arguments for the constructor
Parameters
argsbeing the arguments for the constructor
Returns
a reference to this ChannelSender

Definition at line 502 of file Channel.h.

◆ enqueue()

template<class Chan>
template<class U = value_type>
ChannelSender& scl::async::details::ChannelSender< Chan >::enqueue ( U &&  value)
inline

Alias for ChannelSender::push.

Definition at line 549 of file Channel.h.

◆ operator<<()

template<class Chan>
template<class U = value_type>
ChannelSender& scl::async::details::ChannelSender< Chan >::operator<< ( U &&  value)
inline

Alias for ChannelSender::push.

Definition at line 563 of file Channel.h.

◆ operator=() [1/2]

template<class Chan>
ChannelSender& scl::async::details::ChannelSender< Chan >::operator= ( const ChannelSender< Chan > &  )
delete

◆ operator=() [2/2]

template<class Chan>
ChannelSender& scl::async::details::ChannelSender< Chan >::operator= ( ChannelSender< Chan > &&  )
delete

◆ push()

template<class Chan>
template<class U = value_type>
ChannelSender& scl::async::details::ChannelSender< Chan >::push ( U &&  value)
inline

Forward a value into the queue.

Template Parameters
Ubeing the type of data to forward (defaults to ChannelSender::value_type)
Parameters
valuebeing the value to forward
Returns
a reference to this ChannelSender

Definition at line 522 of file Channel.h.

◆ pushEmplace()

template<class Chan>
template<class... Args>
ChannelSender& scl::async::details::ChannelSender< Chan >::pushEmplace ( Args &&...  args)
inline

Construct and push in-place the value.

Template Parameters
Argsbeing the types of arguments for the constructor
Parameters
argsbeing the arguments for the constructor
Returns
a reference to this ChannelSender

Definition at line 533 of file Channel.h.

◆ queue()

template<class Chan>
template<class U = value_type>
ChannelSender& scl::async::details::ChannelSender< Chan >::queue ( U &&  value)
inline

Alias for ChannelSender::push.

Definition at line 541 of file Channel.h.

◆ send()

template<class Chan>
template<class U = value_type>
ChannelSender& scl::async::details::ChannelSender< Chan >::send ( U &&  value)
inline

Alias for ChannelSender::push.

Definition at line 557 of file Channel.h.

Member Data Documentation

◆ channel

template<class Chan>
channel_type* scl::async::details::ChannelSender< Chan >::channel
protected

A (safe) pointer to the channel.

Definition at line 481 of file Channel.h.

◆ channel_type

template<class Chan>
friend scl::async::details::ChannelSender< Chan >::channel_type

Definition at line 475 of file Channel.h.

◆ sender_traits

template<class Chan>
friend scl::async::details::ChannelSender< Chan >::sender_traits

Definition at line 474 of file Channel.h.

◆ traits

template<class Chan>
sender_traits scl::async::details::ChannelSender< Chan >::traits
protected

The traits for the sender.

Definition at line 486 of file Channel.h.


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