33template<
class T,
class Key,
class Hash>
38 return Hash()(
key) & (capacity_ - 1);
44template<
class T,
class Key,
class Hash>
51template<
class T,
class Key,
class Hash>
58template<
class T,
class Key,
class Hash>
65template<
class T,
class Key,
class Hash>
73 << key <<
" not found in table. Valid entries: "
82template<
class T,
class Key,
class Hash>
90 << key <<
" not found in table. Valid entries: "
99template<
class T,
class Key,
class Hash>
111template<
class T,
class Key,
class Hash>
127template<
class T,
class Key,
class Hash>
134 return this->cfind(key);
138template<
class T,
class Key,
class Hash>
154template<
class T,
class Key,
class Hash>
155template<
class... Args>
162 return this->setEntry(
false, key, std::forward<Args>(
args)...);
166template<
class T,
class Key,
class Hash>
167template<
class... Args>
174 return this->setEntry(
true, key, std::forward<Args>(
args)...);
178template<
class T,
class Key,
class Hash>
185 return this->setEntry(
false, key, obj);
189template<
class T,
class Key,
class Hash>
196 return this->setEntry(
false, key, std::forward<T>(obj));
200template<
class T,
class Key,
class Hash>
207 return this->setEntry(
true, key, obj);
211template<
class T,
class Key,
class Hash>
218 return this->setEntry(
true, key, std::forward<T>(obj));
222template<
class T,
class Key,
class Hash>
230 return iter.
good() ? iter.
val() : deflt;
236template<
class T,
class Key,
class Hash>
239 return this->at(key);
243template<
class T,
class Key,
class Hash>
246 return this->at(key);
250template<
class T,
class Key,
class Hash>
261 return find(key).val();
265template<
class T,
class Key,
class Hash>
272 iterator iter(this->find(key));
Internally used base for iterator and const_iterator.
bool good() const noexcept
True if iterator points to an entry.
Forward iterator with const access.
reference val() const
Const access to referenced object (value)
Forward iterator with non-const access.
const_reference val() const
Const access to referenced object (value)
A HashTable similar to std::unordered_map.
bool empty() const noexcept
True if the hash table is empty.
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
bool insert(const Key &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
bool emplace_set(const Key &key, Args &&... args)
Emplace set an entry, overwriting any existing entries.
label capacity() const noexcept
The size of the underlying table.
label size() const noexcept
The number of elements in table.
friend Ostream & operator(Ostream &, const HashTable< T, Key, Hash > &tbl)
iterator find(const Key &key)
Find and return an iterator set at the hashed entry.
bool emplace(const Key &key, Args &&... args)
Emplace insert a new entry, not overwriting existing entries.
T & at(const Key &key)
Find and return a hashed entry. FatalError if it does not exist.
T & operator[](const Key &key)
Find and return a hashed entry. FatalError if it does not exist.
Ostream & operator()() const
Output stream (master only).
Lookup type of boundary radiation properties.
bool set() const
Are all the vector set.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
errorManipArg< error, int > exit(error &err, const int errNo=1)
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
Foam::argList args(argc, argv)