Loading...
Searching...
No Matches
HashTableSingle< K > Struct Template Reference

Internal storage type for HashSet entries. More...

#include <HashTableDetail.H>

Collaboration diagram for HashTableSingle< K >:

Public Types

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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

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 238 of file HashTableDetail.H.

Member Typedef Documentation

◆ key_type

template<class K>
typedef K key_type

Type of key.

Definition at line 245 of file HashTableDetail.H.

◆ mapped_type

template<class K>
typedef Foam::zero mapped_type

Type of content (no content: placeholder).

Definition at line 250 of file HashTableDetail.H.

◆ value_type

template<class K>
typedef key_type value_type

Content storage type to the entry.

Definition at line 255 of file HashTableDetail.H.

Constructor & Destructor Documentation

◆ HashTableSingle() [1/2]

template<class K>
HashTableSingle ( const HashTableSingle< K > & )
delete

No copy construct.

References HashTableSingle().

Referenced by HashTableSingle(), HashTableSingle(), operator<(), and operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTableSingle() [2/2]

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

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

Definition at line 298 of file HashTableDetail.H.

References HashTableSingle(), key(), key_, and next_.

Here is the call graph for this function:

Member Function Documentation

◆ stores_value()

template<class K>
constexpr bool stores_value ( )
inlinestaticconstexprnoexcept

This class does not store any value.

Definition at line 260 of file HashTableDetail.H.

References Foam::noexcept.

◆ operator=()

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

No copy assignment.

References HashTableSingle().

Here is the call graph for this function:

◆ key()

template<class K>
const key_type & key ( ) const
inlinenoexcept

The key.

Definition at line 315 of file HashTableDetail.H.

References key_, and Foam::noexcept.

Referenced by HashTableSingle().

Here is the caller graph for this function:

◆ cval()

template<class K>
const mapped_type & cval ( ) const
inlinenoexcept

Const access to the (dummy) mapped value (for API only).

Definition at line 323 of file HashTableDetail.H.

References zero::dummy, and Foam::noexcept.

◆ val() [1/2]

template<class K>
const mapped_type & val ( ) const
inlinenoexcept

Const access to the (dummy) mapped value (for API only).

Definition at line 331 of file HashTableDetail.H.

References zero::dummy, and Foam::noexcept.

◆ val() [2/2]

template<class K>
mapped_type & val ( )
inlinenoexcept

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

Definition at line 339 of file HashTableDetail.H.

References zero::dummy, and Foam::noexcept.

◆ operator<()

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

Compare keys.

Definition at line 348 of file HashTableDetail.H.

References HashTableSingle(), key_, and Foam::rhs().

Here is the call graph for this function:

◆ print()

template<class K>
void print ( Ostream & os) const
inline

Write the key. There is no value to write.

Definition at line 356 of file HashTableDetail.H.

References key_, and os().

Here is the call graph for this function:

Member Data Documentation

◆ key_

template<class K>
const K key_

The lookup key == content.

Definition at line 271 of file HashTableDetail.H.

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

◆ next_

template<class K>
HashTableSingle* next_

Addressing (next in collision list).

Definition at line 276 of file HashTableDetail.H.

Referenced by HashTableSingle().


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