Go to the documentation of this file.
32 template<
class T,
class Key,
class Hash>
39 template<
class T,
class Key,
class Hash>
48 template<
class T,
class Key,
class Hash>
60 template<
class T,
class Key,
class Hash>
61 template<
class... Args>
77 template<
class T,
class Key,
class Hash>
78 template<
class... Args>
85 return this->
set(key,
new T(std::forward<Args>(
args)...));
89 template<
class T,
class Key,
class Hash>
106 template<
class T,
class Key,
class Hash>
123 template<
class T,
class Key,
class Hash>
127 std::unique_ptr<T>&& ptr
140 template<
class T,
class Key,
class Hash>
147 const T* old = this->get(key);
151 if (ok && old != ptr)
153 delete const_cast<T*
>(old);
160 template<
class T,
class Key,
class Hash>
171 template<
class T,
class Key,
class Hash>
182 template<
class T,
class Key,
class Hash>
186 std::unique_ptr<T>&& ptr
srcOptions insert("case", fileName(rootDirSource/caseDirSource))
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
bool set(const Key &key, T *ptr)
Assign a new entry, overwriting existing entries.
T * release() noexcept
Return pointer to the managed object and release ownership.
T * get() noexcept
Return pointer to managed object without nullptr checking.
bool insert(const Key &, T *)=delete
HashPtrTable()
Default construct with default table capacity.
A HashTable similar to std::unordered_map.
bool emplace_set(const Key &key, Args &&... args)
Emplace set an entry, overwriting any existing entries.
typename parent_type::const_iterator const_iterator
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const T * get(const Key &key) const
Foam::argList args(argc, argv)
bool emplace(const Key &key, Args &&... args)
Emplace insert a new entry, not overwriting existing entries.