SAMRAI::hier::ComponentSelector Class Reference

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 <source/hierarchy/variables/ComponentSelector.h>

List of all members.

Public Member Functions

 ComponentSelector (const bool flag=false)
 ComponentSelector (const ComponentSelector &flags)
 ~ComponentSelector ()
int getSize () const
ComponentSelectoroperator= (const ComponentSelector &flags)
bool operator== (const ComponentSelector &flags) const
bool operator!= (const ComponentSelector &flags) const
ComponentSelector operator| (const ComponentSelector &flags) const
ComponentSelector operator & (const ComponentSelector &flags) const
ComponentSelector operator! () const
ComponentSelector andNot (const ComponentSelector &flags) const
ComponentSelectoroperator|= (const ComponentSelector &flags)
ComponentSelectoroperator &= (const ComponentSelector &flags)
bool isSet (const int i) const
void setFlag (const int i)
void clrFlag (const int i)
void setAllFlags ()
void clrAllFlags ()
virtual void printClassData (std::ostream &os=tbox::plog) const
 Print the bitvector data to the specified output stream.


Detailed Description

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.

See also:
tbox::SAMRAIManager


Constructor & Destructor Documentation

SAMRAI::hier::ComponentSelector::ComponentSelector ( const bool  flag = false  )  [inline]

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.

SAMRAI::hier::ComponentSelector::ComponentSelector ( const ComponentSelector flags  )  [inline]

Copy construct a create a component selector identical to the argument.

SAMRAI::hier::ComponentSelector::~ComponentSelector (  )  [inline]

The destructor for a component selector does nothing interesting.


Member Function Documentation

int SAMRAI::hier::ComponentSelector::getSize (  )  const [inline]

Return total number of flags (i.e., bits) in this component selector.

ComponentSelector & SAMRAI::hier::ComponentSelector::operator= ( const ComponentSelector flags  )  [inline]

Set all bit settings in this component selector to those in the argument component selector.

bool SAMRAI::hier::ComponentSelector::operator== ( const ComponentSelector flags  )  const [inline]

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.

bool SAMRAI::hier::ComponentSelector::operator!= ( const ComponentSelector flags  )  const [inline]

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.

ComponentSelector SAMRAI::hier::ComponentSelector::operator| ( const ComponentSelector flags  )  const [inline]

Generate and return a component selector set to the bitwise logical OR of this component selector and the argument component selector.

ComponentSelector SAMRAI::hier::ComponentSelector::operator & ( const ComponentSelector flags  )  const [inline]

Generate and return a component selector set to the bitwise logical AND of this component selector and the argument component selector.

ComponentSelector SAMRAI::hier::ComponentSelector::operator! (  )  const [inline]

Generate and return a component selector set to the bitwise logical negation of this component selector.

ComponentSelector SAMRAI::hier::ComponentSelector::andNot ( const ComponentSelector flags  )  const [inline]

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.

ComponentSelector & SAMRAI::hier::ComponentSelector::operator|= ( const ComponentSelector flags  )  [inline]

Set all bit settings in this component selector to the bitwise logical OR of this component selector and the argument component selector.

ComponentSelector & SAMRAI::hier::ComponentSelector::operator &= ( const ComponentSelector flags  )  [inline]

Set all bit settings in this component selector to the bitwise logical AND of this component selector and the argument component selector.

bool SAMRAI::hier::ComponentSelector::isSet ( const int  i  )  const [inline]

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.

void SAMRAI::hier::ComponentSelector::setFlag ( const int  i  )  [inline]

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.

void SAMRAI::hier::ComponentSelector::clrFlag ( const int  i  )  [inline]

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.

void SAMRAI::hier::ComponentSelector::setAllFlags (  )  [inline]

Set all bit vector positions to true.

void SAMRAI::hier::ComponentSelector::clrAllFlags (  )  [inline]

Set all bit vector positions to false.

void SAMRAI::hier::ComponentSelector::printClassData ( std::ostream &  os = tbox::plog  )  const [virtual]

Print the bitvector data to the specified output stream.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:30 2009 for SAMRAI by  doxygen 1.5.1