Warning, file /include/boost/asio/cancellation_type.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_CANCELLATION_TYPE_HPP
0012 #define BOOST_ASIO_CANCELLATION_TYPE_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019
0020 #include <boost/asio/detail/push_options.hpp>
0021
0022 namespace boost {
0023 namespace asio {
0024
0025 # if defined(GENERATING_DOCUMENTATION)
0026
0027
0028
0029 enum cancellation_type
0030 {
0031
0032 none = 0,
0033
0034
0035
0036 terminal = 1,
0037
0038
0039
0040
0041 partial = 2,
0042
0043
0044
0045
0046 total = 4,
0047
0048
0049 all = 0xFFFFFFFF
0050 };
0051
0052
0053 typedef cancellation_type cancellation_type_t;
0054
0055 #else
0056
0057 enum class cancellation_type : unsigned int
0058 {
0059 none = 0,
0060 terminal = 1,
0061 partial = 2,
0062 total = 4,
0063 all = 0xFFFFFFFF
0064 };
0065
0066 typedef cancellation_type cancellation_type_t;
0067
0068 #endif
0069
0070
0071
0072
0073
0074 inline constexpr bool operator!(cancellation_type_t x)
0075 {
0076 return static_cast<unsigned int>(x) == 0;
0077 }
0078
0079
0080
0081
0082
0083 inline constexpr cancellation_type_t operator&(
0084 cancellation_type_t x, cancellation_type_t y)
0085 {
0086 return static_cast<cancellation_type_t>(
0087 static_cast<unsigned int>(x) & static_cast<unsigned int>(y));
0088 }
0089
0090
0091
0092
0093
0094 inline constexpr cancellation_type_t operator|(
0095 cancellation_type_t x, cancellation_type_t y)
0096 {
0097 return static_cast<cancellation_type_t>(
0098 static_cast<unsigned int>(x) | static_cast<unsigned int>(y));
0099 }
0100
0101
0102
0103
0104
0105 inline constexpr cancellation_type_t operator^(
0106 cancellation_type_t x, cancellation_type_t y)
0107 {
0108 return static_cast<cancellation_type_t>(
0109 static_cast<unsigned int>(x) ^ static_cast<unsigned int>(y));
0110 }
0111
0112
0113
0114
0115
0116 inline constexpr cancellation_type_t operator~(cancellation_type_t x)
0117 {
0118 return static_cast<cancellation_type_t>(~static_cast<unsigned int>(x));
0119 }
0120
0121
0122
0123
0124
0125 inline cancellation_type_t& operator&=(
0126 cancellation_type_t& x, cancellation_type_t y)
0127 {
0128 x = x & y;
0129 return x;
0130 }
0131
0132
0133
0134
0135
0136 inline cancellation_type_t& operator|=(
0137 cancellation_type_t& x, cancellation_type_t y)
0138 {
0139 x = x | y;
0140 return x;
0141 }
0142
0143
0144
0145
0146
0147 inline cancellation_type_t& operator^=(
0148 cancellation_type_t& x, cancellation_type_t y)
0149 {
0150 x = x ^ y;
0151 return x;
0152 }
0153
0154 }
0155 }
0156
0157 #include <boost/asio/detail/pop_options.hpp>
0158
0159 #endif