uTL
micro Template library
|
Abstract base classes for output stream devices. More...
#include <ostream_dev.h>
Public Types | |
using | type = ostream_dev_t |
Export type as identity meta-function. More... | |
using | data_type = data_t |
using | pointer_type = data_t * |
Public Member Functions | |
Common output device interface | |
size_t | put (const data_t &data) |
Put interface. This function should send a single data_t object to device. More... | |
size_t | put (const data_t *data, size_t n) |
Put interface. This function should send a stream of data_t objects to device. More... | |
Stream operator << interface | |
template<typename _Src_t > | |
ostream_dev_t & | operator<< (const _Src_t &src) |
Template operator<< implementation for for all by value/ref parameters. More... | |
template<typename _Src_t > | |
ostream_dev_t & | operator<< (_Src_t *src)=delete |
Overload to disallow pointer types as source. More... | |
ostream_dev_t & | operator<< (const data_t &src) |
Overload for single data_t object. More... | |
iterator | end () noexcept |
const_iterator | end () const noexcept |
const_iterator | cend () const noexcept |
Protected Member Functions | |
Constructor / Destructor | |
~ostream_dev ()=default | |
Allow destructor from derived only. More... | |
ostream_dev ()=default | |
A default constructor from derived only. More... | |
ostream_dev (const ostream_dev_t &)=delete | |
No copies. More... | |
ostream_dev_t & | operator= (const ostream_dev_t &)=delete |
Private Types | |
using | ostream_dev_t = ostream_dev< impl_t, data_t > |
class type syntactic sugar More... | |
Private Member Functions | |
_CRTP_IMPL (impl_t) | |
Common output device interface requirements | |
size_t | put_ (const data_t &data) |
size_t | put_ (const data_t *data, size_t n) |
STL-like Output iterator interface | |
using | iterator = ostreamdev_it< ostream_dev_t, data_t > |
Iterator. More... | |
using | const_iterator = ostreamdev_it< const ostream_dev_t, data_t > |
Const iterator. More... | |
iterator | begin () noexcept |
.begin implementation More... | |
const_iterator | begin () const noexcept |
const_iterator | cbegin () const noexcept |
Abstract base classes for output stream devices.
Template base class for output stream devices using CRTP
This class force a common interface for output stream devices. By using this common interface the class implements
impl_t | The CRTP type (the derived/implementation class typename). |
data_t | The devices base type of data |
Definition at line 52 of file ostream_dev.h.
using utl::ostream_dev< impl_t, data_t >::const_iterator = ostreamdev_it <const ostream_dev_t, data_t> |
Const iterator.
Definition at line 151 of file ostream_dev.h.
using utl::ostream_dev< impl_t, data_t >::data_type = data_t |
Export types as output device concept demands
Definition at line 59 of file ostream_dev.h.
using utl::ostream_dev< impl_t, data_t >::iterator = ostreamdev_it <ostream_dev_t, data_t> |
Iterator.
Definition at line 150 of file ostream_dev.h.
|
private |
class type syntactic sugar
Definition at line 54 of file ostream_dev.h.
using utl::ostream_dev< impl_t, data_t >::pointer_type = data_t* |
Definition at line 60 of file ostream_dev.h.
using utl::ostream_dev< impl_t, data_t >::type = ostream_dev_t |
Export type as identity meta-function.
Definition at line 62 of file ostream_dev.h.
|
protecteddefault |
Allow destructor from derived only.
|
protecteddefault |
A default constructor from derived only.
|
protecteddelete |
No copies.
|
private |
|
inlinenoexcept |
.begin implementation
Definition at line 154 of file ostream_dev.h.
|
inlinenoexcept |
Definition at line 155 of file ostream_dev.h.
|
inlinenoexcept |
Definition at line 156 of file ostream_dev.h.
|
inlinenoexcept |
Definition at line 161 of file ostream_dev.h.
|
inlinenoexcept |
.end implementation
Definition at line 159 of file ostream_dev.h.
|
inlinenoexcept |
Definition at line 160 of file ostream_dev.h.
|
inline |
Template operator<< implementation for for all by value/ref parameters.
src | Reference to source data |
Definition at line 128 of file ostream_dev.h.
|
delete |
Overload to disallow pointer types as source.
|
inline |
Overload for single data_t object.
Definition at line 139 of file ostream_dev.h.
|
protecteddelete |
No copy assignments
|
inline |
Put interface. This function should send a single data_t object to device.
data | The data to send |
Definition at line 96 of file ostream_dev.h.
|
inline |
Put interface. This function should send a stream of data_t objects to device.
data | Pointer to buffer indenting write to device. |
n | The number of data of type data_t to send |
Definition at line 108 of file ostream_dev.h.
|
inlineprivate |
Definition at line 77 of file ostream_dev.h.
|
inlineprivate |
Definition at line 78 of file ostream_dev.h.