STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | Private Types | Private Attributes | Static Private Attributes | List of all members
__gnu_pbds::detail::cond_dealtor< HT_Map > Class Template Reference

Conditional dey destructor, cc_hash. More...

#include <ext/pb_ds/detail/cc_hash_table_map_/cond_key_dtor_entry_dealtor.hpp>

Public Types

typedef HT_Map::entry entry
 
typedef HT_Map::entry_allocator entry_allocator
 
typedef HT_Map::key_type key_type
 
typedef __rebind_e::other entry_allocator
 
typedef entry_allocator::pointer entry_pointer
 

Public Member Functions

 cond_dealtor (entry_allocator *p_a, entry *p_e)
 
 ~cond_dealtor ()
 
void set_key_destruct ()
 
void set_no_action_destructor ()
 
 cond_dealtor (entry_pointer p_e)
 
 ~cond_dealtor ()
 
void set_no_action ()
 

Protected Attributes

entry_allocator *const m_p_a
 
entry *const m_p_e
 
bool m_key_destruct
 
bool m_no_action_destructor
 

Private Types

typedef _Alloc::template
rebind< Entry > 
__rebind_e
 

Private Attributes

entry_pointer m_p_e
 

Static Private Attributes

static entry_allocator s_alloc
 

Detailed Description

template<typename HT_Map>
class __gnu_pbds::detail::cond_dealtor< HT_Map >

Conditional dey destructor, cc_hash.

Conditional deallocate constructor argument.

Member Typedef Documentation

template<typename HT_Map>
typedef _Alloc::template rebind<Entry> __gnu_pbds::detail::cond_dealtor< HT_Map >::__rebind_e
private
template<typename HT_Map>
typedef HT_Map::entry __gnu_pbds::detail::cond_dealtor< HT_Map >::entry
template<typename HT_Map>
typedef HT_Map::entry_allocator __gnu_pbds::detail::cond_dealtor< HT_Map >::entry_allocator
template<typename HT_Map>
typedef __rebind_e::other __gnu_pbds::detail::cond_dealtor< HT_Map >::entry_allocator
template<typename HT_Map>
typedef entry_allocator::pointer __gnu_pbds::detail::cond_dealtor< HT_Map >::entry_pointer
template<typename HT_Map>
typedef HT_Map::key_type __gnu_pbds::detail::cond_dealtor< HT_Map >::key_type

Constructor & Destructor Documentation

template<typename HT_Map>
__gnu_pbds::detail::cond_dealtor< HT_Map >::cond_dealtor ( entry_allocator p_a,
entry p_e 
)
inline
55  : m_p_a(p_a), m_p_e(p_e), m_key_destruct(false),
57  { }
bool m_no_action_destructor
Definition: cond_key_dtor_entry_dealtor.hpp:75
bool m_key_destruct
Definition: cond_key_dtor_entry_dealtor.hpp:74
entry_allocator *const m_p_a
Definition: cond_key_dtor_entry_dealtor.hpp:71
entry *const m_p_e
Definition: cond_key_dtor_entry_dealtor.hpp:72
template<typename HT_Map >
__gnu_pbds::detail::cond_dealtor< HT_Map >::~cond_dealtor ( )
inline
82  {
84  return;
85  if (m_key_destruct)
86  m_p_e->m_value.first.~key_type();
87  m_p_a->deallocate(m_p_e, 1);
88  }
bool m_no_action_destructor
Definition: cond_key_dtor_entry_dealtor.hpp:75
bool m_key_destruct
Definition: cond_key_dtor_entry_dealtor.hpp:74
entry_allocator *const m_p_a
Definition: cond_key_dtor_entry_dealtor.hpp:71
entry *const m_p_e
Definition: cond_key_dtor_entry_dealtor.hpp:72
template<typename HT_Map>
__gnu_pbds::detail::cond_dealtor< HT_Map >::cond_dealtor ( entry_pointer  p_e)
inline
59  : m_p_e(p_e), m_no_action_destructor(false) { }
bool m_no_action_destructor
Definition: cond_key_dtor_entry_dealtor.hpp:75
entry *const m_p_e
Definition: cond_key_dtor_entry_dealtor.hpp:72
template<typename HT_Map>
__gnu_pbds::detail::cond_dealtor< HT_Map >::~cond_dealtor ( )
inline
62  {
64  return;
65  s_alloc.deallocate(m_p_e, 1);
66  }
bool m_no_action_destructor
Definition: cond_key_dtor_entry_dealtor.hpp:75
static entry_allocator s_alloc
Definition: cond_dealtor.hpp:75
entry *const m_p_e
Definition: cond_key_dtor_entry_dealtor.hpp:72

Member Function Documentation

template<typename HT_Map>
void __gnu_pbds::detail::cond_dealtor< HT_Map >::set_key_destruct ( )
inline
64  { m_key_destruct = true; }
bool m_key_destruct
Definition: cond_key_dtor_entry_dealtor.hpp:74
template<typename HT_Map>
void __gnu_pbds::detail::cond_dealtor< HT_Map >::set_no_action ( )
inline
70  { m_no_action_destructor = true; }
bool m_no_action_destructor
Definition: cond_key_dtor_entry_dealtor.hpp:75
template<typename HT_Map>
void __gnu_pbds::detail::cond_dealtor< HT_Map >::set_no_action_destructor ( )
inline
68  { m_no_action_destructor = true; }
bool m_no_action_destructor
Definition: cond_key_dtor_entry_dealtor.hpp:75

Member Data Documentation

template<typename HT_Map>
bool __gnu_pbds::detail::cond_dealtor< HT_Map >::m_key_destruct
protected
template<typename HT_Map>
bool __gnu_pbds::detail::cond_dealtor< HT_Map >::m_no_action_destructor
protected
template<typename HT_Map>
entry_allocator* const __gnu_pbds::detail::cond_dealtor< HT_Map >::m_p_a
protected
template<typename HT_Map>
entry* const __gnu_pbds::detail::cond_dealtor< HT_Map >::m_p_e
protected
template<typename HT_Map>
entry_pointer __gnu_pbds::detail::cond_dealtor< HT_Map >::m_p_e
private
template<typename HT_Map>
cond_dealtor< Entry, _Alloc >::entry_allocator __gnu_pbds::detail::cond_dealtor< Entry, _Alloc >::s_alloc
staticprivate

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