proxygen
folly::f14::detail::F14BasicMap< K, M, H, E, A > Class Template Reference

#include <F14Map.h>

Inheritance diagram for folly::f14::detail::F14BasicMap< K, M, H, E, A >:

Public Member Functions

 F14BasicMap ()=default
 
std::size_t getAllocatedMemorySize () const
 
template<typename V >
void visitAllocationClasses (V &&visitor) const
 
template<typename V >
void visitContiguousRanges (V &&visitor) const
 

Private Types

using Super = std::unordered_map< K, M, H, E, A >
 

Detailed Description

template<typename K, typename M, typename H, typename E, typename A>
class folly::f14::detail::F14BasicMap< K, M, H, E, A >

Definition at line 53 of file F14Map.h.

Member Typedef Documentation

template<typename K, typename M, typename H, typename E, typename A>
using folly::f14::detail::F14BasicMap< K, M, H, E, A >::Super = std::unordered_map<K, M, H, E, A>
private

Definition at line 54 of file F14Map.h.

Constructor & Destructor Documentation

template<typename K, typename M, typename H, typename E, typename A>
folly::f14::detail::F14BasicMap< K, M, H, E, A >::F14BasicMap ( )
default

Member Function Documentation

template<typename K, typename M, typename H, typename E, typename A>
std::size_t folly::f14::detail::F14BasicMap< K, M, H, E, A >::getAllocatedMemorySize ( ) const
inline

Definition at line 67 of file F14Map.h.

Referenced by folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=().

67  {
68  std::size_t rv = 0;
70  [&](std::size_t bytes, std::size_t n) { rv += bytes * n; });
71  return rv;
72  }
void visitAllocationClasses(V &&visitor) const
Definition: F14Map.h:76
template<typename K, typename M, typename H, typename E, typename A>
template<typename V >
void folly::f14::detail::F14BasicMap< K, M, H, E, A >::visitAllocationClasses ( V &&  visitor) const
inline

Definition at line 76 of file F14Map.h.

Referenced by folly::f14::detail::F14BasicMap< Key, Mapped, Hasher, KeyEqual, Alloc >::getAllocatedMemorySize(), and folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=().

76  {
77  auto bc = this->bucket_count();
78  if (bc > 1) {
79  visitor(bc * sizeof(pointer), 1);
80  }
81  if (this->size() > 0) {
82  visitor(sizeof(StdNodeReplica<K, value_type, H>), this->size());
83  }
84  }
constexpr auto size(C const &c) -> decltype(c.size())
Definition: Access.h:45
template<typename K, typename M, typename H, typename E, typename A>
template<typename V >
void folly::f14::detail::F14BasicMap< K, M, H, E, A >::visitContiguousRanges ( V &&  visitor) const
inline

Definition at line 87 of file F14Map.h.

Referenced by folly::F14VectorMap< Key, Mapped, Hasher, KeyEqual, Alloc >::operator=().

87  {
88  for (value_type const& entry : *this) {
89  value_type const* b = std::addressof(entry);
90  visitor(b, b + 1);
91  }
92  }
char b

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