A thin wrapper around std::unordered_map<Ipv6Address,T,Hash>. More...
#include <DwmIpv6AddrMap.hh>
Public Member Functions | |
| void | Add (const Ipv6Address &addr, const T &value) |
| void | Add (std::unique_lock< std::shared_mutex > &lck, const Ipv6Address &addr, const T &value) |
| bool | Find (const Ipv6Address &addr, T &value) const |
| bool | Find (std::shared_lock< std::shared_mutex > &lck, const Ipv6Address &addr, T &value) const |
| bool | Find (std::unique_lock< std::shared_mutex > &lck, const Ipv6Address &addr, T &value) const |
| bool | Remove (const Ipv6Address &addr) |
| bool | Remove (std::unique_lock< std::shared_mutex > &lck, const Ipv6Address &addr) |
| bool | Empty () const |
| bool | Empty (std::shared_lock< std::shared_mutex > &lck) const |
| bool | Empty (std::unique_lock< std::shared_mutex > &lck) const |
| void | Clear () |
| void | Clear (std::unique_lock< std::shared_mutex > &lck) |
| std::istream & | Read (std::istream &is) |
| Reads the Ipv6AddrMap from an istream. Returns the istream. | |
| std::ostream & | Write (std::ostream &os) const |
| Writes the Ipv6AddrMap to an ostream. Returns the ostream. | |
| size_t | Read (FILE *f) |
Reads the Ipv6AddrMap from f. | |
| size_t | Write (FILE *f) const |
Writes the Ipv6AddrMap to f. | |
| ssize_t | Read (int fd) |
Reads the Ipv6AddrMap from file descriptor fd. | |
| ssize_t | Write (int fd) const |
Writes the Ipv6AddrMap to file descriptor fd. | |
| int | Read (gzFile gzf) |
Reads the Ipv6AddrMap from gzf. | |
| int | Write (gzFile gzf) const |
Writes the Ipv6AddrMap to gzf. | |
| int | BZRead (BZFILE *bzf) |
Reads the Ipv6AddrMap from bzf. | |
| int | BZWrite (BZFILE *bzf) const |
Writes the Ipv6AddrMap to bzf. | |
| uint64_t | StreamedLength () const |
| Returns the number of bytes that would be written if the Ipv6AddrMap was written to a FILE, file descriptor or ostream. | |
| bool | Read (boost::asio::ip::tcp::socket &s, boost::system::error_code &ec) |
Reads the Ipv6AddrMap from s. | |
| bool | Write (boost::asio::ip::tcp::socket &s, boost::system::error_code &ec) const |
Writes the Ipv6AddrMap to s. | |
| bool | Read (boost::asio::local::stream_protocol::socket &s, boost::system::error_code &ec) |
Reads the Ipv6AddrMap from s. | |
| bool | Write (boost::asio::local::stream_protocol::socket &s, boost::system::error_code &ec) const |
Writes the Ipv6AddrMap to s. | |
| bool | Read (boost::asio::generic::stream_protocol::socket &s, boost::system::error_code &ec) |
Reads the Ipv6AddrMap from s. | |
| bool | Write (boost::asio::generic::stream_protocol::socket &s, boost::system::error_code &ec) const |
Writes the Ipv6AddrMap to s. | |
| std::shared_lock< std::shared_mutex > | SharedLock () const |
| std::unique_lock< std::shared_mutex > | UniqueLock () |
A thin wrapper around std::unordered_map<Ipv6Address,T,Hash>.
Mainly provides thread safety (shared and unique locks).
|
inline |
Reads the Ipv6AddrMap from bzf.
Returns the number of bytes read on success, -1 on failure. Be wary; the integer return is risky (could overflow) but it's what bzlib's BZ2_bzRead() returns and we trickled up the return type.

|
inline |
Writes the Ipv6AddrMap to bzf.
Returns the number of bytes written on success, -1 on failure. Be wary; the integer return is risky (could overflow) but it's what bzlib's BZ2_bzWrite() returns and we trickled up the return type.

|
inline |
Reads the Ipv6AddrMap from s.
Returns true on success, false on failure.

|
inline |
Reads the Ipv6AddrMap from s.
Returns true on success, false on failure.

|
inline |
Reads the Ipv6AddrMap from s.
Returns true on success, false on failure.

|
inline |
Reads the Ipv6AddrMap from f.
Returns 1 on success, 0 on failure.

|
inline |
Reads the Ipv6AddrMap from gzf.
Returns the number of bytes read on success, -1 on failure. Be wary; the integer return is risky (could overflow) but it's what zlib's gzread() returns and we trickled up the return type.

|
inline |
Reads the Ipv6AddrMap from file descriptor fd.
Returns the number of bytes read on success, -1 on failure.

|
inline |
Writes the Ipv6AddrMap to s.
Returns true on success, false on failure.

|
inline |
Writes the Ipv6AddrMap to s.
Returns true on success, false on failure.

|
inline |
Writes the Ipv6AddrMap to s.
Returns true on success, false on failure.

|
inline |
Writes the Ipv6AddrMap to f.
Returns 1 on success, 0 on failure.

|
inline |
Writes the Ipv6AddrMap to gzf.
Returns the number of bytes written on success, -1 on failure. Be wary; the integer return is risky (could overflow) but it's what zlib's gzwrite() returns and we trickled up the return type.

|
inline |
Writes the Ipv6AddrMap to file descriptor fd.
Returns the number of bytes written on success, -1 on failure.
