|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLMISC::CBitSet Class ReferenceA BitSet, to test / set flags quickly.
More...
#include <bit_set.h>
List of all members.
Detailed Description
A BitSet, to test / set flags quickly.
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 49 of file bit_set.h.
Constructor & Destructor Documentation
NLMISC::CBitSet::CBitSet |
( |
|
) |
|
|
NLMISC::CBitSet::CBitSet |
( |
uint |
numBits |
) |
|
|
NLMISC::CBitSet::CBitSet |
( |
const CBitSet & |
bs |
) |
|
|
NLMISC::CBitSet::~CBitSet |
( |
|
) |
|
|
Member Function Documentation
bool NLMISC::CBitSet::allCleared |
( |
|
) |
|
|
bool NLMISC::CBitSet::allSet |
( |
|
) |
|
|
void NLMISC::CBitSet::clear |
( |
sint |
bitNumber |
) |
[inline] |
|
void NLMISC::CBitSet::clear |
( |
|
) |
|
|
void NLMISC::CBitSet::clearAll |
( |
|
) |
|
|
bool NLMISC::CBitSet::compareRestrict |
( |
const CBitSet & |
bs |
) |
const |
|
|
Compare two BitSet not necessarely of same size.
The comparison is done on N bits, where N=min(this->size(), bs.size()) -
Returns:
-
true if the N common bits of this and bs are the same. false otherwise.
Definition at line 242 of file bit_set.cpp.
References Array, min, NL_BITLEN, and NumBits. |
void NLMISC::CBitSet::flip |
( |
|
) |
|
|
bool NLMISC::CBitSet::get |
( |
sint |
bitNumber |
) |
const [inline] |
|
CBitSet NLMISC::CBitSet::operator & |
( |
const CBitSet & |
bs |
) |
const |
|
|
Return this ANDed with bs.
The result BitSet is of size of *this . Any missing bits into bs will be considered as 0.
Definition at line 142 of file bit_set.cpp.
References CBitSet. |
CBitSet & NLMISC::CBitSet::operator &= |
( |
const CBitSet & |
bs |
) |
|
|
|
AND the bitArray with bs.
The bitset size is not changed. Any missing bits into bs will be considered as 0.
Definition at line 179 of file bit_set.cpp.
References Array, MaskLast, min, and NumBits. |
bool NLMISC::CBitSet::operator!= |
( |
const CBitSet & |
bs |
) |
const |
|
CBitSet & NLMISC::CBitSet::operator= |
( |
const CBitSet & |
bs |
) |
|
|
bool NLMISC::CBitSet::operator== |
( |
const CBitSet & |
bs |
) |
const |
|
bool NLMISC::CBitSet::operator[] |
( |
sint |
bitNumber |
) |
const [inline] |
|
|
Get the value of a bit.
Definition at line 93 of file bit_set.h.
References get. |
CBitSet NLMISC::CBitSet::operator^ |
( |
const CBitSet & |
bs |
) |
const |
|
|
Return this XORed with bs.
The result BitSet is of size of *this . Any missing bits into bs will be considered as 0.
Definition at line 158 of file bit_set.cpp.
References CBitSet. |
CBitSet & NLMISC::CBitSet::operator^= |
( |
const CBitSet & |
bs |
) |
|
|
|
XOR the bitArray with bs.
The bitset size is not changed. Any missing bits into bs will be considered as 0.
Definition at line 209 of file bit_set.cpp.
References Array, MaskLast, min, and NumBits. |
CBitSet NLMISC::CBitSet::operator| |
( |
const CBitSet & |
bs |
) |
const |
|
|
Return this ORed with bs.
The result BitSet is of size of *this . Any missing bits into bs will be considered as 0.
Definition at line 150 of file bit_set.cpp.
References CBitSet. |
CBitSet & NLMISC::CBitSet::operator|= |
( |
const CBitSet & |
bs |
) |
|
|
|
OR the bitArray with bs.
The bitset size is not changed. Any missing bits into bs will be considered as 0.
Definition at line 195 of file bit_set.cpp.
References Array, MaskLast, min, and NumBits. |
CBitSet NLMISC::CBitSet::operator~ |
( |
|
) |
const |
|
void NLMISC::CBitSet::resize |
( |
uint |
numBits |
) |
|
|
void NLMISC::CBitSet::resizeNoReset |
( |
uint |
numBits, |
|
|
bool |
value = false |
|
) |
|
|
void NLMISC::CBitSet::set |
( |
sint |
bitNumber |
) |
[inline] |
|
|
Set a bit to 1.
Definition at line 98 of file bit_set.h.
References set. |
void NLMISC::CBitSet::set |
( |
sint |
bitNumber, |
|
|
bool |
value |
|
) |
[inline] |
|
|
Set a bit to 0 or 1.
Definition at line 72 of file bit_set.h.
References Array, NL_BITLEN, NL_BITLEN_SHIFT, nlassert, NumBits, and value.
Referenced by clear, NL3D::IModel::foul, resizeNoReset, serial, set, and NL3D::IAnimatable::touch. |
void NLMISC::CBitSet::setAll |
( |
|
) |
|
|
uint NLMISC::CBitSet::size |
( |
|
) |
const |
|
Member Data Documentation
std::vector<uint32> NLMISC::CBitSet::Array [private]
|
|
|
Definition at line 169 of file bit_set.h.
Referenced by allCleared, allSet, CBitSet, clear, clearAll, compareRestrict, flip, get, operator &=, operator=, operator==, operator^=, operator|=, resize, resizeNoReset, set, and setAll. |
uint32 NLMISC::CBitSet::MaskLast [private]
|
|
|
Definition at line 171 of file bit_set.h.
Referenced by allSet, CBitSet, clear, flip, operator &=, operator=, operator^=, operator|=, resize, resizeNoReset, and setAll. |
sint NLMISC::CBitSet::NumBits [private]
|
|
|
Definition at line 170 of file bit_set.h.
Referenced by allCleared, allSet, CBitSet, clear, compareRestrict, flip, get, operator &=, operator=, operator==, operator^=, operator|=, resize, resizeNoReset, set, and size. |
The documentation for this class was generated from the following files:
|
|