HashTableCore Class Reference

Bits that are independent of HashTable template parameters. More...

Classes

class  const_iterator_pair
 Factory class for creating a begin/end pair for any const iterator. More...
 

Public Member Functions

 HashTableCore ()=default
 Construct null. More...
 
 ClassName ("HashTable")
 Define template name and debug. More...
 

Static Public Member Functions

static label canonicalSize (const label requested_size)
 Return a canonical (power-of-two) of the requested size. More...
 
template<class IteratorType , class TableType >
static IteratorType iterator_begin (TableType &table)
 Factory method to create a non-const iterator begin. More...
 
template<class IteratorType , class TableType >
static IteratorType iterator_cbegin (const TableType &table)
 Factory method to create a const iterator begin. More...
 
template<class IteratorType >
static const IteratorType & iterator_end ()
 Factory method to return an iterator end. More...
 
template<class IteratorType >
static const IteratorType & iterator_cend ()
 Factory method to return an iterator cend. More...
 

Static Public Attributes

static const label maxTableSize
 Maximum allowable internal table size. Approximately labelMax/4. More...
 

Detailed Description

Bits that are independent of HashTable template parameters.

Template invariant parts of hash table implementation.

Source files

Definition at line 56 of file HashTableCore.H.

Constructor & Destructor Documentation

◆ HashTableCore()

HashTableCore ( )
default

Construct null.

Member Function Documentation

◆ canonicalSize()

Foam::label canonicalSize ( const label  requested_size)
static

Return a canonical (power-of-two) of the requested size.

Definition at line 45 of file HashTableCore.C.

References HashTableCore::maxTableSize.

◆ ClassName()

ClassName ( "HashTable"  )

Define template name and debug.

◆ iterator_begin()

IteratorType iterator_begin ( TableType &  table)
inlinestatic

Factory method to create a non-const iterator begin.

Definition at line 32 of file HashTableCoreI.H.

◆ iterator_cbegin()

IteratorType iterator_cbegin ( const TableType &  table)
inlinestatic

Factory method to create a const iterator begin.

Definition at line 42 of file HashTableCoreI.H.

◆ iterator_end()

const IteratorType & iterator_end ( )
inlinestatic

Factory method to return an iterator end.

Simply reinterprets a NullObject as a hash-table iterator.

Definition at line 51 of file HashTableCoreI.H.

References Foam::nullObjectPtr.

◆ iterator_cend()

const IteratorType & iterator_cend ( )
inlinestatic

Factory method to return an iterator cend.

Simply reinterprets a NullObject as a hash-table iterator.

Definition at line 58 of file HashTableCoreI.H.

References Foam::nullObjectPtr.

Member Data Documentation

◆ maxTableSize

const Foam::label maxTableSize
static

Maximum allowable internal table size. Approximately labelMax/4.

Definition at line 59 of file HashTableCore.H.

Referenced by HashTableCore::canonicalSize().


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