MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DLHashTable2< T, U > Class Template Reference

#include <DLHashTable2.hpp>

Inheritance diagram for DLHashTable2< T, U >:

Classes

class  Iterator

Public Member Functions

 DLHashTable2 (ArrayPool< U > &thePool)
bool setSize (Uint32 noOfElements)
bool seize (Ptr< T > &)
void add (Ptr< T > &)
bool find (Ptr< T > &, const T &key) const
void getPtr (Ptr< T > &, Uint32 i) const
void getPtr (Ptr< T > &) const
T * getPtr (Uint32 i) const
void remove (Ptr< T > &, const T &key)
void remove (Uint32 i)
void remove (Ptr< T > &)
void removeAll ()
void release (Ptr< T > &, const T &key)
void release (Uint32 i)
void release (Ptr< T > &)
void getPtr (Iterator &iter) const
bool first (Iterator &iter) const
bool next (Iterator &iter) const
bool next (Uint32 bucket, Iterator &iter) const
bool isEmpty () const

Detailed Description

template<class T, class U>
class DLHashTable2< T, U >

DLHashTable2 is a DLHashTable variant meant for cases where different DLHashTable instances share a common pool (based on a union U).

Calls T constructor after seize from pool and T destructor before release (in all forms) into pool.

Definition at line 33 of file DLHashTable2.hpp.

Member Function Documentation

template<class T, class U >
void DLHashTable2< T, U >::add ( Ptr< T > &  obj)
inline

Add an object to the hashtable

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 208 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
bool DLHashTable2< T, U >::find ( Ptr< T > &  ptr,
const T &  key 
) const
inline

Find element key in hashtable update Ptr (i & p) (using key.equal(...))

Returns
true if found and false otherwise

Reimplemented in KeyTable2< T, U >, KeyTable2< OpCreateEvent, OpRecordUnion >, KeyTable2< U, V >, KeyTable2< OpDropEvent, OpRecordUnion >, KeyTable2< OpSubEvent, OpRecordUnion >, and KeyTable2< OpSignalUtil, OpRecordUnion >.

Definition at line 497 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T , class U >
bool DLHashTable2< T, U >::first ( Iterator iter) const
inline

First element in bucket

First element

Definition at line 233 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::getPtr ( Ptr< T > &  ptr,
Uint32  i 
) const
inline

Update i & p value according to i

Definition at line 472 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::getPtr ( Ptr< T > &  ptr) const
inline

Get element using ptr.i (update ptr.p)

Definition at line 480 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
T * DLHashTable2< T, U >::getPtr ( Uint32  i) const
inline

Get P value for i

Definition at line 490 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U>
void DLHashTable2< T, U >::getPtr ( Iterator iter) const

Sets curr.p according to curr.i

template<class T , class U >
bool DLHashTable2< T, U >::next ( Iterator iter) const
inline

Next Element

param iter - A "fully set" iterator

Definition at line 250 of file DLHashTable2.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T , class U >
bool DLHashTable2< T, U >::next ( Uint32  bucket,
Iterator iter 
) const
inline

Get next element starting from bucket

Parameters
bucket- Which bucket to start from
iter- An "uninitialized" iterator

Definition at line 437 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::release ( Ptr< T > &  ptr,
const T &  key 
)
inline

Remove element (and set Ptr to removed element) And return element to pool

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 311 of file DLHashTable2.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::release ( Uint32  i)
inline

Remove element and return to pool

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 361 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::release ( Ptr< T > &  ptr)
inline

Remove element and return to pool

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 399 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::remove ( Ptr< T > &  ptr,
const T &  key 
)
inline

Remove element (and set Ptr to removed element) Note does not return to pool

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 273 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::remove ( Uint32  i)
inline

Remove element Note does not return to pool

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 351 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T, class U >
void DLHashTable2< T, U >::remove ( Ptr< T > &  ptr)
inline

Remove element Note does not return to pool

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 371 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T , class U >
void DLHashTable2< T, U >::removeAll ( )
inline
template<class T, class U >
bool DLHashTable2< T, U >::seize ( Ptr< T > &  ptr)
inline

Seize element from pool - return i

Note must be added using add (even before hash.release) or be released using pool

Reimplemented in KeyTable2C< T, U >, KeyTable2C< OpCreateEvent, OpRecordUnion >, KeyTable2C< OpDropEvent, OpRecordUnion >, KeyTable2C< OpSubEvent, OpRecordUnion >, and KeyTable2C< OpSignalUtil, OpRecordUnion >.

Definition at line 456 of file DLHashTable2.hpp.

Here is the call graph for this function:

template<class T , class U >
bool DLHashTable2< T, U >::setSize ( Uint32  noOfElements)
inline

Set the no of bucket in the hashtable

Note, can currently only be called once

The size is already set to size

The mask is already set

Definition at line 179 of file DLHashTable2.hpp.


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