Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:29:38

0001 // Boost.Bimap
0002 //
0003 // Copyright (c) 2006-2007 Matias Capeletto
0004 //
0005 // Distributed under the Boost Software License, Version 1.0.
0006 // (See accompanying file LICENSE_1_0.txt or copy at
0007 // http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 /// \file detail/generate_index_binder.hpp
0010 /// \brief Define macros to help building the set type of definitions
0011 
0012 
0013 #ifndef BOOST_BIMAP_DETAIL_GENERATE_INDEX_BINDER_HPP
0014 #define BOOST_BIMAP_DETAIL_GENERATE_INDEX_BINDER_HPP
0015 
0016 #if defined(_MSC_VER)
0017 #pragma once
0018 #endif
0019 
0020 #include <boost/config.hpp>
0021 
0022 #include <boost/multi_index/tag.hpp>
0023 
0024 
0025 /*===========================================================================*/
0026 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_0CP(                                \
0027                                                                               \
0028     MULTI_INDEX_TYPE                                                          \
0029                                                                               \
0030 )                                                                             \
0031                                                                               \
0032 template< class KeyExtractor, class Tag >                                     \
0033 struct index_bind                                                             \
0034 {                                                                             \
0035     typedef MULTI_INDEX_TYPE                                                  \
0036     <                                                                         \
0037         multi_index::tag< Tag >,                                              \
0038         KeyExtractor                                                          \
0039                                                                               \
0040     > type;                                                                   \
0041 };
0042 /*===========================================================================*/
0043 
0044 
0045 
0046 /*===========================================================================*/
0047 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_1CP(                                \
0048                                                                               \
0049     MULTI_INDEX_TYPE,                                                         \
0050     CONFIG_PARAMETER                                                          \
0051                                                                               \
0052 )                                                                             \
0053                                                                               \
0054 template< class KeyExtractor, class Tag >                                     \
0055 struct index_bind                                                             \
0056 {                                                                             \
0057     typedef MULTI_INDEX_TYPE                                                  \
0058     <                                                                         \
0059         multi_index::tag< Tag >,                                              \
0060         KeyExtractor,                                                         \
0061         CONFIG_PARAMETER                                                      \
0062                                                                               \
0063     > type;                                                                   \
0064 };
0065 /*===========================================================================*/
0066 
0067 
0068 
0069 
0070 /*===========================================================================*/
0071 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_2CP(                                \
0072                                                                               \
0073     MULTI_INDEX_TYPE,                                                         \
0074     CONFIG_PARAMETER_1,                                                       \
0075     CONFIG_PARAMETER_2                                                        \
0076 )                                                                             \
0077                                                                               \
0078 template< class KeyExtractor, class Tag >                                     \
0079 struct index_bind                                                             \
0080 {                                                                             \
0081     typedef MULTI_INDEX_TYPE                                                  \
0082     <                                                                         \
0083         multi_index::tag< Tag >,                                              \
0084         KeyExtractor,                                                         \
0085         CONFIG_PARAMETER_1,                                                   \
0086         CONFIG_PARAMETER_2                                                    \
0087                                                                               \
0088     > type;                                                                   \
0089                                                                               \
0090 };
0091 /*===========================================================================*/
0092 
0093 
0094 // This is a special registration to allow sequenced and random access indices
0095 // to play along smoothly with the other index types.
0096 
0097 /*===========================================================================*/
0098 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_0CP_NO_EXTRACTOR(                   \
0099                                                                               \
0100     MULTI_INDEX_TYPE                                                          \
0101                                                                               \
0102 )                                                                             \
0103                                                                               \
0104 template< class KeyExtractor, class Tag >                                     \
0105 struct index_bind                                                             \
0106 {                                                                             \
0107     typedef MULTI_INDEX_TYPE< multi_index::tag< Tag > > type;                 \
0108 };
0109 /*===========================================================================*/
0110 
0111 
0112 // This is yet another special registration to allow unconstrained sets
0113 // to play along smoothly with the other index types.
0114 
0115 /*===========================================================================*/
0116 #define BOOST_BIMAP_GENERATE_INDEX_BINDER_FAKE                                \
0117                                                                               \
0118 template< class KeyExtractor, class Tag >                                     \
0119 struct index_bind                                                             \
0120 {                                                                             \
0121     typedef void type;                                                        \
0122 };                                                                            \
0123 /*===========================================================================*/
0124 
0125 #endif // BOOST_BIMAP_DETAIL_GENERATE_INDEX_BINDER_HPP