HashTableSingle< K > Struct Template Reference

Internal storage type for HashSet entries. More...

Collaboration diagram for HashTableSingle< K >:
[legend]

Public Types

typedef K key_type
 Type of key. More...
 
typedef Foam::zero::null mapped_type
 Type of content (no content: placeholder) More...
 
typedef key_type value_type
 Content storage type to the entry. More...
 

Public Member Functions

 HashTableSingle (const HashTableSingle &)=delete
 No copy construct. More...
 
void operator= (const HashTableSingle &)=delete
 No copy assignment. More...
 
template<class... Args>
 HashTableSingle (HashTableSingle *next, const key_type &key, Args &&...)
 Construct from next pointer, key, (unused) contents. More...
 
const key_typekey () const noexcept
 The key. More...
 
const mapped_typecval () const noexcept
 Const access to the (dummy) mapped value. More...
 
const mapped_typeval () const noexcept
 Const access to the (dummy) mapped value. More...
 
mapped_typeval () noexcept
 Non-const access to the (dummy) mapped value. More...
 
bool operator< (const HashTableSingle &rhs) const
 Compare keys. More...
 
void print (Ostream &os) const
 Write the key. There is no value to write. More...
 

Static Public Member Functions

static constexpr bool stores_value () noexcept
 This class does not store any value. More...
 

Public Attributes

const K key_
 The lookup key == content. More...
 
HashTableSinglenext_
 Addressing (next in collision list) More...
 

Detailed Description

template<class K>
struct Foam::Detail::HashTableSingle< K >

Internal storage type for HashSet entries.

Comprises a single (K) value and a linked-list entry for hash collisions

Definition at line 211 of file HashTableDetail.H.

Member Typedef Documentation

◆ key_type

typedef K key_type

Type of key.

Definition at line 216 of file HashTableDetail.H.

◆ mapped_type

Type of content (no content: placeholder)

Definition at line 219 of file HashTableDetail.H.

◆ value_type

Content storage type to the entry.

Definition at line 222 of file HashTableDetail.H.

Constructor & Destructor Documentation

◆ HashTableSingle() [1/2]

HashTableSingle ( const HashTableSingle< K > &  )
delete

No copy construct.

◆ HashTableSingle() [2/2]

HashTableSingle ( HashTableSingle< K > *  next,
const key_type key,
Args &&  ... 
)
inline

Construct from next pointer, key, (unused) contents.

Definition at line 253 of file HashTableDetail.H.

Member Function Documentation

◆ stores_value()

static constexpr bool stores_value ( )
inlinestaticconstexprnoexcept

This class does not store any value.

Definition at line 225 of file HashTableDetail.H.

◆ operator=()

void operator= ( const HashTableSingle< K > &  )
delete

No copy assignment.

◆ key()

const key_type & key ( ) const
inlinenoexcept

The key.

Definition at line 268 of file HashTableDetail.H.

References HashTableSingle< K >::key_.

◆ cval()

const mapped_type & cval ( ) const
inlinenoexcept

Const access to the (dummy) mapped value.

Definition at line 274 of file HashTableDetail.H.

References zero::null::dummy.

◆ val() [1/2]

const mapped_type & val ( ) const
inlinenoexcept

Const access to the (dummy) mapped value.

Definition at line 280 of file HashTableDetail.H.

References zero::null::dummy.

◆ val() [2/2]

mapped_type & val ( )
inlinenoexcept

Non-const access to the (dummy) mapped value.

Definition at line 286 of file HashTableDetail.H.

References zero::null::dummy.

◆ operator<()

bool operator< ( const HashTableSingle< K > &  rhs) const
inline

Compare keys.

Definition at line 293 of file HashTableDetail.H.

References HashTableSingle< K >::key_.

◆ print()

void print ( Ostream os) const
inline

Write the key. There is no value to write.

Definition at line 299 of file HashTableDetail.H.

References HashTableSingle< K >::key_, and os().

Here is the call graph for this function:

Member Data Documentation

◆ key_

const K key_

The lookup key == content.

Definition at line 234 of file HashTableDetail.H.

Referenced by HashTableSingle< K >::key(), HashTableSingle< K >::operator<(), and HashTableSingle< K >::print().

◆ next_

Addressing (next in collision list)

Definition at line 237 of file HashTableDetail.H.


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