diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-08-13 10:29:39 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-08-13 10:29:39 +0200 |
commit | a5c50a4f262f0a880734623f79d4dc2f1aa8a0a2 (patch) | |
tree | 1772ef47d98a68245c3d04d95637e5b9c1040904 /lib/asio/ip/address_v4_range.hpp | |
parent | 69aba72f0883c5effb5c3c2991d0c5257deb7409 (diff) | |
download | dabmod-a5c50a4f262f0a880734623f79d4dc2f1aa8a0a2.tar.gz dabmod-a5c50a4f262f0a880734623f79d4dc2f1aa8a0a2.tar.bz2 dabmod-a5c50a4f262f0a880734623f79d4dc2f1aa8a0a2.zip |
Pull in files from odr-mmbtools-common
Replace ASIO by simpler implementation, meaning that the telnet
RC now only supports a single connection.
Move Log, RC to lib/
Diffstat (limited to 'lib/asio/ip/address_v4_range.hpp')
-rw-r--r-- | lib/asio/ip/address_v4_range.hpp | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/lib/asio/ip/address_v4_range.hpp b/lib/asio/ip/address_v4_range.hpp deleted file mode 100644 index a402842..0000000 --- a/lib/asio/ip/address_v4_range.hpp +++ /dev/null @@ -1,134 +0,0 @@ -// -// ip/address_v4_range.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com) -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// - -#ifndef ASIO_IP_ADDRESS_V4_RANGE_HPP -#define ASIO_IP_ADDRESS_V4_RANGE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include "asio/detail/config.hpp" -#include "asio/ip/address_v4_iterator.hpp" - -#include "asio/detail/push_options.hpp" - -namespace asio { -namespace ip { - -template <typename> class basic_address_range; - -/// Represents a range of IPv4 addresses. -/** - * @par Thread Safety - * @e Distinct @e objects: Safe.@n - * @e Shared @e objects: Unsafe. - */ -template <> class basic_address_range<address_v4> -{ -public: - /// The type of an iterator that points into the range. - typedef basic_address_iterator<address_v4> iterator; - - /// Construct an empty range. - basic_address_range() ASIO_NOEXCEPT - : begin_(address_v4()), - end_(address_v4()) - { - } - - /// Construct an range that represents the given range of addresses. - explicit basic_address_range(const iterator& first, - const iterator& last) ASIO_NOEXCEPT - : begin_(first), - end_(last) - { - } - - /// Copy constructor. - basic_address_range(const basic_address_range& other) ASIO_NOEXCEPT - : begin_(other.begin_), - end_(other.end_) - { - } - -#if defined(ASIO_HAS_MOVE) - /// Move constructor. - basic_address_range(basic_address_range&& other) ASIO_NOEXCEPT - : begin_(ASIO_MOVE_CAST(iterator)(other.begin_)), - end_(ASIO_MOVE_CAST(iterator)(other.end_)) - { - } -#endif // defined(ASIO_HAS_MOVE) - - /// Assignment operator. - basic_address_range& operator=( - const basic_address_range& other) ASIO_NOEXCEPT - { - begin_ = other.begin_; - end_ = other.end_; - return *this; - } - -#if defined(ASIO_HAS_MOVE) - /// Move assignment operator. - basic_address_range& operator=( - basic_address_range&& other) ASIO_NOEXCEPT - { - begin_ = ASIO_MOVE_CAST(iterator)(other.begin_); - end_ = ASIO_MOVE_CAST(iterator)(other.end_); - return *this; - } -#endif // defined(ASIO_HAS_MOVE) - - /// Obtain an iterator that points to the start of the range. - iterator begin() const ASIO_NOEXCEPT - { - return begin_; - } - - /// Obtain an iterator that points to the end of the range. - iterator end() const ASIO_NOEXCEPT - { - return end_; - } - - /// Determine whether the range is empty. - bool empty() const ASIO_NOEXCEPT - { - return size() == 0; - } - - /// Return the size of the range. - std::size_t size() const ASIO_NOEXCEPT - { - return end_->to_uint() - begin_->to_uint(); - } - - /// Find an address in the range. - iterator find(const address_v4& addr) const ASIO_NOEXCEPT - { - return addr >= *begin_ && addr < *end_ ? iterator(addr) : end_; - } - -private: - iterator begin_; - iterator end_; -}; - -/// Represents a range of IPv4 addresses. -typedef basic_address_range<address_v4> address_v4_range; - -} // namespace ip -} // namespace asio - -#include "asio/detail/pop_options.hpp" - -#endif // ASIO_IP_ADDRESS_V4_RANGE_HPP |