CatapultServer
v0.5.0.1 (Elephant)
|
Base class for wrappers of byte array types, to provide some type-safety. More...
Public Types | |
using | const_iterator = typename std::array< uint8_t, N >::const_iterator |
Public Member Functions | |
constexpr | ByteArray () |
Creates a zero-initialized byte array. More... | |
constexpr | ByteArray (const std::array< uint8_t, N > &array) |
Creates a byte array around array. More... | |
constexpr | ByteArray (const ByteArray &rhs) |
Creates a copy of rhs. More... | |
ByteArray & | operator= (const ByteArray &rhs) |
Assigns rhs to this. More... | |
constexpr size_t | size () const |
Returns the array size. More... | |
constexpr const uint8_t & | operator[] (size_t index) const |
Returns a const reference to the byte at index. More... | |
constexpr uint8_t & | operator[] (size_t index) |
Returns a reference to the byte at index. More... | |
constexpr const uint8_t * | data () const noexcept |
Returns a const pointer to the underlying array. More... | |
constexpr uint8_t * | data () noexcept |
Returns a pointer to the underlying array. More... | |
constexpr auto | cbegin () const noexcept |
Returns a const iterator to the first byte. More... | |
constexpr auto | cend () const noexcept |
Returns a const iterator to one past the last byte. More... | |
constexpr auto | begin () const noexcept |
Returns a const iterator to the first byte. More... | |
constexpr auto | end () const noexcept |
Returns a const iterator to one past the last byte. More... | |
constexpr auto | begin () noexcept |
Returns an iterator to the first byte. More... | |
constexpr auto | end () noexcept |
Returns an iterator to one past the last byte. More... | |
constexpr bool | operator== (const ByteArray &rhs) const |
Returns true if this value is equal to rhs. More... | |
constexpr bool | operator!= (const ByteArray &rhs) const |
Returns true if this value is not equal to rhs. More... | |
constexpr bool | operator>= (const ByteArray &rhs) const |
Returns true if this value is greater than or equal to rhs. More... | |
constexpr bool | operator> (const ByteArray &rhs) const |
Returns true if this value is greater than rhs. More... | |
constexpr bool | operator<= (const ByteArray &rhs) const |
Returns true if this value is less than or equal to rhs. More... | |
constexpr bool | operator< (const ByteArray &rhs) const |
Returns true if this value is less than rhs. More... | |
Private Attributes | |
std::array< uint8_t, N > | m_array |
Friends | |
std::ostream & | operator<< (std::ostream &out, const ByteArray &byteArray) |
Insertion operator for outputting byteArray to out. More... | |
Base class for wrappers of byte array types, to provide some type-safety.
using catapult::utils::ByteArray< N, TTag >::const_iterator = typename std::array<uint8_t, N>::const_iterator |
|
inlineconstexpr |
Creates a zero-initialized byte array.
|
inlineconstexpr |
Creates a byte array around array.
|
inlineconstexpr |
Creates a copy of rhs.
|
inlineconstexprnoexcept |
Returns a const iterator to the first byte.
|
inlineconstexprnoexcept |
Returns an iterator to the first byte.
|
inlineconstexprnoexcept |
Returns a const iterator to the first byte.
|
inlineconstexprnoexcept |
Returns a const iterator to one past the last byte.
|
inlineconstexprnoexcept |
Returns a const pointer to the underlying array.
|
inlineconstexprnoexcept |
Returns a pointer to the underlying array.
|
inlineconstexprnoexcept |
Returns a const iterator to one past the last byte.
|
inlineconstexprnoexcept |
Returns an iterator to one past the last byte.
|
inlineconstexpr |
Returns true
if this value is not equal to rhs.
|
inlineconstexpr |
Returns true
if this value is less than rhs.
|
inlineconstexpr |
Returns true
if this value is less than or equal to rhs.
|
inline |
Assigns rhs to this.
|
inlineconstexpr |
Returns true
if this value is equal to rhs.
|
inlineconstexpr |
Returns true
if this value is greater than rhs.
|
inlineconstexpr |
Returns true
if this value is greater than or equal to rhs.
|
inlineconstexpr |
Returns a reference to the byte at index.
|
inlineconstexpr |
Returns a const reference to the byte at index.
|
inlineconstexpr |
Returns the array size.
|
friend |
Insertion operator for outputting byteArray to out.
|
private |