1/* Copyright 2003-2013 Joaquin M Lopez Munoz.
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 * See http://www.boost.org/libs/multi_index for library home page.
7 */
8
9#ifndef BOOST_MULTI_INDEX_FWD_HPP
10#define BOOST_MULTI_INDEX_FWD_HPP
11
12#if defined(_MSC_VER)
13#pragma once
14#endif
15
16#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17#include <boost/multi_index/identity.hpp>
18#include <boost/multi_index/indexed_by.hpp>
19#include <boost/multi_index/ordered_index_fwd.hpp>
20#include <memory>
21
22namespace boost{
23
24namespace multi_index{
25
26/* Default value for IndexSpecifierList specifies a container
27 * equivalent to std::set<Value>.
28 */
29
30template<
31 typename Value,
32 typename IndexSpecifierList=indexed_by<ordered_unique<identity<Value> > >,
33 typename Allocator=std::allocator<Value> >
34class multi_index_container;
35
36template<typename MultiIndexContainer,int N>
37struct nth_index;
38
39template<typename MultiIndexContainer,typename Tag>
40struct index;
41
42template<typename MultiIndexContainer,int N>
43struct nth_index_iterator;
44
45template<typename MultiIndexContainer,int N>
46struct nth_index_const_iterator;
47
48template<typename MultiIndexContainer,typename Tag>
49struct index_iterator;
50
51template<typename MultiIndexContainer,typename Tag>
52struct index_const_iterator;
53
54/* get and project functions not fwd declared due to problems
55 * with dependent typenames
56 */
57
58template<
59 typename Value1,typename IndexSpecifierList1,typename Allocator1,
60 typename Value2,typename IndexSpecifierList2,typename Allocator2
61>
62bool operator==(
63 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
64 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
65
66template<
67 typename Value1,typename IndexSpecifierList1,typename Allocator1,
68 typename Value2,typename IndexSpecifierList2,typename Allocator2
69>
70bool operator<(
71 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
72 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
73
74template<
75 typename Value1,typename IndexSpecifierList1,typename Allocator1,
76 typename Value2,typename IndexSpecifierList2,typename Allocator2
77>
78bool operator!=(
79 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
80 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
81
82template<
83 typename Value1,typename IndexSpecifierList1,typename Allocator1,
84 typename Value2,typename IndexSpecifierList2,typename Allocator2
85>
86bool operator>(
87 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
88 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
89
90template<
91 typename Value1,typename IndexSpecifierList1,typename Allocator1,
92 typename Value2,typename IndexSpecifierList2,typename Allocator2
93>
94bool operator>=(
95 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
96 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
97
98template<
99 typename Value1,typename IndexSpecifierList1,typename Allocator1,
100 typename Value2,typename IndexSpecifierList2,typename Allocator2
101>
102bool operator<=(
103 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
104 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
105
106template<typename Value,typename IndexSpecifierList,typename Allocator>
107void swap(
108 multi_index_container<Value,IndexSpecifierList,Allocator>& x,
109 multi_index_container<Value,IndexSpecifierList,Allocator>& y);
110
111} /* namespace multi_index */
112
113/* multi_index_container, being the main type of this library, is promoted to
114 * namespace boost.
115 */
116
117using multi_index::multi_index_container;
118
119} /* namespace boost */
120
121#endif
122