Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

NameDescription
Geo::u32 m_Packed

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

Functions

NameDescription
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

NameDescription
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.


Anchor
aae0f1b7e67e3a896d169586fab24db20
aae0f1b7e67e3a896d169586fab24db20

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

...

public: KeyType GetKey() const

...

Returns the key.


Anchor
a766caddeb716f63f49b7b447cb1df4e7
a766caddeb716f63f49b7b447cb1df4e7

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

...

public: Geo::u32 GetPacked() const

...

Returns the packed key and value.


Anchor
abe42c050401f1f79ca966561aecd1776
abe42c050401f1f79ca966561aecd1776

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

...

public: ValueType GetValue() const

...

Returns the value.


Anchor
ae9712767d0bba47a76c95a8dc6dc9c7c
ae9712767d0bba47a76c95a8dc6dc9c7c

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

...

public: PackedKeyValuePair
(
    Geo::u32 packed
)

...

Construct from packed key and value.


Anchor
a6508129a43502e4e3b4664b112ce7ce5
a6508129a43502e4e3b4664b112ce7ce5

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

...

public: PackedKeyValuePair
(
    KeyType key,
    ValueType value
)

...

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


Anchor
af306db0c7bb9deb18dd5ba118a6c630f
af306db0c7bb9deb18dd5ba118a6c630f

void Geo::PackedKeyValuePair< KeyType, ValueType, N >::SetKey

...

public: void SetKey
(
    KeyType key
)

...

Set the key.


Anchor
a1e8298b8b67f50bf032b89a87e0d0a55
a1e8298b8b67f50bf032b89a87e0d0a55

void Geo::PackedKeyValuePair< KeyType, ValueType, N >::SetValue

...

public: void SetValue
(
    ValueType value
)

...

Set the value.