24 ipv4_part1(p1), ipv4_part2(p2), ipv4_part3(p3), ipv4_part4(p4)
32 return std::to_string(
static_cast<int>(ipv4_part1)) +
"." +
33 std::to_string(
static_cast<int>(ipv4_part2)) +
"." +
34 std::to_string(
static_cast<int>(ipv4_part3)) +
"." +
35 std::to_string(
static_cast<int>(ipv4_part4));
41 return ipv4 == rhs.ipv4;
47 return ipv4 > rhs.ipv4;
53 return ipv4 < rhs.ipv4;
59 ipv4_Address newAdr(adr.ipv4_part1, adr.ipv4_part2, adr.ipv4_part3, adr.ipv4_part4);
82 ipv4_part1 =
static_cast<uint8_t
>(ipv4 >> 24);
83 ipv4_part2 =
static_cast<uint8_t
>(ipv4 >> 16);
84 ipv4_part3 =
static_cast<uint8_t
>(ipv4 >> 8);
85 ipv4_part4 =
static_cast<uint8_t
>(ipv4);
91 ipv4 = (
static_cast<uint32_t
>(ipv4_part1) << 24) +
92 (
static_cast<uint32_t
>(ipv4_part2) << 16) +
93 (
static_cast<uint32_t
>(ipv4_part3) << 8) +
static_cast<uint32_t
>(ipv4_part4);
98 public std::iterator<std::input_iterator_tag,
122 return !(start == other.start);
128 return start == other.start;
159 if (startAddress == endAddress)
161 throw std::invalid_argument(
"start and end are equal");
163 if (startAddress > endAddress)
171 startAddress = endAddress;
bool operator>(const ipv4_Address &rhs) const
std::string toString() const
ipv4_Address(uint8_t p1, uint8_t p2, uint8_t p3, uint8_t p4)
bool operator<(const ipv4_Address &rhs) const
ipv4_Address operator++(int)
ipv4_Address operator=(ipv4_Address &adr)
bool operator==(const ipv4_Address &rhs) const
iterator(ipv4_Address startAdr)
reference operator*() const
bool operator!=(iterator other) const
bool operator==(iterator other) const
ipv4_Range(ipv4_Address start, ipv4_Address end)