48 template<
class>
class DynamicID;
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>
146 os.
check(
"Ostream& operator<<(Ostream&, const DynamicID<ObjectType>&)");
A class that holds the data needed to identify things (zones, patches) in a dynamic mesh.
const labelList & indices() const
Return indices of matching zones.
const wordRe & name() const
Return name.
label index() const
Return index of first matching zone.
DynamicID(const wordRe &key, const ObjectType &obj)
Construct from name.
bool active() const
Has the zone been found.
void update(const ObjectType &obj)
Update.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool empty() const
Return true if the UList is empty (ie, size() is zero)
A wordRe is a word, but can also have a regular expression for matching words.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelList findIndices(const ListType &, typename ListType::const_reference, const label start=0)
Find all occurrences of given element. Linear search.
Ostream & operator<<(Ostream &, const ensightPart &)