class Geo PackedKeyValuePair

This is the documentation for Enlighten.

class Geo PackedKeyValuePair

template<typename KeyType, typename ValueType, Geo::u32>
class Geo::PackedKeyValuePair

Represents a key and value that are convertible to unsigned integer.

The key and value are packed into a single 32-bit register. The value is packed into N low bits and the key is packed into the remaining high bits.

Parameters

 

KeyType

The type of the key. Must be convertible to and from Geo::u32.

 

ValueType

The type of the value. Must be convertible to and from Geo::u32.

 

N

The number of bits into which X is packed. W is packed into the remaining bits.

 

Variables

Name

Description

Name

Description

Geo::u32 m_Packed

Two unsigned integer values. Value is packed into N low bits. Key is packed into the remaining high bits.

Functions

Name

Description

Name

Description

GetKey()

Returns the key.

GetPacked()

Returns the packed key and value.

GetValue()

Returns the value.

PackedKeyValuePair(Geo::u32)

Construct from packed key and value.

PackedKeyValuePair(KeyType, ValueType)

Construct from key and value, each using only the appropriate number of bits.

SetKey(KeyType)

Set the key.

SetValue(ValueType)

Set the value.

Friends

Name

Description

Name

Description

friend bool operator!=(PackedKeyValuePair left, PackedKeyValuePair right)

Returns true if operands are not equal.

friend bool operator<(PackedKeyValuePair left, PackedKeyValuePair right)

Returns true if the left operand is ordered before the right operand.

friend bool operator==(PackedKeyValuePair left, PackedKeyValuePair right)

Returns true if operands are equal.



KeyType Geo::PackedKeyValuePair< KeyType, ValueType, N >::GetKey


public: KeyType GetKey() const


Returns the key.



Geo::u32 Geo::PackedKeyValuePair< KeyType, ValueType, N >::GetPacked


public: Geo::u32 GetPacked() const


Returns the packed key and value.



ValueType Geo::PackedKeyValuePair< KeyType, ValueType, N >::GetValue