Move lazy_list_base.h from cds/container to cds/container/details
authorkhizmax <libcds.dev@gmail.com>
Sat, 27 Sep 2014 18:44:49 +0000 (22:44 +0400)
committerkhizmax <libcds.dev@gmail.com>
Sat, 27 Sep 2014 18:44:49 +0000 (22:44 +0400)
16 files changed:
cds/container/details/lazy_list_base.h [new file with mode: 0644]
cds/container/lazy_kvlist_hp.h
cds/container/lazy_kvlist_hrc.h
cds/container/lazy_kvlist_nogc.h
cds/container/lazy_kvlist_ptb.h
cds/container/lazy_kvlist_rcu.h
cds/container/lazy_list_base.h [deleted file]
cds/container/lazy_list_hp.h
cds/container/lazy_list_hrc.h
cds/container/lazy_list_nogc.h
cds/container/lazy_list_ptb.h
cds/container/lazy_list_rcu.h
projects/Win/vc12/cds.vcxproj
projects/Win/vc12/cds.vcxproj.filters
tests/test-hdr/ordered_list/hdr_lazy.h
tests/test-hdr/ordered_list/hdr_lazy_kv.h

diff --git a/cds/container/details/lazy_list_base.h b/cds/container/details/lazy_list_base.h
new file mode 100644 (file)
index 0000000..9dbe0e2
--- /dev/null
@@ -0,0 +1,127 @@
+//$$CDS-header$$
+
+#ifndef __CDS_CONTAINER_DETAILS_LAZY_LIST_BASE_H
+#define __CDS_CONTAINER_DETAILS_LAZY_LIST_BASE_H
+
+#include <cds/container/details/base.h>
+#include <cds/intrusive/details/lazy_list_base.h>
+#include <cds/urcu/options.h>
+
+namespace cds { namespace container {
+
+    /// LazyList ordered list related definitions
+    /** @ingroup cds_nonintrusive_helper
+    */
+    namespace lazy_list {
+        /// Lazy list default type traits
+        /**
+            Either \p compare or \p less or both must be specified.
+        */
+        struct type_traits
+        {
+            /// allocator used to allocate new node
+            typedef CDS_DEFAULT_ALLOCATOR   allocator;
+
+            /// 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;
+
+            /// Lock type used to lock modifying items
+            /**
+                Default is cds::lock::Spin
+            */
+            typedef cds::lock::Spin                 lock_type;
+
+            /// back-off strategy used
+            /**
+                If the option is not specified, the cds::backoff::Default is used.
+            */
+            typedef cds::backoff::Default           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_LazyList_rcu "RCU-based LazyList")
+            /**
+                List of available options see opt::rcu_check_deadlock
+            */
+            typedef opt::v::rcu_throw_deadlock      rcu_check_deadlock;
+
+            //@cond
+            // LazyKVList: supporting for split-ordered list
+            // key accessor (opt::none = internal key type is equal to user key type)
+            typedef opt::none                       key_accessor;
+
+            // for internal use only!!!
+            typedef opt::none                       boundary_node_type;
+
+            //@endcond
+        };
+
+        /// Metafunction converting option list to traits for LazyList
+        /**
+            This is a wrapper for <tt> cds::opt::make_options< type_traits, Options...> </tt>
+
+            See \ref LazyList, \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 lazy_list
+
+    // Forward declarations
+    template <typename GC, typename T, typename Traits=lazy_list::type_traits>
+    class LazyList;
+
+    template <typename GC, typename Key, typename Value, typename Traits=lazy_list::type_traits>
+    class LazyKVList;
+
+    // Tag for selecting lazy list implementation
+    /**
+        This struct is empty and it is used only as a tag for selecting LazyList
+        as ordered list implementation in declaration of some classes.
+
+        See split_list::type_traits::ordered_list as an example.
+    */
+    struct lazy_list_tag
+    {};
+
+
+}}  // namespace cds::container
+
+
+#endif  // #ifndef __CDS_CONTAINER_DETAILS_LAZY_LIST_BASE_H
index d29b3c9..83ffff4 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_KVLIST_HP_H
 #define __CDS_CONTAINER_LAZY_KVLIST_HP_H
 
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_hp.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/container/impl/lazy_kvlist.h>
index d7a49a5..0e6a826 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_KVLIST_HRC_H
 #define __CDS_CONTAINER_LAZY_KVLIST_HRC_H
 
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_hrc.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/container/impl/lazy_kvlist.h>
index 03e2b39..f05fc44 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_KVLIST_NOGC_H
 
 #include <memory>
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_nogc.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/details/functor_wrapper.h>
index 6fe2637..8b448f3 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_KVLIST_PTB_H
 #define __CDS_CONTAINER_LAZY_KVLIST_PTB_H
 
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_ptb.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/container/impl/lazy_kvlist.h>
index e854631..10d47ae 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_KVLIST_RCU_H
 
 #include <memory>
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_rcu.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/ref.h>
diff --git a/cds/container/lazy_list_base.h b/cds/container/lazy_list_base.h
deleted file mode 100644 (file)
index 2f99b42..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_LAZY_LIST_BASE_H
-#define __CDS_CONTAINER_LAZY_LIST_BASE_H
-
-#include <cds/container/details/base.h>
-#include <cds/intrusive/details/lazy_list_base.h>
-#include <cds/urcu/options.h>
-
-namespace cds { namespace container {
-
-    /// LazyList ordered list related definitions
-    /** @ingroup cds_nonintrusive_helper
-    */
-    namespace lazy_list {
-        /// Lazy list default type traits
-        /**
-            Either \p compare or \p less or both must be specified.
-        */
-        struct type_traits
-        {
-            /// allocator used to allocate new node
-            typedef CDS_DEFAULT_ALLOCATOR   allocator;
-
-            /// 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;
-
-            /// Lock type used to lock modifying items
-            /**
-                Default is cds::lock::Spin
-            */
-            typedef cds::lock::Spin                 lock_type;
-
-            /// back-off strategy used
-            /**
-                If the option is not specified, the cds::backoff::Default is used.
-            */
-            typedef cds::backoff::Default           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_LazyList_rcu "RCU-based LazyList")
-            /**
-                List of available options see opt::rcu_check_deadlock
-            */
-            typedef opt::v::rcu_throw_deadlock      rcu_check_deadlock;
-
-            //@cond
-            // LazyKVList: supporting for split-ordered list
-            // key accessor (opt::none = internal key type is equal to user key type)
-            typedef opt::none                       key_accessor;
-
-            // for internal use only!!!
-            typedef opt::none                       boundary_node_type;
-
-            //@endcond
-        };
-
-        /// Metafunction converting option list to traits for LazyList
-        /**
-            This is a wrapper for <tt> cds::opt::make_options< type_traits, Options...> </tt>
-
-            See \ref LazyList, \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 lazy_list
-
-    // Forward declarations
-    template <typename GC, typename T, typename Traits=lazy_list::type_traits>
-    class LazyList;
-
-    template <typename GC, typename Key, typename Value, typename Traits=lazy_list::type_traits>
-    class LazyKVList;
-
-    // Tag for selecting lazy list implementation
-    /**
-        This struct is empty and it is used only as a tag for selecting LazyList
-        as ordered list implementation in declaration of some classes.
-
-        See split_list::type_traits::ordered_list as an example.
-    */
-    struct lazy_list_tag
-    {};
-
-
-}}  // namespace cds::container
-
-
-#endif  // #ifndef __CDS_CONTAINER_LAZY_LIST_BASE_H
index 66816a7..cbb73cd 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_LIST_HP_H
 #define __CDS_CONTAINER_LAZY_LIST_HP_H
 
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_hp.h>
 #include <cds/container/details/make_lazy_list.h>
 #include <cds/container/lazy_list_impl.h>
index d63bbd1..d466fd1 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_LIST_HRC_H
 #define __CDS_CONTAINER_LAZY_LIST_HRC_H
 
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_hrc.h>
 #include <cds/container/details/make_lazy_list.h>
 #include <cds/container/lazy_list_impl.h>
index 3a5fbd7..96394f1 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_LIST_NOGC_H
 
 #include <memory>
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_nogc.h>
 #include <cds/container/details/make_lazy_list.h>
 
index 4fed114..be535fe 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_LIST_PTB_H
 #define __CDS_CONTAINER_LAZY_LIST_PTB_H
 
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_ptb.h>
 #include <cds/container/details/make_lazy_list.h>
 #include <cds/container/lazy_list_impl.h>
index 59fa065..745273f 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_LIST_RCU_H
 
 #include <memory>
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 #include <cds/intrusive/lazy_list_rcu.h>
 #include <cds/details/binary_functor_wrapper.h>
 #include <cds/container/details/make_lazy_list.h>
index 10a917e..6379e67 100644 (file)
     <ClInclude Include="..\..\..\cds\container\details\cuckoo_base.h" />\r
     <ClInclude Include="..\..\..\cds\container\details\ellen_bintree_base.h" />\r
     <ClInclude Include="..\..\..\cds\container\details\guarded_ptr_cast.h" />\r
+    <ClInclude Include="..\..\..\cds\container\details\lazy_list_base.h" />\r
     <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\lazy_kvlist_hrc.h" />\r
     <ClInclude Include="..\..\..\cds\container\lazy_kvlist_nogc.h" />\r
     <ClInclude Include="..\..\..\cds\container\lazy_kvlist_ptb.h" />\r
-    <ClInclude Include="..\..\..\cds\container\lazy_list_base.h" />\r
     <ClInclude Include="..\..\..\cds\container\lazy_list_hp.h" />\r
     <ClInclude Include="..\..\..\cds\container\lazy_list_hrc.h" />\r
     <ClInclude Include="..\..\..\cds\container\lazy_list_impl.h" />\r
index 27a9dcc..d53ecdb 100644 (file)
     <ClInclude Include="..\..\..\cds\container\lazy_kvlist_ptb.h">\r
       <Filter>Header Files\cds\container</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\..\..\cds\container\lazy_list_base.h">\r
-      <Filter>Header Files\cds\container</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\..\..\cds\container\lazy_list_hp.h">\r
       <Filter>Header Files\cds\container</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\container\impl\lazy_kvlist.h">\r
       <Filter>Header Files\cds\container\impl</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\cds\container\details\lazy_list_base.h">\r
+      <Filter>Header Files\cds\container\details</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 2ef4073..f7b9eb5 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
 #include "cppunit/cppunit_proxy.h"
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 
 namespace ordlist {
     namespace cc = cds::container;
index 3480464..e800f49 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
 #include "cppunit/cppunit_proxy.h"
-#include <cds/container/lazy_list_base.h>
+#include <cds/container/details/lazy_list_base.h>
 
 namespace ordlist {
     namespace cc = cds::container;