Realistic 3D camera system
3D camera system components
resolver_query_base.hpp
Go to the documentation of this file.
1 //
2 // ip/resolver_query_base.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef ASIO_IP_RESOLVER_QUERY_BASE_HPP
12 #define ASIO_IP_RESOLVER_QUERY_BASE_HPP
13 
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17 
18 #include "asio/detail/config.hpp"
20 
22 
23 namespace asio {
24 namespace ip {
25 
30 {
31 public:
32 #if defined(GENERATING_DOCUMENTATION)
33  typedef unspecified flags;
35 
37  static const flags canonical_name = implementation_defined;
38 
41  static const flags passive = implementation_defined;
42 
45  static const flags numeric_host = implementation_defined;
46 
49  static const flags numeric_service = implementation_defined;
50 
53  static const flags v4_mapped = implementation_defined;
54 
56  static const flags all_matching = implementation_defined;
57 
61  static const flags address_configured = implementation_defined;
62 #else
63  enum flags
64  {
65  canonical_name = ASIO_OS_DEF(AI_CANONNAME),
66  passive = ASIO_OS_DEF(AI_PASSIVE),
67  numeric_host = ASIO_OS_DEF(AI_NUMERICHOST),
68  numeric_service = ASIO_OS_DEF(AI_NUMERICSERV),
69  v4_mapped = ASIO_OS_DEF(AI_V4MAPPED),
70  all_matching = ASIO_OS_DEF(AI_ALL),
71  address_configured = ASIO_OS_DEF(AI_ADDRCONFIG)
72  };
73 
74  // Implement bitmask operations as shown in C++ Std [lib.bitmask.types].
75 
76  friend flags operator&(flags x, flags y)
77  {
78  return static_cast<flags>(
79  static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
80  }
81 
82  friend flags operator|(flags x, flags y)
83  {
84  return static_cast<flags>(
85  static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
86  }
87 
88  friend flags operator^(flags x, flags y)
89  {
90  return static_cast<flags>(
91  static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
92  }
93 
94  friend flags operator~(flags x)
95  {
96  return static_cast<flags>(~static_cast<unsigned int>(x));
97  }
98 
99  friend flags& operator&=(flags& x, flags y)
100  {
101  x = x & y;
102  return x;
103  }
104 
105  friend flags& operator|=(flags& x, flags y)
106  {
107  x = x | y;
108  return x;
109  }
110 
111  friend flags& operator^=(flags& x, flags y)
112  {
113  x = x ^ y;
114  return x;
115  }
116 #endif
117 
118 protected:
121  {
122  }
123 };
124 
125 } // namespace ip
126 } // namespace asio
127 
129 
130 #endif // ASIO_IP_RESOLVER_QUERY_BASE_HPP
#define ASIO_OS_DEF(c)
friend flags operator|(flags x, flags y)
friend flags operator^(flags x, flags y)
friend flags & operator^=(flags &x, flags y)
friend flags & operator&=(flags &x, flags y)
~resolver_query_base()
Protected destructor to prevent deletion through this type.
friend flags operator&(flags x, flags y)
friend flags & operator|=(flags &x, flags y)