Mercury Currency Engine
Classes | Public Member Functions | List of all members
mce::buffered_channel< T > Struct Template Reference

#include <buffered_channel.hpp>

Inheritance diagram for mce::buffered_channel< T >:
Inheritance graph
[legend]
Collaboration diagram for mce::buffered_channel< T >:
Collaboration graph
[legend]

Public Member Functions

 buffered_channel (const buffered_channel< T > &rhs)
 
 buffered_channel (buffered_channel< T > &&rhs)
 
void construct (size_t sz) const
 construct channel context by specifying the internal buffer size
 
void construct () const
 construct channel context with a default internal buffer size
 
void * context () const
 retrieve internal context pointer
 
const std::type_info & type_info () const
 retrieve type_info
 
void close () const
 close channel
 
bool closed () const
 report if channel is closed
 
size_t size () const
 return number of values stored in channel
 
bool empty () const
 return if there are no values in the channel
 
bool full () const
 return if channel buffer is full
 
size_t capacity () const
 return maximum number of storable values
 
size_t reserve () const
 return count of unused values in the buffer
 
bool send (const T &s) const
 blocking send a copy of data through channel
 
bool send (T &&s) const
 blocking move data through channel
 
bool recv (T &r) const
 blocking retrieve data from channel
 
result try_send (const T &r) const
 nonblocking attempt to send a copy of data through channel
 
result try_send (T &&r) const
 nonblocking attempt to move data through channel
 
result try_recv (T &ret) const
 nonblocking attempt to retrieve data from channel
 
void assign (const buffered_channel< T > &rhs) const
 copy internal context of argument channel
 
void assign (buffered_channel< T > &&rhs) const
 move internal context of argument channel
 
- Public Member Functions inherited from mce::base_channel< T >
 base_channel (const base_channel< T > *rhs_bc)
 iterator context constructor
 
iterator begin () const
 iterator to the current beginning of the channel
 
iterator end () const
 default iterator == end()
 
- Public Member Functions inherited from mce::channel_operators< T, buffered_channel< T > >
 channel_operators (buffered_channel< T > *rhs_ch)
 context constructor
 
virtual ~channel_operators ()
 
 operator bool () const
 return whether channel has a shared context pointer
 
const buffered_channel< T > & operator= (const buffered_channel< T > &rhs) const
 lvalue assign channel context
 
const buffered_channel< T > & operator= (buffered_channel< T > &&rhs) const
 rvalue assign channel context
 
bool operator== (const buffered_channel< T > &rhs) const
 lvalue channel context comparison
 
bool operator== (buffered_channel< T > &&rhs) const
 rvalue channel context comparison
 
bool operator!= (const buffered_channel< T > &rhs) const
 lvalue channel context not comparison
 
bool operator!= (buffered_channel< T > &&rhs) const
 rvalue channel context not comparison
 
bool operator< (const buffered_channel< T > &rhs) const
 
bool operator< (buffered_channel< T > &&rhs) const
 
bool operator<= (const buffered_channel< T > &rhs) const
 
bool operator<= (buffered_channel< T > &&rhs) const
 
bool operator> (const buffered_channel< T > &rhs) const
 
bool operator> (buffered_channel< T > &&rhs) const
 
bool operator>= (const buffered_channel< T > &rhs) const
 
bool operator>= (buffered_channel< T > &&rhs) const
 

Additional Inherited Members

- Public Types inherited from mce::base_channel< T >
typedef T value_type
 template type for channel
 
- Static Public Member Functions inherited from mce::channel_operators< T, buffered_channel< T > >
static buffered_channel< T > make (As &&... as)
 

Detailed Description

template<typename T>
struct mce::buffered_channel< T >

Asynchronous channel communication is done internally over a statically sized buffer. Otherwise similar to unbuffered_channel.


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