AttribBoundaries tracks all boundary IDs associated with an object. More...
#include <Attributes.h>
Public Types | |
typedef std::tuple< BoundaryID, bool > | Key |
Public Member Functions | |
void | setFrom (Key k) |
AttribBoundaries (TheWarehouse &w) | |
AttribBoundaries (TheWarehouse &w, BoundaryID id, bool must_be_restricted=false) | |
AttribBoundaries (TheWarehouse &w, const std::set< BoundaryID > &ids, bool must_be_restricted=false) | |
AttribBoundaries (TheWarehouse &w, const std::vector< BoundaryID > &ids, bool must_be_restricted=false) | |
virtual void | initFrom (const MooseObject *obj) override |
initFrom reads and stores the desired meta-data from obj for later matching comparisons. More... | |
virtual bool | isMatch (const Attribute &other) const override |
isMatch returns true if the meta-data stored in this attribute is equivalent to that stored in other. More... | |
virtual bool | isEqual (const Attribute &other) const override |
isEqual returns true if the meta-data stored in this attribute is identical to that stored in other. More... | |
hashfunc (_vals, _must_be_restricted) | |
clonefunc (AttribBoundaries) | |
bool | operator== (const Attribute &other) const |
bool | operator!= (const Attribute &other) const |
unsigned int | id () const |
returns the unique attribute ID associated with all attributes that have the same (mose derived) class as this object. More... | |
virtual std::size_t | hash () const =0 |
This function must return a deterministic value that is uniquely determined by the data the attribute holds (i.e. More... | |
virtual std::unique_ptr< Attribute > | clone () const =0 |
clone creates and returns and identical (deep) copy of this attribute - i.e. More... | |
Private Attributes | |
std::vector< BoundaryID > | _vals |
bool | _must_be_restricted = false |
AttribBoundaries tracks all boundary IDs associated with an object.
When running queries, an object matches true if it has at least one boundary id in common with the boundary IDs in the query attribute.
Definition at line 188 of file Attributes.h.
typedef std::tuple<BoundaryID, bool> AttribBoundaries::Key |
Definition at line 191 of file Attributes.h.
|
inline |
Definition at line 199 of file Attributes.h.
|
inline |
Definition at line 200 of file Attributes.h.
|
inline |
Definition at line 205 of file Attributes.h.
|
inline |
Definition at line 213 of file Attributes.h.
|
pure virtualinherited |
clone creates and returns and identical (deep) copy of this attribute - i.e.
the result of clone should return true if passed into isMatch.
Referenced by TheWarehouse::update().
AttribBoundaries::clonefunc | ( | AttribBoundaries | ) |
|
pure virtualinherited |
This function must return a deterministic value that is uniquely determined by the data the attribute holds (i.e.
is initialized with). Ideally, the data should be uniformly and randomly distributed across the domain of size_t values - e.g. 1 and 2 should hash to completely unrelated values. Use of std::hash for POD is encouraged. A convenience hash_combine function is also provided to combine the results an existing hash with one or more other values.
Referenced by std::hash< Attribute >::operator()().
AttribBoundaries::hashfunc | ( | _vals | , |
_must_be_restricted | |||
) |
|
inlineinherited |
returns the unique attribute ID associated with all attributes that have the same (mose derived) class as this object.
This ID is determined at construction time this
Definition at line 67 of file TheWarehouse.h.
Referenced by std::hash< Attribute >::operator()().
|
overridevirtual |
initFrom reads and stores the desired meta-data from obj for later matching comparisons.
Implements Attribute.
Definition at line 220 of file Attributes.C.
|
overridevirtual |
isEqual returns true if the meta-data stored in this attribute is identical to that stored in other.
isEqual does not need to check/compare the values from the instances' id() functions.
Implements Attribute.
Definition at line 254 of file Attributes.C.
|
overridevirtual |
isMatch returns true if the meta-data stored in this attribute is equivalent to that stored in other.
This is is for query matching - not exact equivalence. isMatch does not need to check/compare the values from the instances' id() functions.
Implements Attribute.
Definition at line 234 of file Attributes.C.
|
inlineinherited |
Definition at line 62 of file TheWarehouse.h.
|
inlineinherited |
Definition at line 58 of file TheWarehouse.h.
Definition at line 192 of file Attributes.h.
|
private |
Definition at line 230 of file Attributes.h.
Referenced by setFrom().
|
private |
Definition at line 229 of file Attributes.h.
Referenced by AttribBoundaries(), initFrom(), isEqual(), isMatch(), and setFrom().