50 template<
class ObjectType>
51 Ostream& operator<<(Ostream&, const DynamicID<ObjectType>&);
57 template<
class ObjectType>
110 return indices_.
empty() ? -1 : indices_[0];
116 return !indices_.
empty();
123 void update(
const ObjectType& obj)
125 indices_ = obj.findIndices(key_);
131 friend Ostream& operator<< <ObjectType>
138 template<
class ObjectType>
139 Ostream& operator<<(Ostream& os, const DynamicID<ObjectType>& dynId)
146 os.check(
"Ostream& operator<<(Ostream&, const DynamicID<ObjectType>&)");
void update(const ObjectType &obj)
Update.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A class that holds the data needed to identify things (zones, patches) in a dynamic mesh...
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
A wordRe is a word, but can also have a regular expression for matching words.
DynamicID(const wordRe &key, const ObjectType &obj)
Construct from name.
label index() const
Return index of first matching zone.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool active() const
Has the zone been found.
const wordRe & name() const
Return name.
const labelList & indices() const
Return indices of matching zones.