JASSv2
Classes | Functions
hash_table.h File Reference

Thread-safe hash table (without delete). More...

#include <atomic>
#include <algorithm>
#include "allocator_pool.h"
#include "binary_tree.h"
#include "hash_pearson.h"
Include dependency graph for hash_table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  JASS::hash_table< KEY, ELEMENT, BITS >
 Thread-safe hash table (without delete). More...
 
class  JASS::hash_table< KEY, ELEMENT, BITS >::iterator
 Iterate over the hash table. More...
 

Functions

template<typename KEY , typename ELEMENT , size_t BITS>
std::ostream & JASS::operator<< (std::ostream &stream, const hash_table< KEY, ELEMENT, BITS > &map)
 Dump the contents of a hash table down an output stream. More...
 

Detailed Description

Thread-safe hash table (without delete).

Author
Andrew Trotman

Function Documentation

◆ operator<<()

template<typename KEY , typename ELEMENT , size_t BITS>
std::ostream& JASS::operator<< ( std::ostream &  stream,
const hash_table< KEY, ELEMENT, BITS > &  map 
)
inline

Dump the contents of a hash table down an output stream.

Parameters
stream[in] The stream to write to.
map[in] The hash table to write.
Template Parameters
KEYThe type used as the key to the elements.
ELEMENTThe element data returned given the key.
BITSThe size of the hash table is 2^BITS (must be 8, 16, or 24).
Returns
The stream once the tree has been written.