template<class Derived>
istream_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_in, std::endian a_endian) -> derived_type& noexcept
- Sets the default endian format types will be read as when no format is specified.
Reading
-
template<class... Args>auto read() -> std::
tuple<Args...> - Batch reads the given values from the input stream.
-
template<class... Args>auto read(std::endian a_endian) -> std::
tuple<Args...> - Batch reads the given values with the given endian format from the input stream.
-
template<class... Args>void read(Args&... a_args)
- Batch reads the given values from the input stream.
-
template<class... Args>void read(std::endian a_endian, Args&... a_args)
- Batch reads the given values with the given endian format from the input stream.
-
template<concepts::auto operator>>(derived_type& a_in, T& a_value) -> derived_type&
integral T> - Reads the given value from the input stream.
Function documentation
template<class Derived>
derived_type& binary_io:: istream_interface<Derived>:: operator>>(derived_type& a_in,
std::endian a_endian) noexcept
Sets the default endian format types will be read as when no format is specified.
Parameters | |
---|---|
a_in | The input stream to modify. |
a_endian | The new default endian format. |
Returns | A reference to the input stream, for chaining. |
template<class Derived>
template<class... Args>
std:: tuple<Args...> binary_io:: istream_interface<Derived>:: read()
template<class... Args>
Batch reads the given values from the input stream.
Template parameters | |
---|---|
Args | The values to be read from the input stream. |
Returns | The values read from the input stream. |
template<class Derived>
template<class... Args>
std:: tuple<Args...> binary_io:: istream_interface<Derived>:: read(std::endian a_endian)
template<class... Args>
Batch reads the given values with the given endian format from the input stream.
Template parameters | |
---|---|
Args | The values to be read from the input stream. |
Parameters | |
a_endian | The endian format the types are stored in. |
Returns | The values read from the input stream. |
template<class Derived>
template<class... Args>
void binary_io:: istream_interface<Derived>:: read(Args&... a_args)
template<class... Args>
Batch reads the given values from the input stream.
Parameters | |
---|---|
a_args | The values to be read from the input stream. |
template<class Derived>
template<class... Args>
void binary_io:: istream_interface<Derived>:: read(std::endian a_endian,
Args&... a_args)
template<class... Args>
Batch reads the given values with the given endian format from the input stream.
Parameters | |
---|---|
a_endian | The endian format the type is stored in. |
a_args | The values to be read from the input stream. |
template<class Derived>
template<concepts:: integral T>
derived_type& binary_io:: istream_interface<Derived>:: operator>>(derived_type& a_in,
T& a_value)
template<concepts::
Reads the given value from the input stream.
Parameters | |
---|---|
a_in | The input stream to read from. |
a_value | The value to be read from the input stream. |
Returns | A reference to the input stream, for chaining. |