uTL
micro Template library
|
Abstract base classes for output devices. More...
#include <out_dev.h>
Public Types | |
using | type = out_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 > | |
out_dev_t & | operator<< (_Src_t &src) |
Template operator<< implementation for for all by value/ref parameters. More... | |
template<typename _Src_t > | |
out_dev_t & | operator<< (_Src_t *src)=delete |
Overload to disallow pointer types as source. More... | |
out_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 | |
~out_dev ()=default | |
Allow destructor from derived only. More... | |
out_dev ()=default | |
A default constructor from derived only. More... | |
out_dev (const out_dev_t &)=delete | |
No copies. More... | |
out_dev_t & | operator= (const out_dev_t &)=delete |
Private Types | |
using | out_dev_t = out_dev< impl_t, data_t, streamsize > |
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 = outdev_it< out_dev_t, data_t *, streamsize > |
Iterator. More... | |
using | const_iterator = outdev_it< const out_dev_t, data_t *, streamsize > |
Const iterator. More... | |
iterator | begin () noexcept |
.begin implementation More... | |
const_iterator | begin () const noexcept |
const_iterator | cbegin () const noexcept |
Abstract base classes for output devices.
Template base class for output devices. using CRTP
This class force a common interface for output 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 |
streamsize | The number of elements to indicate eos. |
using utl::out_dev< impl_t, data_t, streamsize >::const_iterator = outdev_it <const out_dev_t, data_t*, streamsize> |
using utl::out_dev< impl_t, data_t, streamsize >::data_type = data_t |
using utl::out_dev< impl_t, data_t, streamsize >::iterator = outdev_it <out_dev_t, data_t*, streamsize> |
|
private |
using utl::out_dev< impl_t, data_t, streamsize >::pointer_type = data_t* |
using utl::out_dev< impl_t, data_t, streamsize >::type = out_dev_t |
|
protecteddefault |
Allow destructor from derived only.
|
protecteddefault |
A default constructor from derived only.
|
protecteddelete |
No copies.
|
private |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Template operator<< implementation for for all by value/ref parameters.
src | Reference to source data |
|
delete |
Overload to disallow pointer types as source.
|
inline |
|
protecteddelete |
No copy assignments
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |