![]() |
Kea 3.0.0
|
Manages a unique list of IP addresses. More...
#include <lease_query_impl.h>
Public Member Functions | |
| AddressList (uint16_t family) | |
| Constructor. | |
| bool | contains (const isc::asiolink::IOAddress &address) const |
| Checks if an address is present in the list. | |
| uint16_t | getFamily () |
| Returns the protocol family of the address list. | |
| void | insert (const isc::asiolink::IOAddress &address) |
| Inserts an address into the list. | |
| size_t | size () const |
| Returns the number of addresses in the list. | |
Manages a unique list of IP addresses.
Definition at line 37 of file lease_query_impl.h.
|
inline |
Constructor.
| family | protocol family of the list (AF_INET or AF_INET6) |
Definition at line 42 of file lease_query_impl.h.
| bool AddressList::contains | ( | const isc::asiolink::IOAddress & | address | ) | const |
Checks if an address is present in the list.
| address | address for which to search |
| BadValue | if the address's family does not match the list's family. |
Definition at line 30 of file lease_query_impl.cc.
References isc::asiolink::IOAddress::getFamily(), and isc_throw.
Referenced by insert().
|
inline |
Returns the protocol family of the address list.
Definition at line 68 of file lease_query_impl.h.
| void AddressList::insert | ( | const isc::asiolink::IOAddress & | address | ) |
Inserts an address into the list.
Adds the given address to the list.
| address | address to add |
| BadValue | if the address's family does not match the list's family or the address is already in the list. |
Definition at line 19 of file lease_query_impl.cc.
References contains(), and isc_throw.
|
inline |
Returns the number of addresses in the list.
Definition at line 63 of file lease_query_impl.h.