Contiguous bit-vector for per-entity boolean flags.
More...
#include <BRepGraphInc_BitFlags.hxx>
|
| | BRepGraphInc_BitFlags ()=default |
| | Construct an empty bit-vector.
|
| void | Resize (const size_t theCount) |
| | Resize the bit-vector to hold at least theCount bits. Newly added bits are initialized to false.
|
| void | Set (const uint32_t theIndex) |
| | Set the bit at theIndex to true.
|
| void | Clear (const uint32_t theIndex) |
| | Clear the bit at theIndex to false.
|
| bool | Test (const uint32_t theIndex) const |
| | Return the value of the bit at theIndex.
|
| void | SetAll () |
| | Set all bits to true.
|
| void | ClearAll () |
| | Clear all bits to false.
|
| bool | HasAnyBitSet () const |
| | Return true if any bit is set.
|
| size_t | NbBlocks () const |
| | Return the number of blocks allocated.
|
| size_t | BitCount () const |
| | Return the number of valid bits represented by this vector.
|
| bool | IsValidIndex (const uint32_t theIndex) const |
| | Return true if theIndex is inside the valid bit range.
|
| const BlockType * | Blocks () const |
| | Return the raw block array for direct iteration.
|
Contiguous bit-vector for per-entity boolean flags.
Stores one bit per entity index in a flat array of 64-bit blocks. Provides O(1) Set/Clear/Test operations and cache-friendly sequential traversal (512 flags per 64-byte cache line via eight 64-bit blocks).
Used by BRepGraphInc_Storage to store IsRemoved and IsOwned flags outside the entity structs, improving cache locality during traversal and reducing struct size by eliminating bool-field padding.
Public helpers in BRepGraphInc_Storage validate indices before reaching this low-level container. Set, Clear, and Test remain unchecked for hot internal paths that already proved the index is in range.
if (aFlags.
Test(42)) { ... }
void Clear(const uint32_t theIndex)
Clear the bit at theIndex to false.
Definition BRepGraphInc_BitFlags.hxx:71
void Set(const uint32_t theIndex)
Set the bit at theIndex to true.
Definition BRepGraphInc_BitFlags.hxx:63
bool Test(const uint32_t theIndex) const
Return the value of the bit at theIndex.
Definition BRepGraphInc_BitFlags.hxx:79
BRepGraphInc_BitFlags()=default
Construct an empty bit-vector.
void Resize(const size_t theCount)
Resize the bit-vector to hold at least theCount bits. Newly added bits are initialized to false.
Definition BRepGraphInc_BitFlags.hxx:54
◆ BRepGraphInc_BitFlags()
| BRepGraphInc_BitFlags::BRepGraphInc_BitFlags |
( |
| ) |
|
|
default |
Construct an empty bit-vector.
◆ BitCount()
| size_t BRepGraphInc_BitFlags::BitCount |
( |
| ) |
const |
|
inlinenodiscard |
Return the number of valid bits represented by this vector.
◆ Blocks()
| const BlockType * BRepGraphInc_BitFlags::Blocks |
( |
| ) |
const |
|
inlinenodiscard |
Return the raw block array for direct iteration.
◆ Clear()
| void BRepGraphInc_BitFlags::Clear |
( |
const uint32_t | theIndex | ) |
|
|
inline |
Clear the bit at theIndex to false.
◆ ClearAll()
| void BRepGraphInc_BitFlags::ClearAll |
( |
| ) |
|
|
inline |
◆ HasAnyBitSet()
| bool BRepGraphInc_BitFlags::HasAnyBitSet |
( |
| ) |
const |
|
inlinenodiscard |
Return true if any bit is set.
◆ IsValidIndex()
| bool BRepGraphInc_BitFlags::IsValidIndex |
( |
const uint32_t | theIndex | ) |
const |
|
inlinenodiscard |
Return true if theIndex is inside the valid bit range.
◆ NbBlocks()
| size_t BRepGraphInc_BitFlags::NbBlocks |
( |
| ) |
const |
|
inlinenodiscard |
Return the number of blocks allocated.
◆ Resize()
| void BRepGraphInc_BitFlags::Resize |
( |
const size_t | theCount | ) |
|
|
inline |
Resize the bit-vector to hold at least theCount bits. Newly added bits are initialized to false.
◆ Set()
| void BRepGraphInc_BitFlags::Set |
( |
const uint32_t | theIndex | ) |
|
|
inline |
Set the bit at theIndex to true.
◆ SetAll()
| void BRepGraphInc_BitFlags::SetAll |
( |
| ) |
|
|
inline |
◆ Test()
| bool BRepGraphInc_BitFlags::Test |
( |
const uint32_t | theIndex | ) |
const |
|
inlinenodiscard |
Return the value of the bit at theIndex.
The documentation for this class was generated from the following file: