View on GitHub
jbson
C++11/1y BSON library
document_fwd.hpp
1 // Copyright Christian Manning 2013.
2 // Distributed under the Boost Software License, Version 1.0.
3 // (See accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 
6 #ifndef JBSON_DOCUMENT_FWD_HPP
7 #define JBSON_DOCUMENT_FWD_HPP
8 
9 #include <vector>
10 
11 #include "detail/config.hpp"
12 
13 JBSON_PUSH_DISABLE_DOCUMENTATION_WARNING
14 #include <boost/range/iterator_range.hpp>
15 JBSON_CLANG_POP_WARNINGS
16 
17 namespace jbson {
18 
22 template <class Container, class ElementContainer = boost::iterator_range<typename Container::const_iterator>>
23 class basic_document;
27 template <class Container, class ElementContainer = boost::iterator_range<typename Container::const_iterator>>
28 class basic_array;
29 
38 
39 struct builder;
40 struct array_builder;
41 
43 
44 namespace detail {
45 
49 template <typename> struct is_document : std::false_type {};
50 
51 #ifndef DOXYGEN_SHOULD_SKIP_THIS
52 
53 template <typename Container, typename ElementContainer>
54 struct is_document<basic_document<Container, ElementContainer>> : std::true_type {};
55 
56 template <typename Container, typename ElementContainer>
57 struct is_document<basic_array<Container, ElementContainer>> : std::true_type {};
58 
59 #endif // DOXYGEN_SHOULD_SKIP_THIS
60 
61 } // namespace detail
62 } // namespace jbson
63 
64 #endif // JBSON_DOCUMENT_FWD_HPP
array_builder provides a simple interface for array construction
Definition: builder.hpp:189
Type trait to determine whether a type is a basic_document (or basic_array)
BSON document.
Definition: document.hpp:191
BSON array.
Definition: document.hpp:534
Exception thrown when an document's data size differs from that reported.
Definition: document.hpp:32
builder provides a simple interface for document construction.
Definition: builder.hpp:44