43 return contextObjects_.lookup(
name,
nullptr);
55 contextObjects_.set(
name, objptr);
59 contextObjects_.erase(
name);
71 addContextObject(objptr->
name(), objptr);
81 contextObjects_.erase(
name);
92 contextObjects_.erase(objptr->
name());
100 return contextObjects_;
107 return contextObjects_;
111 template<
class ObjType>
116 return dynamic_cast<const ObjType*
>(this->cfindContextIOobject(
name));
void removeContextObject(const word &name)
Remove the object from the context.
bool hasContextObjects() const
True if any context fields are defined.
void addContextObject(const word &name, const regIOobject *)
Add the object to the context.
const word & name() const noexcept
Return the object name.
const regIOobject * cfindContextIOobject(const word &name) const
Find named context field, if it exists.
contextObjectTableType contextObjects_
Externally defined context fields.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
const ObjType * cfindContextObject(const word &name) const
Find context field object of specified type.
const contextObjectTableType & contextObjects() const noexcept
Read access to the object context.
A HashTable similar to std::unordered_map.
bool empty() const noexcept
True if the hash table is empty.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...