30 template<
class T,
class Key,
class Hash>
42 if (container_ && container_->size())
44 const label index = container_->hashKeyIndex(
key);
46 for (
node_type* ep = container_->table_[index]; ep; ep = ep->next_)
64 template<
class T,
class Key,
class Hash>
68 const label index = iter.
index_;
75 if (!size_ || !
entry || index < 0)
84 node_type* prev =
nullptr;
86 for (node_type* ep = table_[index]; ep; ep = ep->next_)
98 prev->next_ = entry->next_;
106 table_[index] = entry->next_;
110 iter.
entry_ =
reinterpret_cast<node_type*
>(
this);
118 iter.
index_ = (-index - 1);
127 template<
class T,
class Key,
class Hash>
131 node_type* entry = iter.entry_;
132 const label index = iter.index_;
139 if (!size_ || !entry || index < 0)
148 node_type* prev =
nullptr;
150 for (node_type* ep = table_[index]; ep; ep = ep->next_)
162 prev->next_ = entry->next_;
165 entry->next_ =
nullptr;
170 table_[index] = entry->next_;
171 iter.entry_ = table_[index];
172 entry->next_ =
nullptr;
180 iter.index_ = (-index - 1);
node_type * entry_
The selected entry.
label index_
Index within the hash-table data.
std::conditional< std::is_same< Foam::zero, typename std::remove_cv< T >::type >::value, Detail::HashTableSingle< Key >, Detail::HashTablePair< Key, T > >::type node_type
A table entry (node) that encapsulates the key/val tuple with an additional linked-list entry for has...
typename std::conditional< Const, const this_type::node_type, this_type::node_type >::type node_type
The node-type being addressed.
Forward iterator with non-const access.
A HashTable similar to std::unordered_map.
typename std::conditional< Const, const this_type, this_type >::type table_type
The HashTable container type.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
A keyword and a list of tokens is an 'entry'.