Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

BitSet< T > Class Template Reference

#include <BitSet.h>

List of all members.

Public Member Functions

 BitSet (uint32_t maxVal, T *arr=NULL)
 BitSet (BitSet &src)
 copy constructor

 ~BitSet ()
BitSetoperator &= (BitSet &src)
BitSetoperator|= (BitSet &src)
BitSetoperator~ ()
 Complement operator.

void clear ()
void setall ()
void print ()
void insert (uint32_t n)
void remove (uint32_t n)
bool contains (uint32_t n)
uint32_t size ()
bool empty ()
T * duplicateMembers ()
 generates an array of elements which are currently included in the set


Private Member Functions

uint32_t internalCount ()

Private Attributes

uint32_t maximum
uint8_t * bits
uint32_t cardinality
T * elements

Static Private Attributes

const uint8_t DivideLog = 3
const uint32_t ModMask = ~((uint32_t)0xffffffff << DivideLog)

template<class T = uint32_t>
class BitSet< T >


Constructor & Destructor Documentation

template<class T = uint32_t>
BitSet< T >::BitSet uint32_t  maxVal,
T *  arr = NULL
[inline]
 

Definition at line 22 of file BitSet.h.

template<class T = uint32_t>
BitSet< T >::BitSet BitSet< T > &  src  )  [inline]
 

copy constructor

Definition at line 29 of file BitSet.h.

template<class T = uint32_t>
BitSet< T >::~BitSet  )  [inline]
 

Definition at line 38 of file BitSet.h.


Member Function Documentation

template<class T = uint32_t>
void BitSet< T >::clear  )  [inline]
 

Definition at line 86 of file BitSet.h.

Referenced by FlowGraph::buildLoops(), and Function::generateCFG().

template<class T = uint32_t>
bool BitSet< T >::contains uint32_t  n  )  [inline]
 

Definition at line 126 of file BitSet.h.

Referenced by FlowGraph::buildLoops(), FlowGraph::depthFirstSearch(), Instruction::isMemoryXForm(), Instruction::isUnhandledMemoryOp(), Loop::Loop(), BitSet< BasicBlock * >::operator &=(), and BitSet< BasicBlock * >::operator|=().

template<class T = uint32_t>
T* BitSet< T >::duplicateMembers  )  [inline]
 

generates an array of elements which are currently included in the set

Definition at line 142 of file BitSet.h.

Referenced by Function::generateCFG().

template<class T = uint32_t>
bool BitSet< T >::empty  )  [inline]
 

Definition at line 135 of file BitSet.h.

template<class T = uint32_t>
void BitSet< T >::insert uint32_t  n  )  [inline]
 

Definition at line 106 of file BitSet.h.

Referenced by FlowGraph::buildLoops(), FlowGraph::depthFirstSearch(), Function::generateCFG(), Instruction::initMemoryOperationXops(), and XCoffFile::testBitSet().

template<class T = uint32_t>
uint32_t BitSet< T >::internalCount  )  [inline, private]
 

Definition at line 17 of file BitSet.h.

Referenced by BitSet< BasicBlock * >::BitSet(), BitSet< BasicBlock * >::clear(), BitSet< BasicBlock * >::operator &=(), BitSet< BasicBlock * >::operator|=(), BitSet< BasicBlock * >::operator~(), BitSet< BasicBlock * >::print(), and BitSet< BasicBlock * >::setall().

template<class T = uint32_t>
BitSet& BitSet< T >::operator &= BitSet< T > &  src  )  [inline]
 

Definition at line 40 of file BitSet.h.

template<class T = uint32_t>
BitSet& BitSet< T >::operator|= BitSet< T > &  src  )  [inline]
 

Definition at line 55 of file BitSet.h.

template<class T = uint32_t>
BitSet& BitSet< T >::operator~  )  [inline]
 

Complement operator.

Complements the set.

Returns:
The complement of the operand.

Definition at line 77 of file BitSet.h.

template<class T = uint32_t>
void BitSet< T >::print  )  [inline]
 

Definition at line 97 of file BitSet.h.

Referenced by XCoffFile::testBitSet().

template<class T = uint32_t>
void BitSet< T >::remove uint32_t  n  )  [inline]
 

Definition at line 116 of file BitSet.h.

Referenced by FlowGraph::depthFirstSearch(), and XCoffFile::testBitSet().

template<class T = uint32_t>
void BitSet< T >::setall  )  [inline]
 

Definition at line 92 of file BitSet.h.

Referenced by Function::generateCFG(), and XCoffFile::testBitSet().

template<class T = uint32_t>
uint32_t BitSet< T >::size  )  [inline]
 

Definition at line 134 of file BitSet.h.

Referenced by BitSet< BasicBlock * >::duplicateMembers(), and Function::generateCFG().


Member Data Documentation

template<class T = uint32_t>
uint8_t* BitSet< T >::bits [private]
 

Definition at line 13 of file BitSet.h.

Referenced by BitSet< BasicBlock * >::BitSet(), BitSet< BasicBlock * >::operator &=(), and BitSet< BasicBlock * >::operator|=().

template<class T = uint32_t>
uint32_t BitSet< T >::cardinality [private]
 

Definition at line 14 of file BitSet.h.

Referenced by BitSet< BasicBlock * >::BitSet().

template<class T = uint32_t>
const uint8_t BitSet< T >::DivideLog = 3 [static, private]
 

Definition at line 9 of file BitSet.h.

template<class T = uint32_t>
T* BitSet< T >::elements [private]
 

Definition at line 15 of file BitSet.h.

Referenced by BitSet< BasicBlock * >::BitSet().

template<class T = uint32_t>
uint32_t BitSet< T >::maximum [private]
 

Definition at line 12 of file BitSet.h.

Referenced by BitSet< BasicBlock * >::BitSet(), BitSet< BasicBlock * >::operator &=(), and BitSet< BasicBlock * >::operator|=().

template<class T = uint32_t>
const uint32_t BitSet< T >::ModMask = ~((uint32_t)0xffffffff << DivideLog) [static, private]
 

Definition at line 10 of file BitSet.h.


The documentation for this class was generated from the following file:
Generated on Mon Jan 28 11:08:37 2008 for PMaCInstrumentor by doxygen 1.3.5