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

template<class T1, class T2>
void Impala::Core::Table::SelectOneColumn ( T1 *  dst,
T2 *  src,
int  col,
bool *  filter,
bool  doClearDst 
) [inline]

T1 and T2 are both of type TableTem T1 is a table with one column that is of equal type of column <col>.

So if T2 is a Annotation we can use this to get a table with only the quids of the positively annotated items.

Definition at line 26 of file SelectOneColumn.h.

References Select().

Referenced by Impala::Core::Table::AnnotationTable::MakeEpisodeFolds(), SelectOneColumn(), and SelectQuids().

00027 {
00028     int srcSize = src->Size(); // keep orignal size in case dst == src
00029     if (doClearDst)
00030         dst->SetSize(0);
00031     int nr = 0;
00032     if (filter)
00033     {
00034         for (int i=0 ; i<srcSize ; i++)
00035             if (filter[i])
00036                 nr++;
00037     }
00038     else
00039     {
00040         nr = srcSize;
00041     }
00042     dst->ReserveMin(dst->Size() + nr, true);
00043     switch(col)
00044     {
00045     case 1:
00046         Column::Select(dst->GetColumn1(), src->GetColumn1(), filter,
00047                        dst->Size(), 0, srcSize);
00048         break;
00049     case 2:
00050         Column::Select(dst->GetColumn1(), src->GetColumn2(), filter,
00051                        dst->Size(), 0, srcSize);
00052         break;
00053     case 3:
00054         Column::Select(dst->GetColumn1(), src->GetColumn3(), filter,
00055                        dst->Size(), 0, srcSize);
00056         break;
00057     case 4:
00058         Column::Select(dst->GetColumn1(), src->GetColumn4(), filter,
00059                        dst->Size(), 0, srcSize);
00060         break;
00061     case 5:
00062         Column::Select(dst->GetColumn1(), src->GetColumn5(), filter,
00063                        dst->Size(), 0, srcSize);
00064         break;
00065     case 6:
00066         Column::Select(dst->GetColumn1(), src->GetColumn6(), filter,
00067                        dst->Size(), 0, srcSize);
00068         break;
00069     case 7:
00070         Column::Select(dst->GetColumn1(), src->GetColumn7(), filter,
00071                        dst->Size(), 0, srcSize);
00072         break;
00073     case 8:
00074         Column::Select(dst->GetColumn1(), src->GetColumn8(), filter,
00075                        dst->Size(), 0, srcSize);
00076         break;
00077     case 9:
00078         Column::Select(dst->GetColumn1(), src->GetColumn9(), filter,
00079                        dst->Size(), 0, srcSize);
00080         break;
00081     }
00082     dst->SetSize(dst->Size() + nr);
00083 }

Here is the call graph for this function:


Generated on Fri Mar 19 11:19:29 2010 for ImpalaSrc by  doxygen 1.5.1