//$$CDS-header$$
-#ifndef __CDS_CONTAINER_STRIPED_MAP_H
-#define __CDS_CONTAINER_STRIPED_MAP_H
+#ifndef CDSLIB_CONTAINER_STRIPED_MAP_H
+#define CDSLIB_CONTAINER_STRIPED_MAP_H
#include <type_traits>
#include <cds/container/striped_set.h>
If the option is not specified, the \p %opt::less is used.
- \p opt::less - specifies binary predicate used for key comparison. Default is \p std::less<T>.
- \p opt::item_counter - item counter type. Default is \p atomicity::item_counter since some operation on the counter is performed
- without locks. Note that item counting is an essential part of the map algorithm, so dummy counter
+ without locks. Note that item counting is an essential part of the map algorithm, so dummy counter
like as \p atomicity::empty_item_counter is not suitable.
- \p opt::allocator - the allocator type using for memory allocation of bucket table and lock array. Default is \ref CDS_DEFAULT_ALLOCATOR.
- \p opt::resizing_policy - the resizing policy that is a functor that decides when to resize the hash map.
typedef typename base_class::allocator_type allocator_type ; ///< allocator type specified in options.
typedef typename base_class::mutex_policy mutex_policy ; ///< Mutex policy
+ //@cond
+ typedef cds::container::striped_set::implementation_tag implementation_tag;
+ //@endcond
protected:
//@cond
typedef typename base_class::scoped_cell_lock scoped_cell_lock;
template <typename K>
bool insert( K const& key )
{
- return insert_key( key, [](value_type&){} );
+ return insert_with( key, [](value_type&){} );
}
/// Inserts new node
template <typename K, typename V>
bool insert( K const& key, V const& val )
{
- return insert_key( key, [&val](value_type& item) { item.second = val ; } );
+ return insert_with( key, [&val](value_type& item) { item.second = val ; } );
}
/// Inserts new node and initialize it by a functor
it is preferable that the initialization should be completed only if inserting is successful.
*/
template <typename K, typename Func>
- bool insert_key( const K& key, Func func )
+ bool insert_with( const K& key, Func func )
{
return base_class::insert( key, func );
}
}} // namespace cds::container
-#endif // #ifndef __CDS_CONTAINER_STRIPED_MAP_H
+#endif // #ifndef CDSLIB_CONTAINER_STRIPED_MAP_H