File indexed_value.hpp

template<typename T>
struct IndexedValue
#include <indexed_value.hpp>

A tuple that consists of an index and a value.

Template Parameters:

T – The type of the value

Public Functions

inline IndexedValue()
inline IndexedValue(uint32 index)
Parameters:

index – The index

inline IndexedValue(uint32 index, T value)
Parameters:
  • index – The index

  • value – The value

Public Members

uint32 index

The index.

T value

The value.

struct CompareIndex
#include <indexed_value.hpp>

Allows to compare two objects of type IndexedValue by their index.

Public Functions

inline bool operator()(const IndexedValue<T> &lhs, const IndexedValue<T> &rhs) const

Returns whether the a given object of type IndexedValue should go before a second one.

Parameters:
  • lhs – A reference to a first object of type IndexedValue

  • rhs – A reference to a second object of type IndexedValue

Returns:

True, if the first object should go before the second one, false otherwise

struct CompareValue
#include <indexed_value.hpp>

Allows to compare two objects of type IndexedValue by their value.

Public Functions

inline bool operator()(const IndexedValue<T> &lhs, const IndexedValue<T> &rhs) const

Returns whether the a given object of type IndexedValue should go before a second one.

Parameters:
  • lhs – A reference to a first object of type IndexedValue

  • rhs – A reference to a second object of type IndexedValue

Returns:

True, if the first object should go before the second one, false otherwise