template<class C1, class C2>
Select elements from src based on filter by copying them to dst as long as there is room in dst. If (filter != 0) its number of elements is at least srcSize. The function returns the number of elements copied to dst. Definition at line 21 of file Select.h. 00022 { 00023 int nr = 0; 00024 for (int i=srcStart ; i<srcSize ; i++) 00025 { 00026 if (!filter || filter[i]) 00027 { 00028 dst->Set(dstStart + nr++, src->Get(i)); 00029 if (dstStart + nr >= dst->Capacity()) 00030 return nr; 00031 } 00032 } 00033 return nr; 00034 }
|