Sierra Toolkit
Version of the Day
|
This is a class for selecting buckets based on a set of meshparts and set logic. More...
#include <Selector.hpp>
Public Member Functions | |
Selector () | |
A default Selector selects nothing. | |
bool | operator== (const Selector &rhs) const |
bool | operator!= (const Selector &rhs) const |
Selector (const Part &part) | |
A part that is required. | |
Selector & | operator&= (const Selector &selector) |
Intersection: this = this INTERSECT ( expression ) | |
Selector & | operator|= (const Selector &selector) |
Union: this = this UNION ( expression ) | |
Selector & | complement () |
Complement: this = !(this) Postcondition: this is a compound expression. | |
Selector | operator! () const |
Complement: return !(this) | |
bool | operator() (const Part &part) const |
Is this part a member of the set defined by the selector expression. | |
bool | operator() (const Bucket &candidate) const |
Is this bucket a subset of the set defined by the selector expression. | |
bool | operator() (const Bucket *candidate) const |
Is this bucket a subset of the set defined by the selector expression. | |
bool | operator() (const Entity &candidate) const |
Is this entity a member of the set defined by the selector expression. | |
template<typename PartIterator , class Compare > | |
bool | apply (const std::pair< PartIterator, PartIterator > &part_range, Compare comp) const |
Is the intersection of the 'part_ords' parts a member of the set defined by the selector expression. | |
const std::vector< OpType > & | get_ops () const |
void | set_ops (const std::vector< OpType > &ops) |
void | compoundAll () |
Turn the entire expression into a compound. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Selector &selector) |
Pretty print the set-expression with part names. | |
Related Functions | |
(Note that these are not member functions.) | |
Selector | operator & (const Part &A, const Part &B) |
Selector | operator & (const Part &A, const Selector &B) |
Selector | operator & (const Selector &A, const Part &B) |
Selector | operator & (const Selector &A, const Selector &B) |
Selector | operator| (const Part &A, const Part &B) |
Selector | operator| (const Part &A, const Selector &B) |
Selector | operator| (const Selector &A, const Part &B) |
Selector | operator| (const Selector &A, const Selector &B) |
Selector | operator! (const Part &A) |
Selector | selectUnion (const PartVector &union_part_vector) |
Selector | selectIntersection (const PartVector &intersection_part_vector) |
Selector | selectField (const FieldBase &field) |
Return a selector for the union of the parts where field exists. | |
This is a class for selecting buckets based on a set of meshparts and set logic.
The selector allows complements, unions and intersections. All of this logic is converted to NAND, meaning nots and AND logic. Each operation is placed on a stack of operands where each operand is either a left parenthesis with a number of operands included in the compound object, or an actual meshpart. All operands have a unary bit used to complement the operand.
Please see the unit testing for additional documentation.
Definition at line 112 of file Selector.hpp.