iterator_type_by.hpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. // Boost.Bimap
  2. //
  3. // Copyright (c) 2006-2007 Matias Capeletto
  4. //
  5. // Distributed under the Boost Software License, Version 1.0.
  6. // (See accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. /// \file support/iterator_type_by.hpp
  9. /// \brief Metafunctions to access the iterator types of a bimap
  10. #ifndef BOOST_BIMAP_SUPPORT_ITERATOR_TYPE_BY_HPP
  11. #define BOOST_BIMAP_SUPPORT_ITERATOR_TYPE_BY_HPP
  12. #if defined(_MSC_VER)
  13. #pragma once
  14. #endif
  15. #include <boost/config.hpp>
  16. #include <boost/bimap/relation/detail/metadata_access_builder.hpp>
  17. #include <boost/bimap/relation/detail/static_access_builder.hpp>
  18. /** \struct boost::bimaps::support::iterator_type_by
  19. \brief Metafunction to obtain the iterator type of the map view by one of the sides.
  20. These metafunctions can be used outside the bimap framework for other bimap
  21. signature compatible classes.
  22. \code
  23. template< class Tag, class Bimap >
  24. struct iterator_type_by
  25. {
  26. typedef -unspecified- type;
  27. };
  28. template< class Tag, class Bimap >
  29. struct const_iterator_type_by
  30. {
  31. typedef -unspecified- type;
  32. };
  33. template< class Tag, class Bimap >
  34. struct reverse_iterator_type_by
  35. {
  36. typedef -unspecified- type;
  37. };
  38. template< class Tag, class Bimap >
  39. struct const_reverse_iterator_type_by
  40. {
  41. typedef -unspecified- type;
  42. };
  43. template< class Tag, class Bimap >
  44. struct local_iterator_type_by
  45. {
  46. typedef -unspecified- type;
  47. };
  48. template< class Tag, class Bimap >
  49. struct const_local_iterator_type_by
  50. {
  51. typedef -unspecified- type;
  52. };
  53. \endcode
  54. See also member_at.
  55. \ingroup bimap_group
  56. **/
  57. #ifndef BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
  58. namespace boost {
  59. namespace bimaps {
  60. namespace support {
  61. // Implementation of iterator type by metafunction
  62. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  63. (
  64. iterator_type_by,
  65. left_iterator,
  66. right_iterator
  67. )
  68. // Implementation of const iterator type by metafunction
  69. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  70. (
  71. const_iterator_type_by,
  72. left_const_iterator,
  73. right_const_iterator
  74. )
  75. // Implementation of reverse iterator type by metafunction
  76. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  77. (
  78. reverse_iterator_type_by,
  79. left_reverse_iterator,
  80. right_reverse_iterator
  81. )
  82. // Implementation of const reverse iterator type by metafunction
  83. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  84. (
  85. const_reverse_iterator_type_by,
  86. left_const_reverse_iterator,
  87. right_const_reverse_iterator
  88. )
  89. // Implementation of local iterator type by metafunction
  90. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  91. (
  92. local_iterator_type_by,
  93. left_local_iterator,
  94. right_local_iterator
  95. )
  96. // Implementation of const local iterator type by metafunction
  97. BOOST_BIMAP_SYMMETRIC_METADATA_ACCESS_BUILDER
  98. (
  99. const_local_iterator_type_by,
  100. left_const_local_iterator,
  101. right_const_local_iterator
  102. )
  103. } // namespace support
  104. } // namespace bimaps
  105. } // namespace boost
  106. #endif // BOOST_BIMAP_DOXYGEN_WILL_NOT_PROCESS_THE_FOLLOWING_LINES
  107. #endif // BOOST_BIMAP_SUPPORT_ITERATOR_TYPE_BY_HPP