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 22 namespace boost{ 23 24 namespace multi_index{ 25 26 /* Default value for IndexSpecifierList specifies a container 27 * equivalent to std::set<Value>. 28 */ 29 30 template< 31 typename Value, 32 typename IndexSpecifierList=indexed_by<ordered_unique<identity<Value> > >, 33 typename Allocator=std::allocator<Value> > 34 class multi_index_container; 35 36 template<typename MultiIndexContainer,int N> 37 struct nth_index; 38 39 template<typename MultiIndexContainer,typename Tag> 40 struct index; 41 42 template<typename MultiIndexContainer,int N> 43 struct nth_index_iterator; 44 45 template<typename MultiIndexContainer,int N> 46 struct nth_index_const_iterator; 47 48 template<typename MultiIndexContainer,typename Tag> 49 struct index_iterator; 50 51 template<typename MultiIndexContainer,typename Tag> 52 struct index_const_iterator; 53 54 /* get and project functions not fwd declared due to problems 55 * with dependent typenames 56 */ 57 58 template< 59 typename Value1,typename IndexSpecifierList1,typename Allocator1, 60 typename Value2,typename IndexSpecifierList2,typename Allocator2 61 > 62 bool operator==( 63 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x, 64 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y); 65 66 template< 67 typename Value1,typename IndexSpecifierList1,typename Allocator1, 68 typename Value2,typename IndexSpecifierList2,typename Allocator2 69 > 70 bool operator<( 71 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x, 72 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y); 73 74 template< 75 typename Value1,typename IndexSpecifierList1,typename Allocator1, 76 typename Value2,typename IndexSpecifierList2,typename Allocator2 77 > 78 bool operator!=( 79 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x, 80 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y); 81 82 template< 83 typename Value1,typename IndexSpecifierList1,typename Allocator1, 84 typename Value2,typename IndexSpecifierList2,typename Allocator2 85 > 86 bool operator>( 87 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x, 88 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y); 89 90 template< 91 typename Value1,typename IndexSpecifierList1,typename Allocator1, 92 typename Value2,typename IndexSpecifierList2,typename Allocator2 93 > 94 bool operator>=( 95 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x, 96 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y); 97 98 template< 99 typename Value1,typename IndexSpecifierList1,typename Allocator1, 100 typename Value2,typename IndexSpecifierList2,typename Allocator2 101 > 102 bool operator<=( 103 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x, 104 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y); 105 106 template<typename Value,typename IndexSpecifierList,typename Allocator> 107 void 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 117 using multi_index::multi_index_container; 118 119 } /* namespace boost */ 120 121 #endif 122