|
jaulib v1.5.0
Jau Support Library (C++, Java, ..)
|
Transient read only and endian aware octet data, i.e. More...
#include <octets.hpp>
Public Member Functions | |
| TROOctets () noexcept | |
| Default constructor with nullptr memory, zero size and lb_endian::native byte order. | |
| TROOctets (const TROOctets &o) noexcept=default | |
| TROOctets (const uint8_t *source, const nsize_t len, const lb_endian_t byte_order_val) noexcept | |
| Transient passthrough read-only memory, w/o ownership . | |
| TROOctets (TROOctets &&o) noexcept=default | |
| virtual | ~TROOctets () noexcept=default |
| constexpr lb_endian_t | byte_order () const noexcept |
| Returns byte order of this octet store. | |
| void | check_range (const nsize_t i, const nsize_t count, const char *file, int line) const |
| jau::io::net::EUI48 | get_eui48 (const nsize_t i) const |
| jau::io::net::EUI48 | get_eui48_nc (const nsize_t i) const noexcept |
| int8_t | get_int8 (const nsize_t i) const |
| constexpr int8_t | get_int8_nc (const nsize_t i) const noexcept |
| constexpr uint8_t const * | get_ptr () const noexcept |
| uint8_t const * | get_ptr (const nsize_t i) const |
| constexpr uint8_t const * | get_ptr_nc (const nsize_t i) const noexcept |
| std::string | get_string (const nsize_t i) const |
| Assumes a null terminated string. | |
| std::string | get_string (const nsize_t i, const nsize_t length) const |
| Assumes a string with defined length, not necessarily null terminated. | |
| std::string | get_string_nc (const nsize_t i) const noexcept |
| Assumes a null terminated string. | |
| uint128dp_t | get_uint128 (const nsize_t i) const |
| constexpr uint128dp_t | get_uint128_nc (const nsize_t i) const noexcept |
| uint16_t | get_uint16 (const nsize_t i) const |
| constexpr uint16_t | get_uint16_nc (const nsize_t i) const noexcept |
| uint192dp_t | get_uint192 (const nsize_t i) const |
| constexpr uint192dp_t | get_uint192_nc (const nsize_t i) const noexcept |
| uint256dp_t | get_uint256 (const nsize_t i) const |
| constexpr uint256dp_t | get_uint256_nc (const nsize_t i) const noexcept |
| uint32_t | get_uint32 (const nsize_t i) const |
| constexpr uint32_t | get_uint32_nc (const nsize_t i) const noexcept |
| uint64_t | get_uint64 (const nsize_t i) const |
| constexpr uint64_t | get_uint64_nc (const nsize_t i) const noexcept |
| uint8_t | get_uint8 (const nsize_t i) const |
| constexpr uint8_t | get_uint8_nc (const nsize_t i) const noexcept |
| std::unique_ptr< const uuid_t > | get_uuid (const nsize_t i, const uuid_t::TypeSize tsize) const |
| uuid128_t | get_uuid128 (const nsize_t i) const |
| uuid128_t | get_uuid128_nc (const nsize_t i) const noexcept |
| uuid16_t | get_uuid16 (const nsize_t i) const |
| uuid16_t | get_uuid16_nc (const nsize_t i) const noexcept |
| constexpr bool | is_range_valid (const nsize_t i, const nsize_t count) const noexcept |
| bool | operator!= (const TROOctets &rhs) const noexcept |
| TROOctets & | operator= (const TROOctets &o) noexcept=default |
| TROOctets & | operator= (TROOctets &&o) noexcept=default |
| bool | operator== (const TROOctets &rhs) const noexcept |
| constexpr nsize_t | size () const noexcept |
| Returns the used memory size for read and write operations, may be zero. | |
| std::string | toString () const noexcept |
Protected Member Functions | |
| constexpr uint8_t * | data () noexcept |
| void | setData (uint8_t *data_, nsize_t size_, const lb_endian_t byte_order) noexcept |
| Internally sets the _size and _data fields after validation. | |
| constexpr void | setSize (nsize_t s) noexcept |
Static Protected Member Functions | |
| static void | checkPtr (uint8_t *data_, nsize_t size_) noexcept |
| Validates the given data_ and size_. | |
Transient read only and endian aware octet data, i.e.
non persistent passthrough, owned by caller.
Endian byte order is passed at construction.
Constructor and assignment operations are noexcept. In case invalid arguments are passed, abort() is being called. This is a design choice based on reusing already existing underlying resources.
Definition at line 64 of file octets.hpp.
|
inlinenoexcept |
Transient passthrough read-only memory, w/o ownership .
Aborts if source is nullptr and len > 0.
| source | a non nullptr memory, otherwise throws exception. Actual capacity known by owner. |
| len | readable size of the memory, may be zero |
| byte_order | lb_endian::little or lb_endian::big byte order, one may pass lb_endian::native. |
Definition at line 121 of file octets.hpp.
|
inlinenoexcept |
Default constructor with nullptr memory, zero size and lb_endian::native byte order.
Conveniently exists to allow instantiation of variables intended for later assignment.
Definition at line 134 of file octets.hpp.
|
defaultnoexcept |
|
defaultnoexcept |
|
virtualdefaultnoexcept |
|
inlinestaticprotectednoexcept |
Validates the given data_ and size_.
Aborts if data_ is nullptr and size_ > 0.
| data_ | a memory pointer |
| size_ | claimed memory size |
Definition at line 83 of file octets.hpp.
|
inlineconstexprprotectednoexcept |
Definition at line 90 of file octets.hpp.
|
inlineprotectednoexcept |
Internally sets the _size and _data fields after validation.
Aborts if data_ is nullptr and size_ > 0.
| data_ | a memory pointer |
| size_ | used memory size |
| byte_order | lb_endian::little or lb_endian::big byte order, one may pass lb_endian::native. |
Definition at line 101 of file octets.hpp.
|
inlineconstexprprotectednoexcept |
|
inlineconstexprnoexcept |
Definition at line 152 of file octets.hpp.
|
inlineconstexprnoexcept |
Returns byte order of this octet store.
Definition at line 157 of file octets.hpp.
|
inlineconstexprnoexcept |
Returns the used memory size for read and write operations, may be zero.
Definition at line 160 of file octets.hpp.
|
inline |
Definition at line 162 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 166 of file octets.hpp.
|
inline |
Definition at line 170 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 174 of file octets.hpp.
|
inline |
|
inlineconstexprnoexcept |
|
inline |
Definition at line 186 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 190 of file octets.hpp.
|
inline |
Definition at line 194 of file octets.hpp.
|
inlinenoexcept |
Definition at line 198 of file octets.hpp.
|
inline |
Definition at line 202 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 206 of file octets.hpp.
|
inline |
Definition at line 210 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 214 of file octets.hpp.
|
inline |
Definition at line 218 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 222 of file octets.hpp.
|
inline |
Definition at line 226 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 230 of file octets.hpp.
|
inline |
Assumes a null terminated string.
Definition at line 235 of file octets.hpp.
|
inlinenoexcept |
Assumes a null terminated string.
Definition at line 240 of file octets.hpp.
Assumes a string with defined length, not necessarily null terminated.
Definition at line 245 of file octets.hpp.
Definition at line 250 of file octets.hpp.
Definition at line 253 of file octets.hpp.
Definition at line 257 of file octets.hpp.
Definition at line 261 of file octets.hpp.
|
inline |
Definition at line 265 of file octets.hpp.
|
inlineconstexprnoexcept |
|
inline |
Definition at line 271 of file octets.hpp.
|
inlineconstexprnoexcept |
Definition at line 275 of file octets.hpp.
|
inlinenoexcept |
Definition at line 279 of file octets.hpp.
|
inlinenoexcept |
Definition at line 282 of file octets.hpp.
|
inlinenoexcept |
Definition at line 286 of file octets.hpp.