ゴミ箱
rfc7230.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9 
10 #ifndef BOOST_BEAST_HTTP_RFC7230_HPP
11 #define BOOST_BEAST_HTTP_RFC7230_HPP
12 
13 #include <boost/beast/config.hpp>
16 
17 namespace boost {
18 namespace beast {
19 namespace http {
20 
54 {
55  string_view s_;
56 
57 public:
64  using value_type =
65  std::pair<string_view, string_view>;
66 
68 #if BOOST_BEAST_DOXYGEN
69  using const_iterator = implementation_defined;
70 #else
71  class const_iterator;
72 #endif
73 
75  param_list() = default;
76 
82  explicit
84  : s_(s)
85  {
86  }
87 
89  const_iterator begin() const;
90 
92  const_iterator end() const;
93 
95  const_iterator cbegin() const;
96 
98  const_iterator cend() const;
99 };
100 
101 //------------------------------------------------------------------------------
102 
141 class ext_list
142 {
143  using iter_type = string_view::const_iterator;
144 
145  string_view s_;
146 
147 public:
154  using value_type = std::pair<string_view, param_list>;
155 
157 #if BOOST_BEAST_DOXYGEN
158  using const_iterator = implementation_defined;
159 #else
160  class const_iterator;
161 #endif
162 
168  explicit
170  : s_(s)
171  {
172  }
173 
175  const_iterator begin() const;
176 
178  const_iterator end() const;
179 
181  const_iterator cbegin() const;
182 
184  const_iterator cend() const;
185 
193  template<class T>
195  find(T const& s);
196 
201  template<class T>
202  bool
203  exists(T const& s);
204 };
205 
206 //------------------------------------------------------------------------------
207 
235 {
236  using iter_type = string_view::const_iterator;
237 
238  string_view s_;
239 
240 public:
243 
245 #if BOOST_BEAST_DOXYGEN
246  using const_iterator = implementation_defined;
247 #else
248  class const_iterator;
249 #endif
250 
256  explicit
258  : s_(s)
259  {
260  }
261 
263  const_iterator begin() const;
264 
266  const_iterator end() const;
267 
269  const_iterator cbegin() const;
270 
272  const_iterator cend() const;
273 
278  template<class T>
279  bool
280  exists(T const& s);
281 };
282 
308 using opt_token_list =
311 
318 template<class Policy>
319 bool
321  Policy> const& list);
322 
323 } // http
324 } // beast
325 } // boost
326 
328 
329 #endif
Definition: async_result.hpp:20
const_iterator begin() const
Return a const iterator to the beginning of the list.
Definition: rfc7230.ipp:102
bool validate_list(detail::basic_parsed_list< Policy > const &list)
Definition: rfc7230.ipp:549
std::pair< string_view, param_list > value_type
Definition: rfc7230.hpp:154
Definition: beast_common.hpp:6
Definition: basic_parsed_list.hpp:26
Definition: rfc7230.hpp:141
param_list(string_view s)
Definition: rfc7230.hpp:83
param_list()=default
Default constructor.
token_list(string_view s)
Definition: rfc7230.hpp:257
const_iterator end() const
Return a const iterator to the end of the list.
Definition: rfc7230.ipp:111
Definition: rfc7230.hpp:53
const_iterator cbegin() const
Return a const iterator to the beginning of the list.
Definition: rfc7230.ipp:120
boost::string_ref string_view
The type of string view used by the library.
Definition: string.hpp:36
std::pair< string_view, string_view > value_type
Definition: rfc7230.hpp:65
const_iterator cend() const
Return a const iterator to the end of the list.
Definition: rfc7230.ipp:129
ext_list(string_view s)
Definition: rfc7230.hpp:169
string_view value_type
The type of each element in the token list.
Definition: rfc7230.hpp:242
Definition: rfc7230.hpp:234