TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node Class Reference

Public Member Functions

Nodeclone (MemoryManager::Ref &mm)
 

Static Public Member Functions

static Nodecreate (const Key &k, const Value &v, size_t h, Node *n, MemoryManager::Ref &mm)
 
static Nodecreate (const Key &k, size_t hashCode, Node *n, MemoryManager::Ref &mm)
 
static void destroy (Node *n, MemoryManager::Ref &mm)
 

Public Attributes

Entry entry
 
size_t hashCode
 
Nodenext
 

Private Member Functions

 Node (const Key &k, const Value &v, size_t h, Node *n)
 
 Node (const Key &k, size_t h, Node *n)
 

Detailed Description

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
class G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node

Linked list nodes used internally by HashTable.

Constructor & Destructor Documentation

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::Node ( const Key &  k,
const Value v,
size_t  h,
Node n 
)
inlineprivate
135  : entry(k, v), hashCode(h), next(n) {
137  }
arena_t NULL
Definition: jemalloc_internal.h:624
size_t hashCode
Definition: Table.h:128
#define debugAssert(exp)
Definition: debugAssert.h:160
Node * next
Definition: Table.h:129
Entry entry
Definition: Table.h:127
bool isValidHeapPointer(const void *x)
Definition: debug.h:38

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::Node ( const Key &  k,
size_t  h,
Node n 
)
inlineprivate
140  : entry(k), hashCode(h), next(n) {
142  }
arena_t NULL
Definition: jemalloc_internal.h:624
size_t hashCode
Definition: Table.h:128
#define debugAssert(exp)
Definition: debugAssert.h:160
Node * next
Definition: Table.h:129
Entry entry
Definition: Table.h:127
bool isValidHeapPointer(const void *x)
Definition: debug.h:38

+ Here is the call graph for this function:

Member Function Documentation

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
Node* G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::clone ( MemoryManager::Ref mm)
inline

Clones a whole chain;

164  {
165  return create(this->entry.key, this->entry.value, hashCode, (next == NULL) ? NULL : next->clone(mm), mm);
166  }
static Node * create(const Key &k, const Value &v, size_t h, Node *n, MemoryManager::Ref &mm)
Definition: Table.h:146
arena_t NULL
Definition: jemalloc_internal.h:624
size_t hashCode
Definition: Table.h:128
Key key
Definition: Table.h:109
Node * next
Definition: Table.h:129
Entry entry
Definition: Table.h:127
Node * clone(MemoryManager::Ref &mm)
Definition: Table.h:164

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
static Node* G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::create ( const Key &  k,
const Value v,
size_t  h,
Node n,
MemoryManager::Ref mm 
)
inlinestatic
146  {
147  Node* node = (Node*)mm->alloc(sizeof(Node));
148  return new (node) Node(k, v, h, n);
149  }
Node(const Key &k, const Value &v, size_t h, Node *n)
Definition: Table.h:134

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
static Node* G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::create ( const Key &  k,
size_t  hashCode,
Node n,
MemoryManager::Ref mm 
)
inlinestatic
151  {
152  Node* node = (Node*)mm->alloc(sizeof(Node));
153  return new (node) Node(k, hashCode, n);
154  }
size_t hashCode
Definition: Table.h:128
Node(const Key &k, const Value &v, size_t h, Node *n)
Definition: Table.h:134

+ Here is the call graph for this function:

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
static void G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::destroy ( Node n,
MemoryManager::Ref mm 
)
inlinestatic
156  {
157  n->~Node();
158  mm->free(n);
159  }

+ Here is the caller graph for this function:

Member Data Documentation

template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
Entry G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::entry
template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
size_t G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::hashCode
template<class Key, class Value, class HashFunc = HashTrait<Key>, class EqualsFunc = EqualsTrait<Key>>
Node* G3D::Table< Key, Value, HashFunc, EqualsFunc >::Node::next

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