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 d29b3c9d3f2bcef23ad694a34fb049cb1da1e31b..83ffff44988b691cc5426201a2450509fae80d5a 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_KVLIST_HP_H
 #define __CDS_CONTAINER_LAZY_KVLIST_HP_H
 
 #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>
 #include <cds/intrusive/lazy_list_hp.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/container/impl/lazy_kvlist.h>
index d7a49a512242d1ef42519a62fee516b928d99ae3..0e6a826854802a4a19218bdc831abda77dc1b97a 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_KVLIST_HRC_H
 #define __CDS_CONTAINER_LAZY_KVLIST_HRC_H
 
 #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>
 #include <cds/intrusive/lazy_list_hrc.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/container/impl/lazy_kvlist.h>
index 03e2b392e4c1e633b9b9a3280ceaecb7cd861d35..f05fc4446fb94f2cbd3ff1fd8fdddcd66c9e377d 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_KVLIST_NOGC_H
 
 #include <memory>
 #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>
 #include <cds/intrusive/lazy_list_nogc.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/details/functor_wrapper.h>
index 6fe263783e61248a16118a57ab307219cfed96c9..8b448f38e3e9965cc93da0540e172fb58a4857b7 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_KVLIST_PTB_H
 #define __CDS_CONTAINER_LAZY_KVLIST_PTB_H
 
 #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>
 #include <cds/intrusive/lazy_list_ptb.h>
 #include <cds/container/details/make_lazy_kvlist.h>
 #include <cds/container/impl/lazy_kvlist.h>
index e854631d49506bd66b0f0a51c64afafedbb0b357..10d47ae441680b977a833eab52d53294c99062df 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_KVLIST_RCU_H
 
 #include <memory>
 #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>
 #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 66816a72de6cd434d82b4392ada0ed16eb310a95..cbb73cdca1c1a1a97470bf0b2212864bdc76c364 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_LIST_HP_H
 #define __CDS_CONTAINER_LAZY_LIST_HP_H
 
 #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>
 #include <cds/intrusive/lazy_list_hp.h>
 #include <cds/container/details/make_lazy_list.h>
 #include <cds/container/lazy_list_impl.h>
index d63bbd158918d913cfe13812071f95eee60e8e9d..d466fd194528baf03b6d0f19fddfb337f029cc81 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_LIST_HRC_H
 #define __CDS_CONTAINER_LAZY_LIST_HRC_H
 
 #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>
 #include <cds/intrusive/lazy_list_hrc.h>
 #include <cds/container/details/make_lazy_list.h>
 #include <cds/container/lazy_list_impl.h>
index 3a5fbd72ccd035389909190dcd1daec5936986cc..96394f1708792427c37e30dcea8c6a656d23e28a 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_LIST_NOGC_H
 
 #include <memory>
 #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>
 
 #include <cds/intrusive/lazy_list_nogc.h>
 #include <cds/container/details/make_lazy_list.h>
 
index 4fed11424afac4ffb4e93185cf621b6c8a095056..be535fe2fffacb3436933a6b61736085e072bdca 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef __CDS_CONTAINER_LAZY_LIST_PTB_H
 #define __CDS_CONTAINER_LAZY_LIST_PTB_H
 
 #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>
 #include <cds/intrusive/lazy_list_ptb.h>
 #include <cds/container/details/make_lazy_list.h>
 #include <cds/container/lazy_list_impl.h>
index 59fa065b9aff71692326627667bd3bf7aeca7576..745273f06f48b09f84ef697f4c9a4c55e247dd43 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDS_CONTAINER_LAZY_LIST_RCU_H
 
 #include <memory>
 #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>
 #include <cds/intrusive/lazy_list_rcu.h>
 #include <cds/details/binary_functor_wrapper.h>
 #include <cds/container/details/make_lazy_list.h>
index 10a917ecf6281273b2acb3f01e11ba82bbcbff22..6379e67d9d7e83287909c1914973517e75e7d1b9 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\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\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_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
     <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 27a9dcca165711dd5ad9301f599833008b760bc2..d53ecdbd78da45cf92f12f82b966ff4378d89cdb 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_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\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\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
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 2ef4073fc03b6939e3563cd50c7a06c798240cc6..f7b9eb5236952442b3b0ebffcc01f43c1bfd426d 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
 #include "cppunit/cppunit_proxy.h"
 //$$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;
 
 namespace ordlist {
     namespace cc = cds::container;
index 34804647092afddda50884b6af32d93473c913ad..e800f497dcf72e5589bad9e2a2278264530a912c 100644 (file)
@@ -1,7 +1,7 @@
 //$$CDS-header$$
 
 #include "cppunit/cppunit_proxy.h"
 //$$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;
 
 namespace ordlist {
     namespace cc = cds::container;