BloombergLP::bdlb::BitStringImpUtil

This struct provides a namespace for static functions to be used solely in the implementation of BitStringUtil. The "Manipulators" are intended to be provided as arguments to templates in bdlb_bitstringutil, whereas the "Accessors" are to be called directly within that component.

Synopsis

Declared in <bdlb_bitstringimputil.h>

struct BitStringImpUtil;

Enums

NameDescription
Unnamed enum Number of bits in a uint64_t.

Static Member Functions

NameDescription
andEqBits Bitwise AND the specified least-significant numBits in the specified srcValue to those in the specified dstValue starting at the specified dstIndex. The behavior is undefined unless 0 <= dstIndex, 0 <= numBits, and dstIndex + numBits <= k_BITS_PER_UINT64.
andEqWord Assign to the specified *dstValue the value of *dstValue bitwise AND-ed with the specified srcValue.
find1AtMaxIndexRaw Return the index of the highest-order set bit in the specified non-zero value. The behavior is undefined unless 0 != value. Note that this method is "raw" due to the requirement that at least one bit in value must be set.
find1AtMinIndexRaw Return the index of the lowest-order set bit in the specified non-zero value. The behavior is undefined unless 0 != value. Note that this method is "raw" due to the requirement that at least one bit in value must be set.
minusEqBits Bitwise MINUS the specified least-significant numBits in the specified srcValue from those in the specified dstValue starting at the specified dstIndex. The behavior is undefined unless 0 <= dstIndex, 0 <= numBits, and dstIndex + numBits <= k_BITS_PER_UINT64. Note that the bitwise difference, a - b, is defined in C++ code as a & ~b.
minusEqWord Assign to the specified *dstValue the value of *dstValue bitwise AND-ed with the complement of the specified srcValue.
orEqBits Bitwise OR the specified least-significant numBits in the specified srcValue to those in the specified dstValue starting at the specified dstIndex. The behavior is undefined unless 0 <= dstIndex, 0 <= numBits, and dstIndex + numBits <= k_BITS_PER_UINT64.
orEqWord Assign to the specified *dstValue the value of *dstValue bitwise OR-ed with the specified srcValue.
setEqBits Replace the specified numBits in the specified dstValue starting at the specified dstIndex with the least-significant numBits of the specified srcValue. The behavior is undefined unless 0 <= dstIndex, 0 <= numBits, and dstIndex + numBits <= k_BITS_PER_UINT64.
setEqWord Assign to the specified *dstValue the value of the specified srcValue.
xorEqBits Bitwise XOR the specified least-significant numBits in the specified srcValue to those in the specified dstValue starting at the specified dstIndex. The behavior is undefined unless 0 <= dstIndex, 0 <= numBits, and dstIndex + numBits <= k_BITS_PER_UINT64.
xorEqWord Assign to the specified *dstValue the value of *dstValue bitwise XOR-ed with the specified srcValue.