rename type_traits to traits in flat_combining namespace
authorkhizmax <libcds.dev@gmail.com>
Tue, 11 Nov 2014 18:28:21 +0000 (21:28 +0300)
committerkhizmax <libcds.dev@gmail.com>
Tue, 11 Nov 2014 18:28:21 +0000 (21:28 +0300)
cds/algo/flat_combining.h
cds/container/fcdeque.h
cds/container/fcpriority_queue.h
cds/container/fcqueue.h
cds/container/fcstack.h
cds/intrusive/fcqueue.h
cds/intrusive/fcstack.h

index a018a4a9855971b4aed5192a0515c9b794a079f9..486fe7247bb8c870e7c5d25571d02aeec977e871 100644 (file)
@@ -179,10 +179,10 @@ namespace cds { namespace algo {
         /// Type traits of \ref kernel class
         /**
             You can define different type traits for \ref kernel
-            by specifying your struct based on \p %type_traits
+            by specifying your struct based on \p %traits
             or by using \ref make_traits metafunction.
         */
-        struct type_traits
+        struct traits
         {
             typedef cds::lock::Spin             lock_type;  ///< Lock type
             typedef cds::backoff::delay_of<2>   back_off;   ///< Back-off strategy
@@ -193,7 +193,6 @@ namespace cds { namespace algo {
 
         /// Metafunction converting option list to traits
         /**
-            This is a wrapper for <tt> cds::opt::make_options< type_traits, Options...> </tt>
             \p Options are:
             - \p opt::lock_type - mutex type, default is \p cds::lock::Spin
             - \p opt::back_off - back-off strategy, defalt is \p cds::backoff::delay_of<2>
@@ -209,7 +208,7 @@ namespace cds { namespace algo {
             typedef implementation_defined type ;   ///< Metafunction result
 #   else
             typedef typename cds::opt::make_options<
-                typename cds::opt::find_type_traits< type_traits, Options... >::type
+                typename cds::opt::find_type_traits< traits, Options... >::type
                 ,Options...
             >::type   type;
 #   endif
@@ -219,7 +218,7 @@ namespace cds { namespace algo {
         /**
             Template parameters:
             - \p PublicationRecord - a type derived from \ref publication_record
-            - \p Traits - a type traits of flat combining, default is flat_combining::type_traits.
+            - \p Traits - a type traits of flat combining, default is \p flat_combining::traits.
                 \ref make_traits metafunction can be used to create type traits
 
             The kernel object should be a member of a container class. The container cooperates with flat combining
@@ -243,18 +242,18 @@ namespace cds { namespace algo {
         */
         template <
             typename PublicationRecord
-            ,typename Traits = type_traits
+            ,typename Traits = traits
         >
         class kernel
         {
         public:
-            typedef PublicationRecord   publication_record_type;        ///< publication record type
-            typedef Traits              type_traits;                    ///< Type traits
-            typedef typename type_traits::lock_type global_lock_type;   ///< Global lock type
-            typedef typename type_traits::back_off  back_off;           ///< back-off strategy type
-            typedef typename type_traits::allocator allocator;          ///< Allocator type (used for allocating publication_record_type data)
-            typedef typename type_traits::stat      stat;               ///< Internal statistics
-            typedef typename type_traits::memory_model memory_model;    ///< C++ memory model
+            typedef PublicationRecord   publication_record_type;   ///< publication record type
+            typedef Traits   traits;                               ///< Type traits
+            typedef typename traits::lock_type global_lock_type;   ///< Global lock type
+            typedef typename traits::back_off  back_off;           ///< back-off strategy type
+            typedef typename traits::allocator allocator;          ///< Allocator type (used for allocating publication_record_type data)
+            typedef typename traits::stat      stat;               ///< Internal statistics
+            typedef typename traits::memory_model memory_model;    ///< C++ memory model
 
         protected:
             //@cond
index 7b4fd422914409066461428f69ebd9d189cce394..481ee4253bbf9bca2af2fa14a6399e743a4843db 100644 (file)
@@ -57,7 +57,7 @@ namespace cds { namespace container {
         };
 
         /// FCDeque type traits
-        struct traits: public cds::algo::flat_combining::type_traits
+        struct traits: public cds::algo::flat_combining::traits
         {
             typedef empty_stat      stat;   ///< Internal statistics
             static CDS_CONSTEXPR const bool enable_elimination = false; ///< Enable \ref cds_elimination_description "elimination"
index 7d211d4b6dce5f879cde5a263ba2d83295587ab2..9707ce04123ba4e6055e3d3d0e8f31ad9d2866f8 100644 (file)
@@ -44,7 +44,7 @@ namespace cds { namespace container {
         };
 
         /// FCPriorityQueue traits
-        struct traits: public cds::algo::flat_combining::type_traits
+        struct traits: public cds::algo::flat_combining::traits
         {
             typedef empty_stat      stat;   ///< Internal statistics
         };
index ce0301be06a9d08ed15d2433af65d6c5db75558d..f069487836ee1a27e050414aaf1dd5d45214ba7e 100644 (file)
@@ -47,7 +47,7 @@ namespace cds { namespace container {
         };
 
         /// FCQueue type traits
-        struct traits: public cds::algo::flat_combining::type_traits
+        struct traits: public cds::algo::flat_combining::traits
         {
             typedef empty_stat      stat;   ///< Internal statistics
             static CDS_CONSTEXPR const bool enable_elimination = false; ///< Enable \ref cds_elimination_description "elimination"
index f358968a7295e656ae3eb886f3d70580bef42254..0dbf5a8f4790339e9efe9814e0b7ae9df5db71fe 100644 (file)
@@ -47,7 +47,7 @@ namespace cds { namespace container {
         };
 
         /// FCStack type traits
-        struct traits: public cds::algo::flat_combining::type_traits
+        struct traits: public cds::algo::flat_combining::traits
         {
             typedef empty_stat      stat;   ///< Internal statistics
             static CDS_CONSTEXPR const bool enable_elimination = false; ///< Enable \ref cds_elimination_description "elimination"
index b0bef10717d967b391f96c52e326e00b1ae26065..f076b63e6bf7969ffe175569993aeb0ea4213bc1 100644 (file)
@@ -43,7 +43,7 @@ namespace cds { namespace intrusive {
         };
 
         /// FCQueue type traits
-        struct traits: public cds::algo::flat_combining::type_traits
+        struct traits: public cds::algo::flat_combining::traits
         {
             typedef cds::intrusive::opt::v::empty_disposer  disposer ; ///< Disposer to erase removed elements. Used only in \p FCQueue::clear() function
             typedef empty_stat      stat;   ///< Internal statistics
index 4a334d15c2e4c39f8a6102d83d3c9bcaedc305bb..b372a4d9d07f7f5d3d2a0ce0f4df376ddf59273c 100644 (file)
@@ -43,7 +43,7 @@ namespace cds { namespace intrusive {
         };
 
         /// FCStack type traits
-        struct traits: public cds::algo::flat_combining::type_traits
+        struct traits: public cds::algo::flat_combining::traits
         {
             typedef cds::intrusive::opt::v::empty_disposer  disposer ; ///< Disposer to erase removed elements. Used only in \p FCStack::clear() function
             typedef empty_stat      stat;   ///< Internal statistics