#include <basebitset.h>
BaseBitSet documentation.
Public Member Functions | |
| BaseBitSet ()=default | |
| BaseBitSet (BaseBitSet &&rhs) | |
| BaseBitSet & | operator= (BaseBitSet &&rhs) | 
| Bool | IsSet (UInt index) const | 
| Bool | IsSetUnchecked (UInt index) const | 
| void | ClearUnchecked (UInt index) | 
| Result< void > | Set (UInt index, Bool &isSet) | 
| Bool | IsEmpty () const | 
| Bool | IsPopulated () const | 
| Result< void > | Set (UInt index) | 
| void | SetUnchecked (UInt index) | 
| Result< void > | SetRange (UInt first, UInt last) | 
| void | SetRangeUnchecked (UInt first, UInt last) | 
| void | Clear (UInt index, Bool &cleared) | 
| void | Clear (UInt index) | 
| void | Reset () | 
| UInt | GetHashCode () const | 
| Bool | operator== (const BaseBitSet< ALLOCATOR > &rhs) const | 
| BaseBitSet< ALLOCATOR > & | operator|= (const BaseBitSet< ALLOCATOR > &rhs) | 
| BaseBitSet< ALLOCATOR > & | operator&= (const BaseBitSet< ALLOCATOR > &rhs) | 
| Result< void > | CopyFrom (const BaseBitSet< ALLOCATOR > &src) | 
| Result< void > | MergeOr (const BaseBitSet< ALLOCATOR > &src) | 
| Result< void > | MergeAnd (const BaseBitSet< ALLOCATOR > &src) | 
| Result< void > | MergeXOr (const BaseBitSet< ALLOCATOR > &src) | 
| Result< void > | Init (UInt count, Bool clearValue) | 
| Int | CountBits (UInt first=0, UInt last=(UInt) -1) const | 
| Int | GetCapacity () const | 
Private Types | |
| using | IntType = UInt | 
Private Member Functions | |
| MAXON_DISALLOW_COPY_AND_ASSIGN (BaseBitSet) | |
| void | RemoveTrailingZeroes () | 
| Int | CountBitsInWord (IntType word) const | 
Private Attributes | |
| BaseArray< IntType, BASEARRAY_DEFAULT_CHUNK_SIZE, BASEARRAYFLAGS::MOVEANDCOPYOBJECTS, ALLOCATOR > | _bits | 
Static Private Attributes | |
| static const Int | IntTypeBitCount | 
| static const UInt | INT_WIDTH_EXPONENT | 
| static const IntType | INT_MASK | 
| static const IntType | INT_WIDTH | 
      
  | 
  default | 
Default constructor.
| BaseBitSet | ( | BaseBitSet< ALLOCATOR > && | rhs | ) | 
Move constructor
| [in] | rhs | The bitset which is moved. | 
      
  | 
  private | 
| BaseBitSet& operator= | ( | BaseBitSet< ALLOCATOR > && | rhs | ) | 
Move assignment operator
| [in] | rhs | The bitset which is moved. | 
Checks if a bit is set in the bitset.
| [in] | index | Input index of the bit which should be set. | 
index is set, otherwise false. Checks if a bit is set in the bitset. It does not check if the underlaying array is big enough to contain a bit at this index.
| [in] | index | Input index of the bit which should be set. | 
| void ClearUnchecked | ( | UInt | index | ) | 
Clears a bit in the bitset. It does not check if the underlaying array is big enough to contain a bit at this index.
| [in] | index | Input index of the bit which should be set. | 
Sets the bit at a given index and returns if it was actually set.
| [in] | index | Input index of the bit which should be set. | 
| [out] | isSet | This will be set to true if the bit is actually set, otherwise to false. | 
| Bool IsEmpty | ( | ) | const | 
Check if the bitset is empty.
| Bool IsPopulated | ( | void | ) | const | 
Check if the bitset contains at least one element.
Sets the bit at a given index.
| [in] | index | Input index of the bit which should be set. | 
| void SetUnchecked | ( | UInt | index | ) | 
Sets the bit at a given index. It does not check if the underlaying array is big enough to contain a bit at this index.
| [in] | index | Input index of the bit which should be set.  | 
Sets all bits in the given range. first must be smaller or equal to last.
| [in] | first | First element to set. | 
| [in] | last | Last element to set. | 
Sets all bits in the given range. first must be smaller or equal to last.
| [in] | first | First element to set. | 
| [in] | last | Last element to set. | 
Clears the bit at a given index and returns if it was actually cleared.
| [in] | index | Input index of the bit which should be cleared. | 
| [out] | cleared | This will be set to true if the bit is actually cleared, otherwise to false. | 
| void Clear | ( | UInt | index | ) | 
Clears the bit at a given index.
| [in] | index | Input index of the bit which should be cleared. | 
| void Reset | ( | void | ) | 
Resets the bitset.
| UInt GetHashCode | ( | ) | const | 
Gets the hash code for the bitset, using GetHashCode() of the underlaying BaseArray. 
| Bool operator== | ( | const BaseBitSet< ALLOCATOR > & | rhs | ) | const | 
Compares two bitsets, using the compare operator of the underlaying BaseArray. 
| [in] | rhs | Input bitset rhs. | 
this == rhs. | BaseBitSet<ALLOCATOR>& operator|= | ( | const BaseBitSet< ALLOCATOR > & | rhs | ) | 
Calculates the bitwise OR of this bitset and another bitset.
| [in] | rhs | Input bitset rhs. | 
| BaseBitSet<ALLOCATOR>& operator&= | ( | const BaseBitSet< ALLOCATOR > & | rhs | ) | 
Calculates the bitwise AND of this bitset and another bitset.
| [in] | rhs | Input bitset rhs. | 
| Result<void> CopyFrom | ( | const BaseBitSet< ALLOCATOR > & | src | ) | 
Copies the data from another bitset, using CopyFrom() of the underlaying BaseArray 
| [in] | src | Source from which the data is taken | 
| Result<void> MergeOr | ( | const BaseBitSet< ALLOCATOR > & | src | ) | 
Merges the data from another bitset with logical OR. If the other bitset is larger it will resize this one.
| [in] | src | Source from which the data is merged. | 
| Result<void> MergeAnd | ( | const BaseBitSet< ALLOCATOR > & | src | ) | 
Merges the data from another bitset with logical AND. If the other bitset is larger it will resize this one.
| [in] | src | Source from which the data is merged. | 
| Result<void> MergeXOr | ( | const BaseBitSet< ALLOCATOR > & | src | ) | 
Merges the data from another bitset with logical XOR. If the other bitset is larger it will resize this one.
| [in] | src | Source from which the data is merged. | 
Initializes the array to have at least as much space to contain a certain amount of bits.
| [in] | count | Number of bits. | 
Counts the bits in the selection
| [in] | first | Index from which conting starts. | 
| [in] | last | Index where counting ends. | 
| Int GetCapacity | ( | ) | const | 
Get The maximum capacity of the BitSet
      
  | 
  private | 
Removes trailing zero bits in the underlaying BaseArray 
Counts the bits of a word.
| [in] | word | Word in which the bits have to be counted. | 
      
  | 
  staticprivate | 
      
  | 
  staticprivate | 
      
  | 
  staticprivate | 
      
  | 
  staticprivate | 
      
  | 
  private |