Ordering predicate, based on opaque pointers to the record view implementation data. More...
#include <record_ordering.hpp>
Public Types | |
typedef bool | result_type |
Result type. More... | |
Public Member Functions | |
abstract_ordering () | |
Default constructor. More... | |
abstract_ordering (FunT const &fun) | |
Initializing constructor. More... | |
result_type | operator() (record_view const &left, record_view const &right) const |
Ordering operator. More... | |
Ordering predicate, based on opaque pointers to the record view implementation data.
Since record views only refer to a shared implementation data, this predicate is able to order the views by comparing the pointers to the data. Therefore two views are considered to be equivalent if they refer to the same implementation data. Otherwise it is not specified whether one record is ordered before the other until the predicate is applied. Note that the ordering may change every time the application runs.
This kind of ordering may be useful if log records are to be stored in an associative container with as least performance overhead as possible, when the particular order is not important.
The FunT
template argument is the predicate that is used to actually compare pointers. It should be able to compare const void*
pointers. The compared pointers may refer to distinct memory regions, the pointers must not be interpreted in any way.
typedef bool boost::abstract_ordering< FunT >::result_type |
Result type.
|
inline |
Default constructor.
Requires FunT
to be default constructible.
|
inlineexplicit |
Initializing constructor.
Constructs FunT
instance as a copy of the fun argument.
|
inline |
Ordering operator.
References boost::record_view::attribute_values(), and operator()().