|
R-Type 0.1
|
Unsigned integer stored as big-endian bytes, with an alignment of 1. More...
#include <Protocol/BigEndian.hpp>
Public Member Functions | |
| constexpr | BigEndian ()=default |
| Creates a zero value. | |
| constexpr | BigEndian (T value) |
| Stores a host value in big-endian order. | |
| constexpr T | get () const |
| Returns the value in host byte order. | |
| constexpr | operator T () const |
| Converts to the value in host byte order. | |
Public Attributes | |
| std::array< std::uint8_t, sizeof(T)> | bytes {} |
| Value in big-endian order. | |
Unsigned integer stored as big-endian bytes, with an alignment of 1.
Structs made only of these fields never contain padding, so they can be copied byte for byte to and from the wire on any host.
| T | Unsigned integer type that is stored. |
|
inlineconstexpr |
Stores a host value in big-endian order.
| value | Value in host byte order. |
|
inlineconstexpr |
Returns the value in host byte order.