CMS 3D CMS Logo

Static Public Member Functions

helper::CollectionFilter< C, S, N > Struct Template Reference

#include <CollectionFilterTrait.h>

List of all members.

Static Public Member Functions

static bool filter (const C &source, const S &select, const N &sizeSelect)

Detailed Description

template<typename C, typename S, typename N>
struct helper::CollectionFilter< C, S, N >

Definition at line 14 of file CollectionFilterTrait.h.


Member Function Documentation

template<typename C , typename S , typename N >
static bool helper::CollectionFilter< C, S, N >::filter ( const C &  source,
const S &  select,
const N &  sizeSelect 
) [inline, static]

Definition at line 15 of file CollectionFilterTrait.h.

References i, n, and benchmark_cfg::select.

                                                                                   {
      size_t n = 0;
      for( typename C::const_iterator i = source.begin(); i != source.end(); ++ i )
        if ( select( * i ) ) n ++;
      return sizeSelect( n );      
    }