Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

Contains.h

Go to the documentation of this file.
00001 #ifndef Impala_Core_Column_Contains_h
00002 #define Impala_Core_Column_Contains_h
00003 
00004 #include "Core/Column/InvalidColumn.h"
00005 
00006 namespace Impala
00007 {
00008 namespace Core
00009 {
00010 namespace Column
00011 {
00012 
00013 
00014 template <class C>
00015 inline bool
00016 Contains(C* col, typename C::ColElemType elem)
00017 {
00018     return Contains(col, elem, 0, col->Capacity());
00019 }
00020 
00021 template <class C>
00022 inline bool
00023 Contains(C* col, typename C::ColElemType elem, int start, int end)
00024 {
00025     if (end == -1)
00026         end = col->Capacity();
00027     for (int i=start ; i<end ; i++)
00028         if (col->Get(i) == elem)
00029             return true;
00030     return false;
00031 }
00032 
00033 inline bool
00034 Contains(InvalidColumn* col, InvalidColumn::ColElemType elem, int start, int end)
00035 {
00036     // ignore
00037     return false;
00038 }
00039 
00040 } // namespace Column
00041 } // namespace Core
00042 } // namespace Impala
00043 
00044 #endif

Generated on Fri Mar 19 09:31:03 2010 for ImpalaSrc by  doxygen 1.5.1