#include <bdlb_bitmaskutil.h>
|
static bsl::uint32_t | eq (int index) |
|
static bsl::uint64_t | eq64 (int index) |
|
static bsl::uint32_t | ge (int index) |
|
static bsl::uint64_t | ge64 (int index) |
|
static bsl::uint32_t | gt (int index) |
|
static bsl::uint64_t | gt64 (int index) |
|
static bsl::uint32_t | le (int index) |
|
static bsl::uint64_t | le64 (int index) |
|
static bsl::uint32_t | lt (int index) |
|
static bsl::uint64_t | lt64 (int index) |
|
static bsl::uint32_t | ne (int index) |
|
static bsl::uint64_t | ne64 (int index) |
|
static bsl::uint32_t | one (int index, int numBits) |
|
static bsl::uint64_t | one64 (int index, int numBits) |
|
static bsl::uint32_t | zero (int index, int numBits) |
|
static bsl::uint64_t | zero64 (int index, int numBits) |
|
This utility struct
provides a namespace for a set of bit-level, stateless functions that take one or two int
arguments and return masks of the built-in 32- and 64-bit integer types uint32_t
and uint64_t
, respectively.
◆ anonymous enum
Enumerator |
---|
k_BITS_PER_UINT32 | |
k_BITS_PER_UINT64 | |
◆ eq()
bsl::uint32_t bdlb::BitMaskUtil::eq |
( |
int |
index | ) |
|
|
inlinestatic |
◆ eq64()
bsl::uint64_t bdlb::BitMaskUtil::eq64 |
( |
int |
index | ) |
|
|
inlinestatic |
Return the unsigned integral value having the bit at the specified index
position set to 1, and all other bits set to 0. The behavior is undefined unless 0 <= index <= # of bits in result
.
◆ ge()
bsl::uint32_t bdlb::BitMaskUtil::ge |
( |
int |
index | ) |
|
|
inlinestatic |
◆ ge64()
bsl::uint64_t bdlb::BitMaskUtil::ge64 |
( |
int |
index | ) |
|
|
inlinestatic |
Return the unsigned integral value having all bits at positions greater than or equal to the specified index
set to 1, and all other bits set to 0. The behavior is undefined unless 0 <= index <= # of bits in result
.
◆ gt()
bsl::uint32_t bdlb::BitMaskUtil::gt |
( |
int |
index | ) |
|
|
inlinestatic |
◆ gt64()
bsl::uint64_t bdlb::BitMaskUtil::gt64 |
( |
int |
index | ) |
|
|
inlinestatic |
Return the unsigned integral value having all bits at positions greater than the specified index
set to 1, and all other bits set to 0. The behavior is undefined unless 0 <= index <= # of bits in result
.
◆ le()
bsl::uint32_t bdlb::BitMaskUtil::le |
( |
int |
index | ) |
|
|
inlinestatic |
◆ le64()
bsl::uint64_t bdlb::BitMaskUtil::le64 |
( |
int |
index | ) |
|
|
inlinestatic |
Return the unsigned integral value having all bits at positions less than or equal to the specified index
set to 1, and all other bits set to 0. The behavior is undefined unless 0 <= index <= # of bits in result
.
◆ lt()
bsl::uint32_t bdlb::BitMaskUtil::lt |
( |
int |
index | ) |
|
|
inlinestatic |
◆ lt64()
bsl::uint64_t bdlb::BitMaskUtil::lt64 |
( |
int |
index | ) |
|
|
inlinestatic |
Return the unsigned integral value having all bits at positions less than the specified index
set to 1, and all other bits set to 0. The behavior is undefined unless 0 <= index <= # of bits in result
.
◆ ne()
bsl::uint32_t bdlb::BitMaskUtil::ne |
( |
int |
index | ) |
|
|
inlinestatic |
◆ ne64()
bsl::uint64_t bdlb::BitMaskUtil::ne64 |
( |
int |
index | ) |
|
|
inlinestatic |
Return the unsigned integral value having the bit at the specified index
position set to 0, and all other bits set to 1. The behavior is undefined unless 0 <= index <= # of bits in result
.
◆ one()
bsl::uint32_t bdlb::BitMaskUtil::one |
( |
int |
index, |
|
|
int |
numBits |
|
) |
| |
|
inlinestatic |
◆ one64()
bsl::uint64_t bdlb::BitMaskUtil::one64 |
( |
int |
index, |
|
|
int |
numBits |
|
) |
| |
|
inlinestatic |
Return the unsigned integral value having the specified numBits
starting at the specified index
set to 1, and all other bits set to 0. The behavior is undefined unless 0 <= index
, 0 <= numBits
, and index + numBits <= # of bits in result
.
◆ zero()
bsl::uint32_t bdlb::BitMaskUtil::zero |
( |
int |
index, |
|
|
int |
numBits |
|
) |
| |
|
inlinestatic |
◆ zero64()
bsl::uint64_t bdlb::BitMaskUtil::zero64 |
( |
int |
index, |
|
|
int |
numBits |
|
) |
| |
|
inlinestatic |
Return the unsigned integral value having the specified numBits
starting at the specified index
set to 0, and all other bits set to 1. The behavior is undefined unless 0 <= index
, 0 <= numBits
, and index + numBits <= # of bits in result
.
The documentation for this struct was generated from the following file: