Skip to content

Commit 0078272

Browse files
committed
Add forward declaration headers
1 parent 225a25b commit 0078272

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+694
-57
lines changed

include/boost/beast/http/basic_dynamic_body.hpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
#ifndef BOOST_BEAST_HTTP_BASIC_DYNAMIC_BODY_HPP
1111
#define BOOST_BEAST_HTTP_BASIC_DYNAMIC_BODY_HPP
1212

13-
#include <boost/beast/core/detail/config.hpp>
13+
#include <boost/beast/http/basic_dynamic_body_fwd.hpp>
14+
1415
#include <boost/beast/core/buffer_traits.hpp>
1516
#include <boost/beast/core/detail/buffer.hpp>
1617
#include <boost/beast/core/detail/clamp.hpp>
18+
#include <boost/beast/core/detail/config.hpp>
1719
#include <boost/beast/http/error.hpp>
1820
#include <boost/beast/http/message.hpp>
1921
#include <boost/optional.hpp>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// Copyright (c) 2024 Mohammad Nejati
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_BASIC_DYNAMIC_BODY_FWD_HPP
11+
#define BOOST_BEAST_HTTP_BASIC_DYNAMIC_BODY_FWD_HPP
12+
13+
namespace boost {
14+
namespace beast {
15+
namespace http {
16+
17+
template<class DynamicBuffer>
18+
struct basic_dynamic_body;
19+
20+
} // http
21+
} // beast
22+
} // boost
23+
24+
#endif

include/boost/beast/http/basic_file_body.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef BOOST_BEAST_HTTP_BASIC_FILE_BODY_HPP
1111
#define BOOST_BEAST_HTTP_BASIC_FILE_BODY_HPP
1212

13+
#include <boost/beast/http/basic_file_body_fwd.hpp>
14+
1315
#include <boost/beast/core/detail/config.hpp>
1416
#include <boost/beast/core/error.hpp>
1517
#include <boost/beast/core/file_base.hpp>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//
2+
// Copyright (c) 2024 Mohammad Nejati
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_BASIC_FILE_BODY_FWD_HPP
11+
#define BOOST_BEAST_HTTP_BASIC_FILE_BODY_FWD_HPP
12+
13+
namespace boost {
14+
namespace beast {
15+
namespace http {
16+
17+
template<class File>
18+
struct basic_file_body;
19+
20+
} // http
21+
} // beast
22+
} // boost
23+
24+
#endif

include/boost/beast/http/buffer_body.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
#ifndef BOOST_BEAST_HTTP_BUFFER_BODY_HPP
1111
#define BOOST_BEAST_HTTP_BUFFER_BODY_HPP
1212

13-
#include <boost/beast/core/detail/config.hpp>
13+
#include <boost/beast/http/buffer_body_fwd.hpp>
14+
1415
#include <boost/beast/core/buffer_traits.hpp>
16+
#include <boost/beast/core/detail/config.hpp>
1517
#include <boost/beast/http/error.hpp>
1618
#include <boost/beast/http/message.hpp>
1719
#include <boost/beast/http/type_traits.hpp>
1820
#include <boost/optional.hpp>
19-
2021
#include <cstdint>
21-
#include <type_traits>
2222
#include <utility>
2323

2424
namespace boost {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// Copyright (c) 2024 Mohammad Nejati
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_BUFFER_BODY_FWD_HPP
11+
#define BOOST_BEAST_HTTP_BUFFER_BODY_FWD_HPP
12+
13+
namespace boost {
14+
namespace beast {
15+
namespace http {
16+
17+
struct buffer_body;
18+
19+
} // http
20+
} // beast
21+
} // boost
22+
23+
#endif

include/boost/beast/http/detail/type_traits.hpp

+2-10
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,14 @@
1111
#define BOOST_BEAST_HTTP_DETAIL_TYPE_TRAITS_HPP
1212

1313
#include <boost/beast/core/detail/type_traits.hpp>
14+
#include <boost/beast/http/message_fwd.hpp>
15+
#include <boost/beast/http/parser_fwd.hpp>
1416
#include <boost/optional.hpp>
1517
#include <cstdint>
1618

1719
namespace boost {
1820
namespace beast {
1921
namespace http {
20-
21-
template<bool isRequest, class Fields>
22-
class header;
23-
24-
template<bool, class, class>
25-
class message;
26-
27-
template<bool isRequest, class Body, class Fields>
28-
class parser;
29-
3022
namespace detail {
3123

3224
template<class T>

include/boost/beast/http/dynamic_body.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@
1010
#ifndef BOOST_BEAST_HTTP_DYNAMIC_BODY_HPP
1111
#define BOOST_BEAST_HTTP_DYNAMIC_BODY_HPP
1212

13+
#include <boost/beast/http/dynamic_body_fwd.hpp>
14+
1315
#include <boost/beast/core/multi_buffer.hpp>
1416
#include <boost/beast/http/basic_dynamic_body.hpp>
1517

1618
namespace boost {
1719
namespace beast {
1820
namespace http {
1921

22+
#if BOOST_BEAST_DOXYGEN
2023
/** A dynamic message body represented by a @ref multi_buffer
2124
2225
Meets the requirements of <em>Body</em>.
2326
*/
2427
using dynamic_body = basic_dynamic_body<multi_buffer>;
28+
#endif
2529

2630
} // http
2731
} // beast
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//
2+
// Copyright (c) 2024 Mohammad Nejati
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_DYNAMIC_BODY_FWD_HPP
11+
#define BOOST_BEAST_HTTP_DYNAMIC_BODY_FWD_HPP
12+
13+
#include <boost/beast/http/basic_dynamic_body_fwd.hpp>
14+
15+
#include <memory>
16+
17+
namespace boost {
18+
namespace beast {
19+
20+
#ifndef BOOST_BEAST_DOXYGEN
21+
template<class Allocator>
22+
class basic_multi_buffer;
23+
24+
using multi_buffer = basic_multi_buffer<std::allocator<char>>;
25+
#endif
26+
27+
namespace http {
28+
29+
#ifndef BOOST_BEAST_DOXYGEN
30+
using dynamic_body = basic_dynamic_body<multi_buffer>;
31+
#endif
32+
33+
} // http
34+
} // beast
35+
} // boost
36+
37+
#endif

include/boost/beast/http/empty_body.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef BOOST_BEAST_HTTP_EMPTY_BODY_HPP
1111
#define BOOST_BEAST_HTTP_EMPTY_BODY_HPP
1212

13+
#include <boost/beast/http/empty_body_fwd.hpp>
14+
1315
#include <boost/beast/core/detail/config.hpp>
1416
#include <boost/beast/http/error.hpp>
1517
#include <boost/beast/http/message.hpp>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// Copyright (c) 2024 Mohammad Nejati
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_EMPTY_BODY_FWD_HPP
11+
#define BOOST_BEAST_HTTP_EMPTY_BODY_FWD_HPP
12+
13+
namespace boost {
14+
namespace beast {
15+
namespace http {
16+
17+
struct empty_body;
18+
19+
} // http
20+
} // beast
21+
} // boost
22+
23+
#endif

include/boost/beast/http/fields.hpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef BOOST_BEAST_HTTP_FIELDS_HPP
1111
#define BOOST_BEAST_HTTP_FIELDS_HPP
1212

13+
#include <boost/beast/http/fields_fwd.hpp>
14+
1315
#include <boost/beast/core/detail/allocator.hpp>
1416
#include <boost/beast/core/detail/config.hpp>
1517
#include <boost/beast/core/error.hpp>
@@ -20,11 +22,9 @@
2022
#include <boost/intrusive/list.hpp>
2123
#include <boost/intrusive/set.hpp>
2224
#include <boost/optional.hpp>
23-
#include <algorithm>
2425
#include <cctype>
2526
#include <cstring>
2627
#include <memory>
27-
#include <string>
2828
#include <type_traits>
2929
#include <utility>
3030

@@ -864,8 +864,10 @@ class basic_fields
864864
string_view target_or_reason_;
865865
};
866866

867+
#if BOOST_BEAST_DOXYGEN
867868
/// A typical HTTP header fields container
868869
using fields = basic_fields<std::allocator<char>>;
870+
#endif
869871

870872
} // http
871873
} // beast
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//
2+
// Copyright (c) 2024 Mohammad Nejati
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_FIELDS_FWD_HPP
11+
#define BOOST_BEAST_HTTP_FIELDS_FWD_HPP
12+
13+
#include <memory>
14+
15+
namespace boost {
16+
namespace beast {
17+
namespace http {
18+
19+
template<class Allocator>
20+
class basic_fields;
21+
22+
#ifndef BOOST_BEAST_DOXYGEN
23+
using fields = basic_fields<std::allocator<char>>;
24+
#endif
25+
26+
} // http
27+
} // beast
28+
} // boost
29+
30+
#endif

include/boost/beast/http/file_body.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@
1010
#ifndef BOOST_BEAST_HTTP_FILE_BODY_HPP
1111
#define BOOST_BEAST_HTTP_FILE_BODY_HPP
1212

13+
#include <boost/beast/http/file_body_fwd.hpp>
14+
1315
#include <boost/beast/core/file.hpp>
1416
#include <boost/beast/http/basic_file_body.hpp>
1517
#include <boost/assert.hpp>
1618
#include <boost/optional.hpp>
17-
#include <algorithm>
1819
#include <cstdio>
19-
#include <cstdint>
20-
#include <utility>
2120

2221
namespace boost {
2322
namespace beast {
2423
namespace http {
2524

25+
#if BOOST_BEAST_DOXYGEN
2626
/// A message body represented by a file on the filesystem.
2727
using file_body = basic_file_body<file>;
28+
#endif
2829

2930
} // http
3031
} // beast
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//
2+
// Copyright (c) 2024 Mohammad Nejati
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_FILE_BODY_FWD_HPP
11+
#define BOOST_BEAST_HTTP_FILE_BODY_FWD_HPP
12+
13+
#include <boost/beast/http/basic_file_body_fwd.hpp>
14+
15+
#include <boost/beast/core/file.hpp>
16+
17+
namespace boost {
18+
namespace beast {
19+
namespace http {
20+
21+
#ifndef BOOST_BEAST_DOXYGEN
22+
using file_body = basic_file_body<file>;
23+
#endif
24+
25+
} // http
26+
} // beast
27+
} // boost
28+
29+
#endif

0 commit comments

Comments
 (0)