multi_index_container_fwd.hpp 3.7 KB

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