[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise4/kdepim/kleopatra/models
From: Marc Mutz <mutz () kde ! org>
Date: 2009-06-18 13:14:22
Message-ID: 1245330862.396413.3930.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 983537 by mutz:
add even more frequent-flyer algorithms
M +20 -0 predicates.h
--- branches/kdepim/enterprise4/kdepim/kleopatra/models/predicates.h #983536:983537
@@ -152,6 +152,26 @@
bool none_of_protocol( const T & t, GpgME::Protocol proto ) {
return kdtools::none_of( t, boost::bind( &GpgME::Key::protocol, _1 ) == \
proto ); }
+
+ template <typename T>
+ void grep_secret( T & t ) {
+ t.erase( std::remove_if( t.begin(), t.end(), boost::mem_fn( \
&GpgME::Key::hasSecret ) ), t.end() ); + }
+
+ template <typename T>
+ bool any_secret( const T & t ) {
+ return kdtools::any( t, boost::mem_fn( &GpgME::Key::hasSecret ) );
+ }
+
+ template <typename T>
+ bool all_secret( const T & t ) {
+ return kdtools::all( t, boost::mem_fn( &GpgME::Key::hasSecret ) );
+ }
+
+ template <typename T>
+ bool none_of_secret( const T & t ) {
+ return kdtools::none_of( t, boost::mem_fn( &GpgME::Key::hasSecret ) );
+ }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic