Akonadi
Akonadi::Server::_detail::ById< Op > Struct Template Reference
#include <entity.h>
Public Types | |
using | result_type = bool |
Public Member Functions | |
template<typename E > | |
bool | operator() (const E &lhs, const E &rhs) const |
template<typename E > | |
bool | operator() (const E &lhs, Entity::Id rhs) const |
template<typename E > | |
bool | operator() (Entity::Id lhs, const E &rhs) const |
bool | operator() (Entity::Id lhs, Entity::Id rhs) const |
Detailed Description
template<template< typename U > class Op>
struct Akonadi::Server::_detail::ById< Op >
struct Akonadi::Server::_detail::ById< Op >
Binary predicate to sort collections of Entity subclasses by their id.
Example for sorting:
std::sort( coll.begin(), coll.end(), _detail::ById<std::less>() );
Definition entity.h:192
Example for finding by id:
// linear:
std::find_if( coll.begin(), coll.end(), bind( _detail::ById<std::equal_to>(), _1, myId ) );
// binary:
std::lower_bound( coll.begin(), coll.end(), myId, _detail::ById<std::less>() );
Member Typedef Documentation
◆ result_type
template<template< typename U > class Op>
using Akonadi::Server::_detail::ById< Op >::result_type = bool |
Member Function Documentation
◆ operator()() [1/4]
template<template< typename U > class Op>
template<typename E >
|
inline |
◆ operator()() [2/4]
template<template< typename U > class Op>
template<typename E >
|
inline |
◆ operator()() [3/4]
template<template< typename U > class Op>
template<typename E >
|
inline |
◆ operator()() [4/4]
template<template< typename U > class Op>
|
inline |
The documentation for this struct was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.