00001 #ifndef Impala_Core_Table_Filter_h
00002 #define Impala_Core_Table_Filter_h
00003
00004 #include "Core/Table/TableTem.h"
00005
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Table
00011 {
00012
00018 template <class Table, class Constraint>
00019 bool*
00020 Filter(Table* t, Constraint& c)
00021 {
00022 if(t->Size() == 0)
00023 return 0;
00024 bool* filter = new bool[t->Size()];
00025 for(int i=0 ; i<t->Size() ; ++i)
00026 filter[i] = c.Check(t->Get1(i),t->Get2(i),t->Get3(i),t->Get4(i),t->Get5(i),
00027 t->Get6(i),t->Get7(i),t->Get8(i),t->Get9(i));
00028 return filter;
00029 }
00030
00031
00032 }
00033 }
00034 }
00035
00036 #endif