File indexing completed on 2025-01-18 09:42:11
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_MULTI_INDEX_ORDERED_INDEX_HPP
0010 #define BOOST_MULTI_INDEX_ORDERED_INDEX_HPP
0011
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015
0016 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
0017 #include <boost/multi_index/detail/ord_index_impl.hpp>
0018 #include <boost/multi_index/ordered_index_fwd.hpp>
0019
0020 namespace boost{
0021
0022 namespace multi_index{
0023
0024 namespace detail{
0025
0026
0027
0028 struct null_augment_policy
0029 {
0030 template<typename OrderedIndexImpl>
0031 struct augmented_interface
0032 {
0033 typedef OrderedIndexImpl type;
0034 };
0035
0036 template<typename OrderedIndexNodeImpl>
0037 struct augmented_node
0038 {
0039 typedef OrderedIndexNodeImpl type;
0040 };
0041
0042 template<typename Pointer> static void add(Pointer,Pointer){}
0043 template<typename Pointer> static void remove(Pointer,Pointer){}
0044 template<typename Pointer> static void copy(Pointer,Pointer){}
0045 template<typename Pointer> static void rotate_left(Pointer,Pointer){}
0046 template<typename Pointer> static void rotate_right(Pointer,Pointer){}
0047
0048 #if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
0049
0050
0051 template<typename Pointer> static bool invariant(Pointer){return true;}
0052
0053 #endif
0054 };
0055
0056 }
0057
0058
0059
0060 template<typename Arg1,typename Arg2,typename Arg3>
0061 struct ordered_unique
0062 {
0063 typedef typename detail::ordered_index_args<
0064 Arg1,Arg2,Arg3> index_args;
0065 typedef typename index_args::tag_list_type::type tag_list_type;
0066 typedef typename index_args::key_from_value_type key_from_value_type;
0067 typedef typename index_args::compare_type compare_type;
0068
0069 template<typename Super>
0070 struct node_class
0071 {
0072 typedef detail::ordered_index_node<detail::null_augment_policy,Super> type;
0073 };
0074
0075 template<typename SuperMeta>
0076 struct index_class
0077 {
0078 typedef detail::ordered_index<
0079 key_from_value_type,compare_type,
0080 SuperMeta,tag_list_type,detail::ordered_unique_tag,
0081 detail::null_augment_policy> type;
0082 };
0083 };
0084
0085 template<typename Arg1,typename Arg2,typename Arg3>
0086 struct ordered_non_unique
0087 {
0088 typedef detail::ordered_index_args<
0089 Arg1,Arg2,Arg3> index_args;
0090 typedef typename index_args::tag_list_type::type tag_list_type;
0091 typedef typename index_args::key_from_value_type key_from_value_type;
0092 typedef typename index_args::compare_type compare_type;
0093
0094 template<typename Super>
0095 struct node_class
0096 {
0097 typedef detail::ordered_index_node<detail::null_augment_policy,Super> type;
0098 };
0099
0100 template<typename SuperMeta>
0101 struct index_class
0102 {
0103 typedef detail::ordered_index<
0104 key_from_value_type,compare_type,
0105 SuperMeta,tag_list_type,detail::ordered_non_unique_tag,
0106 detail::null_augment_policy> type;
0107 };
0108 };
0109
0110 }
0111
0112 }
0113
0114 #endif