39 if (isA<Type>(*iter()))
41 objectNames[count++] = iter()->name();
59 if (isA<Type>(*iter()))
61 const word& objectName = iter()->name();
63 if (name.
match(objectName))
65 objectNames[count++] = objectName;
97 (strict && isType<Type>(*iter()))
98 || (!strict && isA<Type>(*iter()))
104 dynamic_cast<const Type*>(iter())
109 return objectsOfClass;
125 (strict && isType<Type>(*iter()))
126 || (!strict && isA<Type>(*iter()))
132 dynamic_cast<Type*>(iter())
137 return objectsOfClass;
148 const Type* vpsiPtr_ =
dynamic_cast<const Type*
>(iter());
155 else if (this->parentNotTime())
171 const Type* vpsiPtr_ =
dynamic_cast<const Type*
>(iter());
180 <<
" lookup of " << name <<
" from objectRegistry " 182 <<
" successful\n but it is not a " << Type::typeName
183 <<
", it is a " << iter()->type()
188 if (this->parentNotTime())
195 <<
" request for " << Type::typeName
196 <<
" " << name <<
" from objectRegistry " << this->
name()
197 <<
" failed\n available objects of type " << Type::typeName
203 return NullObjectRef<Type>();
210 return const_cast<Type&
>(lookupObject<Type>(
name));
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Type & lookupObjectRef(const word &name) const
Lookup and return the object reference of the given Type.
wordList names() const
Return the list of names of the IOobjects.
bool foundObject(const word &name) const
Is the named Type found?
Operations on lists of strings.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
label size() const
Return number of elements in table.
bool findStrings(const wordReListMatcher &matcher, const std::string &str)
Return true if string matches one of the regular expressions.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const word &)
Find and return an iterator set at the hashedEntry.
A class for handling words, derived from string.
friend class const_iterator
Declare friendship with the const_iterator.
An STL-conforming hash table.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
errorManip< error > abort(error &err)
A wordRe is a word, but can also have a regular expression for matching words.
List< word > wordList
A List of words.
void setSize(const label)
Reset size of List.
HashTable< const Type * > lookupClass(const bool strict=false) const
Lookup and return all objects of the given Type.
bool match(const std::string &, bool literalMatch=false) const
Smart match as regular expression or as a string.