IBAMR  IBAMR version 0.19.
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
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 <ComponentSelector.h>

Inheritance diagram for SAMRAI::hier::ComponentSelector:
Inheritance graph
[legend]

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. More...
 

Private Attributes

int d_num_bitvector_longs
 
tbox::Array< unsigned long > d_vector
 

Static Private Attributes

static int s_bits_per_long
 

Detailed Description

See also
tbox::SAMRAIManager

Constructor & Destructor Documentation

◆ 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.

Member Function Documentation

◆ getSize()

int SAMRAI::hier::ComponentSelector::getSize ( ) const

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

◆ operator=()

ComponentSelector& SAMRAI::hier::ComponentSelector::operator= ( const ComponentSelector flags)

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

◆ operator==()

bool SAMRAI::hier::ComponentSelector::operator== ( const ComponentSelector flags) const

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|()

ComponentSelector SAMRAI::hier::ComponentSelector::operator| ( const ComponentSelector flags) const

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

◆ operator&()

ComponentSelector SAMRAI::hier::ComponentSelector::operator& ( const ComponentSelector flags) const

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

◆ operator!()

ComponentSelector SAMRAI::hier::ComponentSelector::operator! ( ) const

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

◆ andNot()

ComponentSelector SAMRAI::hier::ComponentSelector::andNot ( const ComponentSelector flags) const

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|=()

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

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

◆ operator&=()

ComponentSelector& SAMRAI::hier::ComponentSelector::operator&= ( const ComponentSelector flags)

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

Member Data Documentation

◆ 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: