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.
A class for handling keywords in dictionaries.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const keyType & name() const
Return name.
A class that holds the data needed to identify things (zones, patches) in a dynamic mesh...
DynamicID(const keyType &key, const ObjectType &obj)
Construct from name.
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
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 labelList & indices() const
Return indices of matching zones.