template<class Derived>
ostream_interface class
A CRTP utility which can be used to flesh out the interface of a given stream.
Template parameters | |
---|---|
Derived | A stream type which meets the requirements of binary_io:: |
Base classes
- class basic_format_stream
- Implements the default formatting behaviours for every stream.
Formatting
- auto endian() const -> std::endian noexcept
- Gets the current default endian format.
- void endian(std::endian a_endian) noexcept
- Sets the default endian format.
- auto operator<<(derived_type& a_out, std::endian a_endian) -> derived_type& noexcept
- Sets the default endian format types will be written as when no format is specified.
Writing
-
template<class... Args>void write(Args... a_args)
- Writes the given values into the output stream.
-
template<class... Args>void write(std::endian a_endian, Args... a_args)
- Writes the given values into the output stream, with the given endian format.
-
template<concepts::auto operator<<(derived_type& a_out, T a_value) -> derived_type&
integral T> - Writes the given value into the output stream.
Function documentation
template<class Derived>
derived_type& binary_io:: ostream_interface<Derived>:: operator<<(derived_type& a_out,
std::endian a_endian) noexcept
Sets the default endian format types will be written as when no format is specified.
Parameters | |
---|---|
a_out | The output stream to modify. |
a_endian | The new default endian format. |
Returns | A reference to the output stream, for chaining. |
template<class Derived>
template<class... Args>
void binary_io:: ostream_interface<Derived>:: write(Args... a_args)
template<class... Args>
Writes the given values into the output stream.
Parameters | |
---|---|
a_args | The values to be written into the output stream. |
template<class Derived>
template<class... Args>
void binary_io:: ostream_interface<Derived>:: write(std::endian a_endian,
Args... a_args)
template<class... Args>
Writes the given values into the output stream, with the given endian format.
Parameters | |
---|---|
a_endian | The endian format the values will be written as. |
a_args | The values to be written into the output stream. |
template<class Derived>
template<concepts:: integral T>
derived_type& binary_io:: ostream_interface<Derived>:: operator<<(derived_type& a_out,
T a_value)
template<concepts::
Writes the given value into the output stream.
Parameters | |
---|---|
a_out | The output stream to write to. |
a_value | The value to be written into the output stream. |
Returns | A reference to the output stream, for chaining. |