File indexing completed on 2025-01-18 09:29:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_IP_RESOLVER_BASE_HPP
0012 #define BOOST_ASIO_IP_RESOLVER_BASE_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/asio/detail/socket_types.hpp>
0020
0021 #include <boost/asio/detail/push_options.hpp>
0022
0023 namespace boost {
0024 namespace asio {
0025 namespace ip {
0026
0027
0028
0029 class resolver_base
0030 {
0031 public:
0032 #if defined(GENERATING_DOCUMENTATION)
0033
0034 typedef unspecified flags;
0035
0036
0037 static const flags canonical_name = implementation_defined;
0038
0039
0040
0041 static const flags passive = implementation_defined;
0042
0043
0044
0045 static const flags numeric_host = implementation_defined;
0046
0047
0048
0049 static const flags numeric_service = implementation_defined;
0050
0051
0052
0053 static const flags v4_mapped = implementation_defined;
0054
0055
0056 static const flags all_matching = implementation_defined;
0057
0058
0059
0060
0061 static const flags address_configured = implementation_defined;
0062 #else
0063 enum flags
0064 {
0065 canonical_name = BOOST_ASIO_OS_DEF(AI_CANONNAME),
0066 passive = BOOST_ASIO_OS_DEF(AI_PASSIVE),
0067 numeric_host = BOOST_ASIO_OS_DEF(AI_NUMERICHOST),
0068 numeric_service = BOOST_ASIO_OS_DEF(AI_NUMERICSERV),
0069 v4_mapped = BOOST_ASIO_OS_DEF(AI_V4MAPPED),
0070 all_matching = BOOST_ASIO_OS_DEF(AI_ALL),
0071 address_configured = BOOST_ASIO_OS_DEF(AI_ADDRCONFIG)
0072 };
0073
0074
0075
0076 friend flags operator&(flags x, flags y)
0077 {
0078 return static_cast<flags>(
0079 static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
0080 }
0081
0082 friend flags operator|(flags x, flags y)
0083 {
0084 return static_cast<flags>(
0085 static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
0086 }
0087
0088 friend flags operator^(flags x, flags y)
0089 {
0090 return static_cast<flags>(
0091 static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
0092 }
0093
0094 friend flags operator~(flags x)
0095 {
0096 return static_cast<flags>(~static_cast<unsigned int>(x));
0097 }
0098
0099 friend flags& operator&=(flags& x, flags y)
0100 {
0101 x = x & y;
0102 return x;
0103 }
0104
0105 friend flags& operator|=(flags& x, flags y)
0106 {
0107 x = x | y;
0108 return x;
0109 }
0110
0111 friend flags& operator^=(flags& x, flags y)
0112 {
0113 x = x ^ y;
0114 return x;
0115 }
0116 #endif
0117
0118 protected:
0119
0120 ~resolver_base()
0121 {
0122 }
0123 };
0124
0125 }
0126 }
0127 }
0128
0129 #include <boost/asio/detail/pop_options.hpp>
0130
0131 #endif