Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::abstract_ordering< FunT > Class Template Reference

Ordering predicate, based on opaque pointers to the record view implementation data. More...

#include <record_ordering.hpp>

Inheritance diagram for boost::abstract_ordering< FunT >:
Collaboration diagram for boost::abstract_ordering< FunT >:

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

Detailed Description

template<typename FunT = less>
class boost::abstract_ordering< FunT >

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.

Member Typedef Documentation

template<typename FunT = less>
typedef bool boost::abstract_ordering< FunT >::result_type

Result type.

Constructor & Destructor Documentation

template<typename FunT = less>
boost::abstract_ordering< FunT >::abstract_ordering ( )
inline

Default constructor.

Requires FunT to be default constructible.

template<typename FunT = less>
boost::abstract_ordering< FunT >::abstract_ordering ( FunT const &  fun)
inlineexplicit

Initializing constructor.

Constructs FunT instance as a copy of the fun argument.

Member Function Documentation

template<typename FunT = less>
result_type boost::abstract_ordering< FunT >::operator() ( record_view const &  left,
record_view const &  right 
) const
inline

Ordering operator.

References boost::record_view::attribute_values(), and operator()().


The documentation for this class was generated from the following file: