utl::out_dev< virtual_tag, data_t, streamsize > Class Template Referenceabstract

A virtual base class specialization. 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

Public Put interface
size_t | put (const data_t &data)
size_t | put (const data_t *data, size_t n)
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

## Private Types

using | out_dev_t = out_dev< virtual_tag, data_t, streamsize >
| class type syntactic sugar More...

## Private Member Functions

Common output device interface requirements
virtual size_t | put_ (const data_t &data)=0
| Put interface. This function should send a single data_t object to device. More...
virtual size_t | put_ (const data_t *data, size_t n)=0
| Put interface. This function should send a stream of data_t objects to device. More...

## Constructor / Destructor

virtual | ~out_dev ()=default
| Virtual destructor. More...
| out_dev ()=default
| A default constructor from derived only. More...
| out_dev (const out_dev &)=delete
| No copies. More...
out_dev_t & | operator= (const out_dev_t &)=delete

## 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

## Detailed Description

### template<typename data_t, size_t streamsize>
class utl::out_dev< virtual_tag, data_t, streamsize >

A virtual base class specialization.

Parameters

  impl_t | = virtual_tag
  data_t | The devices base type of data

  streamsize

  The number of elements to indicate eos.
  - None or 0 Stream only. No iterator as begin() now equals end().

Definition at line 177 of file out_dev.h.

## Member Typedef Documentation

## const_iterator

template<typename data_t , size_t streamsize>

using utl::out_dev< virtual_tag, data_t, streamsize >::const_iterator = outdev_it <const out_dev_t, data_t*, streamsize>

Const iterator.

Definition at line 268 of file out_dev.h.

## data_type

template<typename data_t , size_t streamsize>

using utl::out_dev< virtual_tag, data_t, streamsize >::data_type = data_t

Export types as input device concept demands

Definition at line 183 of file out_dev.h.

## iterator

template<typename data_t , size_t streamsize>

using utl::out_dev< virtual_tag, data_t, streamsize >::iterator = outdev_it <out_dev_t, data_t*, streamsize>

Iterator.

Definition at line 267 of file out_dev.h.

## out_dev_t

template<typename data_t , size_t streamsize>

using utl::out_dev< virtual_tag, data_t, streamsize >::out_dev_t = out_dev <virtual_tag, data_t, streamsize>

private

class type syntactic sugar

Definition at line 178 of file out_dev.h.

## pointer_type

template<typename data_t , size_t streamsize>

using utl::out_dev< virtual_tag, data_t, streamsize >::pointer_type = data_t*

Definition at line 184 of file out_dev.h.

## type

template<typename data_t , size_t streamsize>

using utl::out_dev< virtual_tag, data_t, streamsize >::type = out_dev_t

Export type as identity meta-function.

Definition at line 186 of file out_dev.h.

## Constructor & Destructor Documentation

## ~out_dev()

template<typename data_t , size_t streamsize>

virtual utl::out_dev< virtual_tag, data_t, streamsize >::~out_dev | ( |  | ) |

virtualdefault

Virtual destructor.

## out_dev() [1/2]

template<typename data_t , size_t streamsize>

utl::out_dev< virtual_tag, data_t, streamsize >::out_dev | ( |  | ) |

protecteddefault

A default constructor from derived only.

## out_dev() [2/2]

template<typename data_t , size_t streamsize>

utl::out_dev< virtual_tag, data_t, streamsize >::out_dev | ( | const out_dev< virtual_tag, data_t, streamsize > & |  | ) |

protecteddelete

No copies.

## Member Function Documentation

## begin() [1/2]

template<typename data_t , size_t streamsize>

iterator utl::out_dev< virtual_tag, data_t, streamsize >::begin | ( |  | ) |

inlinenoexcept

.begin implementation

Definition at line 271 of file out_dev.h.

## begin() [2/2]

template<typename data_t , size_t streamsize>

const_iterator utl::out_dev< virtual_tag, data_t, streamsize >::begin | ( |  | ) | const

inlinenoexcept

Definition at line 272 of file out_dev.h.

## cbegin()

template<typename data_t , size_t streamsize>

const_iterator utl::out_dev< virtual_tag, data_t, streamsize >::cbegin | ( |  | ) | const

inlinenoexcept

Definition at line 273 of file out_dev.h.

## cend()

template<typename data_t , size_t streamsize>

const_iterator utl::out_dev< virtual_tag, data_t, streamsize >::cend | ( |  | ) | const

inlinenoexcept

Definition at line 278 of file out_dev.h.

## end() [1/2]

template<typename data_t , size_t streamsize>

iterator utl::out_dev< virtual_tag, data_t, streamsize >::end | ( |  | ) |

inlinenoexcept

.end implementation

Definition at line 276 of file out_dev.h.

## end() [2/2]

template<typename data_t , size_t streamsize>

const_iterator utl::out_dev< virtual_tag, data_t, streamsize >::end | ( |  | ) | const

inlinenoexcept

Definition at line 277 of file out_dev.h.

## operator<<() [1/3]

template<typename data_t , size_t streamsize>
template<typename _Src_t >

out_dev_t& utl::out_dev< virtual_tag, data_t, streamsize >::operator<< | ( | _Src_t & | src | ) |

inline

Template operator<< implementation for for all by value/ref parameters.

Parameters

  src | Reference to source data

Returns
  Reference to this device for chaining

Definition at line 246 of file out_dev.h.

## operator<<() [2/3]

template<typename data_t , size_t streamsize>
template<typename _Src_t >

out_dev_t& utl::out_dev< virtual_tag, data_t, streamsize >::operator<< | ( | _Src_t * | src | ) |

delete

Overload to disallow pointer types as source.

## operator<<() [3/3]

template<typename data_t , size_t streamsize>

out_dev_t& utl::out_dev< virtual_tag, data_t, streamsize >::operator<< | ( | const data_t & | src | ) |

inline

Overload for single data_t object.

Definition at line 257 of file out_dev.h.

## operator=()

template<typename data_t , size_t streamsize>

out_dev_t& utl::out_dev< virtual_tag, data_t, streamsize >::operator= | ( | const out_dev_t & |  | ) |

protecteddelete

No copy assignments

## put() [1/2]

template<typename data_t , size_t streamsize>

size_t utl::out_dev< virtual_tag, data_t, streamsize >::put | ( | const data_t & | data | ) |

inline

Definition at line 231 of file out_dev.h.

## put() [2/2]

template<typename data_t , size_t streamsize>

size_t utl::out_dev< virtual_tag, data_t, streamsize >::put | ( | const data_t * | data,
|  | size_t | n
| ) |  |

inline

Definition at line 232 of file out_dev.h.

## put_() [1/2]

template<typename data_t , size_t streamsize>

virtual size_t utl::out_dev< virtual_tag, data_t, streamsize >::put_ | ( | const data_t & | data | ) |

privatepure virtual

Put interface. This function should send a single data_t object to device.

Parameters

  data | The data to send

Returns
  The number of transmitted data items

Note
  A successful call should return 1

## put_() [2/2]

template<typename data_t , size_t streamsize>

virtual size_t utl::out_dev< virtual_tag, data_t, streamsize >::put_ | ( | const data_t * | data,
|  | size_t | n
| ) |  |

privatepure virtual

Put interface. This function should send a stream of data_t objects to device.

Parameters

  data | Pointer to buffer indenting write to device.
  n | The number of data of type data_t to send

Returns
  The number of transmitted items.

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

- include/utl/dev/out_dev.h