Reference-like object for writing and reading data at memorized stream positions.
More...
#include <io.hpp>
|
| template<typename M, typename A = T, std::enable_if_t< std::is_class_v< A >, int > = 0> |
| Ref< M > | operator->* (M A::*member) const |
| | Creates an Ref to a member of the referenced struct.
|
| template<typename A = T, typename M = std::remove_all_extents_t<A>, std::enable_if_t< std::is_array_v< A > &&std::rank_v< A >==1, int > = 0> |
| Ref< M > | operator[] (std::size_t index) const |
| | Creates an Ref to an element of the referenced C array.
|
| template<typename A = T, typename M = std::remove_extent_t<A>, std::enable_if_t< std::is_array_v< A > &&std::rank_v< A > !=1, int > = 0> |
| Ref< M > | operator[] (std::size_t index) const |
| | Creates an Ref to a subdimension of the referenced multidimensional C array.
|
| template<typename A = T, std::enable_if_t<!std::is_array_v< A >, int > = 0> |
| | operator A () const |
| | Reads the entire object at the offset position.
|
| void | operator= (const T &value) |
| | Assignment operator for writing the entire object.
|
template<typename T>
class nnl::Writer::Ref< T >
Reference-like object for writing and reading data at memorized stream positions.
Allows writing and reading (if a derived class implements Reader) at specific positions by temporarily changing the main "stream" position.
- Template Parameters
-
- See also
- nnl::Writer::Offset
◆ operator A()
template<typename T>
template<typename A = T, std::enable_if_t<!std::is_array_v< A >, int > = 0>
Reads the entire object at the offset position.
- Returns
- The object
◆ operator->*()
template<typename T>
template<typename M, typename A = T, std::enable_if_t< std::is_class_v< A >, int > = 0>
Creates an Ref to a member of the referenced struct.
- Template Parameters
-
- Parameters
-
- Returns
- Ref to the member
◆ operator=()
Assignment operator for writing the entire object.
- Parameters
-
◆ operator[]() [1/2]
template<typename T>
template<typename A = T, typename M = std::remove_all_extents_t<A>, std::enable_if_t< std::is_array_v< A > &&std::rank_v< A >==1, int > = 0>
Creates an Ref to an element of the referenced C array.
- Template Parameters
-
- Parameters
-
- Returns
- Ref pointing to the array element
◆ operator[]() [2/2]
template<typename T>
template<typename A = T, typename M = std::remove_extent_t<A>, std::enable_if_t< std::is_array_v< A > &&std::rank_v< A > !=1, int > = 0>
Creates an Ref to a subdimension of the referenced multidimensional C array.
- Template Parameters
-
- Parameters
-
- Returns
- Ref pointing to the array
The documentation for this class was generated from the following file: