utl::ostream_dev< virtual_tag, data_t > Class Template Referenceabstract

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

## Private Types

using | ostream_dev_t = ostream_dev< virtual_tag, data_t >
| class type syntactic sugar More...

## Private Member Functions

Common output device interface requirements
virtual size_t | put_ (const data_t &data)=0
virtual size_t | put_ (const data_t *data, size_t n)=0

## Constructor / Destructor

virtual | ~ostream_dev ()=default
| Virtual destructor. 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

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

## Detailed Description

### template<typename data_t>
class utl::ostream_dev< virtual_tag, data_t >

Definition at line 171 of file ostream_dev.h.

## Member Typedef Documentation

## const_iterator

template<typename data_t >

using utl::ostream_dev< virtual_tag, data_t >::const_iterator = ostreamdev_it <const ostream_dev_t, data_t>

Const iterator.

Definition at line 267 of file ostream_dev.h.

## data_type

template<typename data_t >

using utl::ostream_dev< virtual_tag, data_t >::data_type = data_t

Export types as output device concept demands

Definition at line 177 of file ostream_dev.h.

## iterator

template<typename data_t >

using utl::ostream_dev< virtual_tag, data_t >::iterator = ostreamdev_it <ostream_dev_t, data_t>

Iterator.

Definition at line 266 of file ostream_dev.h.

## ostream_dev_t

template<typename data_t >

using utl::ostream_dev< virtual_tag, data_t >::ostream_dev_t = ostream_dev <virtual_tag, data_t>

private

class type syntactic sugar

Definition at line 172 of file ostream_dev.h.

## pointer_type

template<typename data_t >

using utl::ostream_dev< virtual_tag, data_t >::pointer_type = data_t*

Definition at line 178 of file ostream_dev.h.

## type

template<typename data_t >

using utl::ostream_dev< virtual_tag, data_t >::type = ostream_dev_t

Export type as identity meta-function.

Definition at line 180 of file ostream_dev.h.

## Constructor & Destructor Documentation

## ~ostream_dev()

template<typename data_t >

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

virtualdefault

Virtual destructor.

## ostream_dev() [1/2]

template<typename data_t >

utl::ostream_dev< virtual_tag, data_t >::ostream_dev | ( |  | ) |

protecteddefault

A default constructor from derived only.

## ostream_dev() [2/2]

template<typename data_t >

utl::ostream_dev< virtual_tag, data_t >::ostream_dev | ( | const ostream_dev_t & |  | ) |

protecteddelete

No copies.

## Member Function Documentation

## begin() [1/2]

template<typename data_t >

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

inlinenoexcept

.begin implementation

Definition at line 270 of file ostream_dev.h.

## begin() [2/2]

template<typename data_t >

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

inlinenoexcept

Definition at line 271 of file ostream_dev.h.

## cbegin()

template<typename data_t >

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

inlinenoexcept

Definition at line 272 of file ostream_dev.h.

## cend()

template<typename data_t >

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

inlinenoexcept

Definition at line 277 of file ostream_dev.h.

## end() [1/2]

template<typename data_t >

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

inlinenoexcept

.end implementation

Definition at line 275 of file ostream_dev.h.

## end() [2/2]

template<typename data_t >

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

inlinenoexcept

Definition at line 276 of file ostream_dev.h.

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

template<typename data_t >
template<typename _Src_t >

ostream_dev_t& utl::ostream_dev< virtual_tag, data_t >::operator<< | ( | const _Src_t & | src | ) |

inline

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

Note
  In the case _Src_t size is not an exact multiple of data_t size the write data will be truncated and there may be data loss.

Parameters

  src | Reference to source data

Returns
  Reference to this device for chaining

Definition at line 245 of file ostream_dev.h.

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

template<typename data_t >
template<typename _Src_t >

ostream_dev_t& utl::ostream_dev< virtual_tag, data_t >::operator<< | ( | _Src_t * | src | ) |

delete

Overload to disallow pointer types as source.

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

template<typename data_t >

ostream_dev_t& utl::ostream_dev< virtual_tag, data_t >::operator<< | ( | const data_t & | src | ) |

inline

Overload for single data_t object.

Definition at line 256 of file ostream_dev.h.

## operator=()

template<typename data_t >

ostream_dev_t& utl::ostream_dev< virtual_tag, data_t >::operator= | ( | const ostream_dev_t & |  | ) |

protecteddelete

No copy assignments

## put() [1/2]

template<typename data_t >

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

inline

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

Definition at line 213 of file ostream_dev.h.

## put() [2/2]

template<typename data_t >

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

inline

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.

Definition at line 225 of file ostream_dev.h.

## put_() [1/2]

template<typename data_t >

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

privatepure virtual

## put_() [2/2]

template<typename data_t >

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

privatepure virtual

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

- include/utl/dev/ostream_dev.h