WPILibC++ 2024.3.2
|
PointerIntPair - This class implements a pair of a pointer and small integer. More...
Public Member Functions | |
constexpr | PointerIntPair ()=default |
PointerIntPair (PointerTy PtrVal, IntType IntVal) | |
PointerIntPair (PointerTy PtrVal) | |
PointerTy | getPointer () const |
IntType | getInt () const |
void | setPointer (PointerTy PtrVal) & |
void | setInt (IntType IntVal) & |
void | initWithPointer (PointerTy PtrVal) & |
void | setPointerAndInt (PointerTy PtrVal, IntType IntVal) & |
PointerTy const * | getAddrOfPointer () const |
PointerTy * | getAddrOfPointer () |
void * | getOpaqueValue () const |
void | setFromOpaqueValue (void *Val) & |
bool | operator== (const PointerIntPair &RHS) const |
bool | operator!= (const PointerIntPair &RHS) const |
bool | operator< (const PointerIntPair &RHS) const |
bool | operator> (const PointerIntPair &RHS) const |
bool | operator<= (const PointerIntPair &RHS) const |
bool | operator>= (const PointerIntPair &RHS) const |
Static Public Member Functions | |
static PointerIntPair | getFromOpaqueValue (void *V) |
static PointerIntPair | getFromOpaqueValue (const void *V) |
PointerIntPair - This class implements a pair of a pointer and small integer.
It is designed to represent this in the space required by one pointer by bitmangling the integer into the low part of the pointer. This can only be done for small integers: typically up to 3 bits, but it depends on the number of bits available according to PointerLikeTypeTraits for the type.
Note that PointerIntPair always puts the IntVal part in the highest bits possible. For example, PointerIntPair<void*, 1, bool> will put the bit for the bool into bit #2, not bit #0, which allows the low two bits to be used for something else. For example, this allows: PointerIntPair<PointerIntPair<void*, 1, bool>, 1, bool> ... and the two bools will land in different bits.
|
constexprdefault |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |