Move michael_list_base.h from cds/container to cds/container/details
authorkhizmax <libcds.dev@gmail.com>
Sat, 27 Sep 2014 19:03:50 +0000 (23:03 +0400)
committerkhizmax <libcds.dev@gmail.com>
Sat, 27 Sep 2014 19:03:50 +0000 (23:03 +0400)
16 files changed:
cds/container/details/michael_list_base.h [new file with mode: 0644]
cds/container/michael_kvlist_hp.h
cds/container/michael_kvlist_hrc.h
cds/container/michael_kvlist_nogc.h
cds/container/michael_kvlist_ptb.h
cds/container/michael_kvlist_rcu.h
cds/container/michael_list_base.h [deleted file]
cds/container/michael_list_hp.h
cds/container/michael_list_hrc.h
cds/container/michael_list_nogc.h
cds/container/michael_list_ptb.h
cds/container/michael_list_rcu.h
projects/Win/vc12/cds.vcxproj
projects/Win/vc12/cds.vcxproj.filters
tests/test-hdr/ordered_list/hdr_michael.h
tests/test-hdr/ordered_list/hdr_michael_kv.h

diff --git a/cds/container/details/michael_list_base.h b/cds/container/details/michael_list_base.h
new file mode 100644 (file)
index 0000000..c30785e
--- /dev/null
@@ -0,0 +1,112 @@
+//$$CDS-header$$
+
+#ifndef __CDS_CONTAINER_DETAILS_MICHAEL_LIST_BASE_H
+#define __CDS_CONTAINER_DETAILS_MICHAEL_LIST_BASE_H
+
+#include <cds/container/details/base.h>
+#include <cds/intrusive/details/michael_list_base.h>
+#include <cds/urcu/options.h>
+
+namespace cds { namespace container {
+
+    /// MichaelList ordered list related definitions
+    /** @ingroup cds_nonintrusive_helper
+    */
+    namespace michael_list {
+        /// Michael list default type traits
+        struct type_traits
+        {
+            typedef CDS_DEFAULT_ALLOCATOR   allocator       ;   ///< allocator used to allocate new node
+
+            /// Key comparison functor
+            /**
+                No default functor is provided. If the option is not specified, the \p less is used.
+            */
+            typedef opt::none                       compare;
+
+            /// specifies binary predicate used for key comparison.
+            /**
+                Default is \p std::less<T>.
+            */
+            typedef opt::none                       less;
+
+            /// back-off strategy used
+            /**
+                If the option is not specified, the cds::backoff::empty is used.
+            */
+            typedef cds::backoff::empty             back_off;
+
+            /// Item counter
+            /**
+                The type for item counting feature.
+                Default is no item counter (\ref atomicity::empty_item_counter)
+            */
+            typedef atomicity::empty_item_counter     item_counter;
+
+            /// Link fields checking feature
+            /**
+                Default is \ref intrusive::opt::debug_check_link
+            */
+            static const opt::link_check_type link_checker = opt::debug_check_link;
+
+            /// C++ memory ordering model
+            /**
+                List of available memory ordering see opt::memory_model
+            */
+            typedef opt::v::relaxed_ordering        memory_model;
+
+            /// RCU deadlock checking policy (only for \ref cds_intrusive_MichaelList_rcu "RCU-based MichaelList")
+            /**
+                List of available options see opt::rcu_check_deadlock
+            */
+            typedef opt::v::rcu_throw_deadlock      rcu_check_deadlock;
+
+            //@cond
+            // MichaelKVList: supporting for split-ordered list
+            // key accessor (opt::none = internal key type is equal to user key type)
+            typedef opt::none                       key_accessor;
+            //@endcond
+        };
+
+        /// Metafunction converting option list to MichaelList traits
+        /**
+            This is a wrapper for <tt> cds::opt::make_options< type_traits, Options...> </tt>
+
+            See \ref MichaelList, \ref type_traits, \ref cds::opt::make_options.
+        */
+        template <typename... Options>
+        struct make_traits {
+#   ifdef CDS_DOXYGEN_INVOKED
+            typedef implementation_defined type ;   ///< Metafunction result
+#   else
+            typedef typename cds::opt::make_options<
+                typename cds::opt::find_type_traits< type_traits, Options... >::type
+                ,Options...
+            >::type   type;
+#endif
+        };
+
+
+    } // namespace michael_list
+
+    // Forward declarations
+    template <typename GC, typename T, typename Traits=michael_list::type_traits>
+    class MichaelList;
+
+    template <typename GC, typename Key, typename Value, typename Traits=michael_list::type_traits>
+    class MichaelKVList;
+
+    // Tag for selecting Michael's list implementation
+    /**
+        This struct is empty and it is used only as a tag for selecting MichaelList
+        as ordered list implementation in declaration of some classes.
+
+        See split_list::type_traits::ordered_list as an example.
+    */
+    struct michael_list_tag
+    {};
+
+}}  // namespace cds::container
+
+
+#endif  // #ifndef __CDS_CONTAINER_DETAILS_MICHAEL_LIST_BASE_H
index 59056ed671859b579c8f61fec308b72942ae3f3c..3da99256746ceefe811150fdeee4591169056a79 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_MICHAEL_KVLIST_HP_H
 #define __CDS_CONTAINER_MICHAEL_KVLIST_HP_H
 
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_hp.h>
 #include <cds/container/details/make_michael_kvlist.h>
 #include <cds/container/impl/michael_kvlist.h>
index 9a6803bbe788d050954fd939c0bceb4fe4d0a4ab..8d0e4a1ffb94c256438313b6d7eacca8de60fe19 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_MICHAEL_KVLIST_HRC_H
 #define __CDS_CONTAINER_MICHAEL_KVLIST_HRC_H
 
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_hrc.h>
 #include <cds/container/details/make_michael_kvlist.h>
 #include <cds/container/impl/michael_kvlist.h>
index 5a42a8f50121a4d6cadc6c9b6dea62f14b9a715e..bae83d1b1660f091d66357d059b863eb69f3cdd7 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_MICHAEL_KVLIST_NOGC_H
 
 #include <memory>
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_nogc.h>
 #include <cds/container/details/make_michael_kvlist.h>
 #include <cds/details/functor_wrapper.h>
index 43bc868223d9b05f52ee2997a0f7e459739e7e71..0090dc5cba5b7b7124b56d88982913b8ec988009 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_MICHAEL_KVLIST_PTB_H
 #define __CDS_CONTAINER_MICHAEL_KVLIST_PTB_H
 
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_ptb.h>
 #include <cds/container/details/make_michael_kvlist.h>
 #include <cds/container/impl/michael_kvlist.h>
index d1aed822ddbceb2a1af9c243c99b3fa100251117..aaf03ae703b518365c36f5c4f72d0121d3c31b25 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_MICHAEL_KVLIST_RCU_H
 
 #include <memory>
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_rcu.h>
 #include <cds/container/details/make_michael_kvlist.h>
 #include <cds/ref.h>
diff --git a/cds/container/michael_list_base.h b/cds/container/michael_list_base.h
deleted file mode 100644 (file)
index 117c5f8..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_MICHAEL_LIST_BASE_H
-#define __CDS_CONTAINER_MICHAEL_LIST_BASE_H
-
-#include <cds/container/details/base.h>
-#include <cds/intrusive/details/michael_list_base.h>
-#include <cds/urcu/options.h>
-
-namespace cds { namespace container {
-
-    /// MichaelList ordered list related definitions
-    /** @ingroup cds_nonintrusive_helper
-    */
-    namespace michael_list {
-        /// Michael list default type traits
-        struct type_traits
-        {
-            typedef CDS_DEFAULT_ALLOCATOR   allocator       ;   ///< allocator used to allocate new node
-
-            /// Key comparison functor
-            /**
-                No default functor is provided. If the option is not specified, the \p less is used.
-            */
-            typedef opt::none                       compare;
-
-            /// specifies binary predicate used for key comparison.
-            /**
-                Default is \p std::less<T>.
-            */
-            typedef opt::none                       less;
-
-            /// back-off strategy used
-            /**
-                If the option is not specified, the cds::backoff::empty is used.
-            */
-            typedef cds::backoff::empty             back_off;
-
-            /// Item counter
-            /**
-                The type for item counting feature.
-                Default is no item counter (\ref atomicity::empty_item_counter)
-            */
-            typedef atomicity::empty_item_counter     item_counter;
-
-            /// Link fields checking feature
-            /**
-                Default is \ref intrusive::opt::debug_check_link
-            */
-            static const opt::link_check_type link_checker = opt::debug_check_link;
-
-            /// C++ memory ordering model
-            /**
-                List of available memory ordering see opt::memory_model
-            */
-            typedef opt::v::relaxed_ordering        memory_model;
-
-            /// RCU deadlock checking policy (only for \ref cds_intrusive_MichaelList_rcu "RCU-based MichaelList")
-            /**
-                List of available options see opt::rcu_check_deadlock
-            */
-            typedef opt::v::rcu_throw_deadlock      rcu_check_deadlock;
-
-            //@cond
-            // MichaelKVList: supporting for split-ordered list
-            // key accessor (opt::none = internal key type is equal to user key type)
-            typedef opt::none                       key_accessor;
-            //@endcond
-        };
-
-        /// Metafunction converting option list to MichaelList traits
-        /**
-            This is a wrapper for <tt> cds::opt::make_options< type_traits, Options...> </tt>
-
-            See \ref MichaelList, \ref type_traits, \ref cds::opt::make_options.
-        */
-        template <typename... Options>
-        struct make_traits {
-#   ifdef CDS_DOXYGEN_INVOKED
-            typedef implementation_defined type ;   ///< Metafunction result
-#   else
-            typedef typename cds::opt::make_options<
-                typename cds::opt::find_type_traits< type_traits, Options... >::type
-                ,Options...
-            >::type   type;
-#endif
-        };
-
-
-    } // namespace michael_list
-
-    // Forward declarations
-    template <typename GC, typename T, typename Traits=michael_list::type_traits>
-    class MichaelList;
-
-    template <typename GC, typename Key, typename Value, typename Traits=michael_list::type_traits>
-    class MichaelKVList;
-
-    // Tag for selecting Michael's list implementation
-    /**
-        This struct is empty and it is used only as a tag for selecting MichaelList
-        as ordered list implementation in declaration of some classes.
-
-        See split_list::type_traits::ordered_list as an example.
-    */
-    struct michael_list_tag
-    {};
-
-}}  // namespace cds::container
-
-
-#endif  // #ifndef __CDS_CONTAINER_MICHAEL_LIST_BASE_H
index f1ae1a8d17723cd8f663bf309e96e320f76cf9ca..2ef582acc6e943a9854223aa4aba17f4cd755520 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_MICHAEL_LIST_HP_H
 #define __CDS_CONTAINER_MICHAEL_LIST_HP_H
 
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_hp.h>
 #include <cds/container/details/make_michael_list.h>
 #include <cds/container/michael_list_impl.h>
index 01cb993b063c9acd34e096b5c1968b882db3ffe7..4df2ee67e5507c4dfa46c4f749dede60aa4d36c3 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_MICHAEL_LIST_HRC_H
 #define __CDS_CONTAINER_MICHAEL_LIST_HRC_H
 
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_hrc.h>
 #include <cds/container/details/make_michael_list.h>
 #include <cds/container/michael_list_impl.h>
index 170271c0998141e6c79012126a5c0432a57e7ca5..abae2284d09283d229c7b1e6e5bb4a474d5901ea 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_MICHAEL_LIST_NOGC_H
 
 #include <memory>
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_nogc.h>
 #include <cds/container/details/make_michael_list.h>
 
index b1f3bfbf87e44ae34a212e894445830729c4641b..546ec9af923f5cba8d3647a6e256d424b25665af 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_MICHAEL_LIST_PTB_H
 #define __CDS_CONTAINER_MICHAEL_LIST_PTB_H
 
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_ptb.h>
 #include <cds/container/details/make_michael_list.h>
 #include <cds/container/michael_list_impl.h>
index e3b579757fd8660b5b50658b426ddca801a2c9c1..e7b0c09fd1cfcce856d90dadbd0845dd4ecb8c1b 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_MICHAEL_LIST_RCU_H
 
 #include <memory>
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 #include <cds/intrusive/michael_list_rcu.h>
 #include <cds/container/details/make_michael_list.h>
 #include <cds/details/binary_functor_wrapper.h>
index 1c1cacdfaebe4c4f166e7fc72e1e582f0fc39279..2bea9fa452b3832d08403008e251cd66335d8899 100644 (file)
     <ClInclude Include="..\..\..\cds\container\details\make_skip_list_map.h" />\r
     <ClInclude Include="..\..\..\cds\container\details\make_skip_list_set.h" />\r
     <ClInclude Include="..\..\..\cds\container\details\make_split_list_set.h" />\r
+    <ClInclude Include="..\..\..\cds\container\details\michael_list_base.h" />\r
     <ClInclude Include="..\..\..\cds\container\ellen_bintree_map_hp.h" />\r
     <ClInclude Include="..\..\..\cds\container\ellen_bintree_map_ptb.h" />\r
     <ClInclude Include="..\..\..\cds\container\ellen_bintree_map_rcu.h" />\r
     <ClInclude Include="..\..\..\cds\container\michael_kvlist_hrc.h" />\r
     <ClInclude Include="..\..\..\cds\container\michael_kvlist_nogc.h" />\r
     <ClInclude Include="..\..\..\cds\container\michael_kvlist_ptb.h" />\r
-    <ClInclude Include="..\..\..\cds\container\michael_list_base.h" />\r
     <ClInclude Include="..\..\..\cds\container\michael_list_hp.h" />\r
     <ClInclude Include="..\..\..\cds\container\michael_list_hrc.h" />\r
     <ClInclude Include="..\..\..\cds\container\michael_list_impl.h" />\r
index cbc8fd0fcfff991b4fd6aeb338e87698071e8443..528e827dfb699396a1de667123f7757a6a9a55d0 100644 (file)
     <ClInclude Include="..\..\..\cds\container\michael_kvlist_ptb.h">\r
       <Filter>Header Files\cds\container</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\..\..\cds\container\michael_list_base.h">\r
-      <Filter>Header Files\cds\container</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\..\..\cds\container\michael_list_hp.h">\r
       <Filter>Header Files\cds\container</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\container\impl\michael_kvlist.h">\r
       <Filter>Header Files\cds\container\impl</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\cds\container\details\michael_list_base.h">\r
+      <Filter>Header Files\cds\container\details</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index a0fe03e06fd89d3428a4965af61c596ea2c94cc2..02465fc08878551ad96a83d6d613758ba8bdde4a 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
 #include "cppunit/cppunit_proxy.h"
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 
 namespace ordlist {
     namespace cc = cds::container;
index 9d5f3e95bb601d4f98e9ea90ecc30e971c0fc654..263ee1ab00da4f992fdfff84f6f7cc0ac4ae3e1e 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
 #include "cppunit/cppunit_proxy.h"
-#include <cds/container/michael_list_base.h>
+#include <cds/container/details/michael_list_base.h>
 
 namespace ordlist {
     namespace cc = cds::container;