libUTL++
utl::PointerIntPair< PtrT, IntBits, IntT, PtrTraits > Class Template Reference

(Pointer,Int) pair. More...

#include <PointerIntPair.h>

Inheritance diagram for utl::PointerIntPair< PtrT, IntBits, IntT, PtrTraits >:

Public Member Functions

void set (PtrT ptr, IntT val)
 Set pointer & value. More...
 
Pointer Value Accessors
auto getPointer () const
 
void setPointer (PtrT ptr)
 
Integer Value Accessors
auto getInt () const
 
void setInt (IntT val)
 
- Public Member Functions inherited from utl::PointerIntPairBase
auto get () const
 Get raw value. More...
 
void serialize (Stream &stream, uint_t io, uint_t mode=ser_default)
 Don't try to serialize. More...
 
bool operator< (const PointerIntPairBase &rhs) const
 
bool operator<= (const PointerIntPairBase &rhs) const
 
bool operator== (const PointerIntPairBase &rhs) const
 
bool operator> (const PointerIntPairBase &rhs) const
 
bool operator>= (const PointerIntPairBase &rhs) const
 

Detailed Description

template<typename PtrT, int IntBits, typename IntT = utl::uint_t, typename PtrTraits = PointerLikeTraits<PtrT>>
class utl::PointerIntPair< PtrT, IntBits, IntT, PtrTraits >

(Pointer,Int) pair.

Use available low-order bits in pointer-like values to store small integer values. The alignment of the pointed-to object determines how many bits are available for use.

Author
Adam McKee

Definition at line 116 of file PointerIntPair.h.

Member Function Documentation

◆ set()

template<typename PtrT, int IntBits, typename IntT = utl::uint_t, typename PtrTraits = PointerLikeTraits<PtrT>>
void utl::PointerIntPair< PtrT, IntBits, IntT, PtrTraits >::set ( PtrT  ptr,
IntT  val 
)
inline

Set pointer & value.

Definition at line 133 of file PointerIntPair.h.

References ASSERTD.


The documentation for this class was generated from the following file: