Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
|
Value compare functor for container storing pairs of (Key, Mapped) types, such as in spatial::point_multimap, spatial::box_multimap, etc. More...
#include <spatial_value_compare.hpp>
Inherits KeyCompare.
Public Member Functions | |
ValueCompare (const KeyCompare &x) | |
Comparator being initilized with a value to copy into the interal comparison function. More... | |
ValueCompare () | |
Unintialized comparator. More... | |
bool | operator() (dimension_type dim, const Value &a, const Value &b) const |
Compare 2 values a and b with the comparison operator provided by KeyCompare . More... | |
Value compare functor for container storing pairs of (Key, Mapped) types, such as in spatial::point_multimap, spatial::box_multimap, etc.
These container provide a key_compare
functor type that is being used for the comparison of the value.
In spatial::point_multimap, spatial::box_multimap and other containers, the value type differs from the key type. Value type is a pair of key type and mapped type. The KeyCompare
functor, provided to the container is reused to compare the value by using the first element of each value (which is the key).
Value | A std::pair of key and value type. |
KeyCompare | A type that is a model of Generalized Comparison. |
Definition at line 38 of file spatial_value_compare.hpp.
|
explicit |
Comparator being initilized with a value to copy into the interal comparison function.
Definition at line 42 of file spatial_value_compare.hpp.
spatial::details::ValueCompare< Value, KeyCompare >::ValueCompare | ( | ) |
Unintialized comparator.
Definition at line 45 of file spatial_value_compare.hpp.
bool spatial::details::ValueCompare< Value, KeyCompare >::operator() | ( | dimension_type | dim, |
const Value & | a, | ||
const Value & | b | ||
) | const |
Compare 2 values a
and b
with the comparison operator provided by KeyCompare
.
dim | The dimension of comparison. |
a | The left value to compare. |
b | The right value to compare. |
KeyCompare()(a, b)
. Definition at line 56 of file spatial_value_compare.hpp.