Go to the documentation of this file.
32 template<
class T,
class Key,
class Hash>
41 template<
class T,
class Key,
class Hash>
53 template<
class T,
class Key,
class Hash>
54 template<
class... Args>
70 template<
class T,
class Key,
class Hash>
71 template<
class... Args>
78 return this->
set(key,
new T(std::forward<Args>(
args)...));
82 template<
class T,
class Key,
class Hash>
99 template<
class T,
class Key,
class Hash>
116 template<
class T,
class Key,
class Hash>
120 std::unique_ptr<T>&& ptr
133 template<
class T,
class Key,
class Hash>
140 const T* old = this->
get(key);
144 if (ok && old != ptr)
146 delete const_cast<T*
>(old);
153 template<
class T,
class Key,
class Hash>
164 template<
class T,
class Key,
class Hash>
175 template<
class T,
class Key,
class Hash>
179 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.
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
bool set(const Key &key, T *ptr)
Assign a new entry, overwriting existing entries.
T * release() noexcept
Release ownership and return the pointer.
T * get() noexcept
Return pointer to managed object without nullptr checking.
HashPtrTable()=default
Default construct with default table capacity.
bool insert(const Key &, T *)=delete
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
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
Foam::argList args(argc, argv)
bool emplace(const Key &key, Args &&... args)
Emplace insert a new entry, not overwriting existing entries.