Represents an IPv4 address.
More...
#include <ipv4_address.hpp>
|
using | value_type = std::array<std::uint8_t, value_size> |
|
|
constexpr | ipv4_address () noexcept |
| Creates an instance.
|
|
constexpr | ipv4_address (std::initializer_list< std::uint8_t > address) noexcept |
| Creates an instance from an initializer list.
|
|
constexpr | ipv4_address (std::span< const std::uint8_t, value_size > address) noexcept |
| Creates an instance from a 4-byte array.
|
|
constexpr | ipv4_address (std::uint32_t address) noexcept |
| Creates an instance from a 32-bit unsigned integer.
|
|
constexpr auto | operator<=> (const ipv4_address &) const noexcept=default |
|
constexpr | operator std::uint32_t () const noexcept |
| Converts to a 32-bit unsigned integer.
|
|
constexpr value_type & | get () noexcept |
| Gets the underlying array.
|
|
constexpr const value_type & | get () const noexcept |
| Gets the underlying array.
|
|
|
static constexpr std::size_t | value_size = 4 |
|
Represents an IPv4 address.
◆ ipv4_address() [1/3]
essence::net::ipv4_address::ipv4_address |
( |
std::initializer_list< std::uint8_t > | address | ) |
|
|
inlineconstexprnoexcept |
Creates an instance from an initializer list.
- Parameters
-
◆ ipv4_address() [2/3]
essence::net::ipv4_address::ipv4_address |
( |
std::span< const std::uint8_t, value_size > | address | ) |
|
|
inlineexplicitconstexprnoexcept |
Creates an instance from a 4-byte array.
- Parameters
-
◆ ipv4_address() [3/3]
essence::net::ipv4_address::ipv4_address |
( |
std::uint32_t | address | ) |
|
|
inlineexplicitconstexprnoexcept |
Creates an instance from a 32-bit unsigned integer.
- Parameters
-
◆ get() [1/2]
const value_type & essence::net::ipv4_address::get |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Gets the underlying array.
- Returns
- The underlying array.
◆ get() [2/2]
value_type & essence::net::ipv4_address::get |
( |
| ) |
|
|
inlinenodiscardconstexprnoexcept |
Gets the underlying array.
- Returns
- The underlying array.
The documentation for this class was generated from the following file: