STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | List of all members
__gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc > Class Template Reference

#include <ext/pb_ds/assoc_container.hpp>

Inheritance diagram for __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >:

Public Types

typedef list_update_tag container_category
 
typedef Eq_Fn eq_fn
 
typedef Update_Policy update_policy
 

Public Member Functions

 list_update ()
 
template<typename It >
 list_update (It first, It last)
 
 list_update (const list_update &other)
 
virtual ~list_update ()
 
list_updateoperator= (const list_update &other)
 
void swap (list_update &other)
 

Private Types

typedef PB_DS_LU_BASE base_type
 

Detailed Description

template<typename Key, typename Mapped, class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
class __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >

A list-update based associative container.

Template Parameters
KeyKey type.
MappedMap type.
Eq_FnEqual functor.
Update_PolicyUpdate policy, determines when an element will be moved to the front of the list.
_AllocAllocator type.

Base is detail::lu_map.

Member Typedef Documentation

template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
typedef PB_DS_LU_BASE __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::base_type
private
template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
typedef list_update_tag __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::container_category
template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
typedef Eq_Fn __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::eq_fn
template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
typedef Update_Policy __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::update_policy

Constructor & Destructor Documentation

template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
__gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::list_update ( )
inline
825 { }
template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
template<typename It >
__gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::list_update ( It  first,
It  last 
)
inline

Constructor taking __iterators to a range of value_types. The value_types between first_it and last_it will be inserted into the container object.

832  { base_type::copy_from_range(first, last); }
template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
__gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::list_update ( const list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc > &  other)
inline
835  : base_type((const base_type&)other) { }
PB_DS_LU_BASE base_type
Definition: assoc_container.hpp:818
template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
virtual __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::~list_update ( )
inlinevirtual
838 { }

Member Function Documentation

template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
list_update& __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::operator= ( const list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc > &  other)
inline
842  {
843  if (this !=& other)
844  {
845  list_update tmp(other);
846  swap(tmp);
847  }
848  return *this;
849  }
void swap(list_update &other)
Definition: assoc_container.hpp:852
list_update()
Definition: assoc_container.hpp:825
template<typename Key , typename Mapped , class Eq_Fn = typename detail::default_eq_fn<Key>::type, class Update_Policy = detail::default_update_policy::type, class _Alloc = std::allocator<char>>
void __gnu_pbds::list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc >::swap ( list_update< Key, Mapped, Eq_Fn, Update_Policy, _Alloc > &  other)
inline
853  { base_type::swap(other); }
void swap(exception_ptr &__lhs, exception_ptr &__rhs)
Definition: exception_ptr.h:160

The documentation for this class was generated from the following file: