Class ComponentSelector implements a simple bit vector of a fixed length and is typically used to apply operations on subsets of entries in the patch data array owned by a patch (e.g., allocate/deallocate).
All ComponentSelector objects have the same bit vector length that is established by the SAMRAIManager utility. See the documentation of the SAMRAIManager utility for information about changing this maximum value.
More...
#include <ComponentSelector.h>
◆ ComponentSelector() [1/2]
| SAMRAI::hier::ComponentSelector::ComponentSelector |
( |
const bool |
flag = false | ) |
|
Create a component selector and initialize all bits to the specified default boolean flag value. If no default value is provided, then all bits are set to false.
◆ ComponentSelector() [2/2]
| SAMRAI::hier::ComponentSelector::ComponentSelector |
( |
const ComponentSelector & |
flags | ) |
|
Copy construct a create a component selector identical to the argument.
◆ ~ComponentSelector()
| SAMRAI::hier::ComponentSelector::~ComponentSelector |
( |
| ) |
|
The destructor for a component selector does nothing interesting.
◆ getSize()
| int SAMRAI::hier::ComponentSelector::getSize |
( |
| ) |
const |
Return total number of flags (i.e., bits) in this component selector.
◆ operator=()
Set all bit settings in this component selector to those in the argument component selector.
◆ operator==()
Compare two component selectors for equality in all bit positions. If all bits are logically equal, then the return value is true; otherwise, the return value is false.
◆ operator!=()
Compare two component selectors for inequality in any bit position. If any two bits are logically unequal, then true is returned; otherwise, false is returned.
◆ operator|()
Generate and return a component selector set to the bitwise logical OR of this component selector and the argument component selector.
◆ operator&()
Generate and return a component selector set to the bitwise logical AND of this component selector and the argument component selector.
◆ operator!()
Generate and return a component selector set to the bitwise logical negation of this component selector.
◆ andNot()
Generate and return a component selector set to the bitwise logical AND of this component selector and the bitwise logical negation of the argument component selector.
◆ operator|=()
Set all bit settings in this component selector to the bitwise logical OR of this component selector and the argument component selector.
◆ operator&=()
Set all bit settings in this component selector to the bitwise logical AND of this component selector and the argument component selector.
◆ isSet()
| bool SAMRAI::hier::ComponentSelector::isSet |
( |
const int |
i | ) |
const |
Check whether the specified bit vector position is true. If so, return true; otherwise, return false.
When assertion checking is active, an assertion will result if the given position is out-of-bounds.
◆ setFlag()
| void SAMRAI::hier::ComponentSelector::setFlag |
( |
const int |
i | ) |
|
Set the specified bit vector position to true.
When assertion checking is active, an assertion will result if the given position is out-of-bounds.
◆ clrFlag()
| void SAMRAI::hier::ComponentSelector::clrFlag |
( |
const int |
i | ) |
|
Set the specified bit vector position to false.
When assertion checking is active, an assertion will result if the given position is out-of-bounds.
◆ setAllFlags()
| void SAMRAI::hier::ComponentSelector::setAllFlags |
( |
| ) |
|
Set all bit vector positions to true.
◆ clrAllFlags()
| void SAMRAI::hier::ComponentSelector::clrAllFlags |
( |
| ) |
|
Set all bit vector positions to false.
◆ printClassData()
| virtual void SAMRAI::hier::ComponentSelector::printClassData |
( |
std::ostream & |
os = tbox::plog | ) |
const |
|
virtual |
◆ s_bits_per_long
| int SAMRAI::hier::ComponentSelector::s_bits_per_long |
|
staticprivate |
◆ d_num_bitvector_longs
| int SAMRAI::hier::ComponentSelector::d_num_bitvector_longs |
|
private |
◆ d_vector
| tbox::Array<unsigned long> SAMRAI::hier::ComponentSelector::d_vector |
|
private |
The documentation for this class was generated from the following file: