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

StlHelpers.h

Go to the documentation of this file.
00001 #ifndef Impala_Util_StlHelpers_h
00002 #define Impala_Util_StlHelpers_h
00003 
00004 namespace Impala
00005 {
00006 namespace Util
00007 {
00008 
00013 template <class collectionT>
00014 void SubSelectInPlace(collectionT* collection, int start, int number)
00015 {
00016     if(start > 0)
00017         collection->erase(collection->begin(), collection->begin() + start);
00018     if(number != -1)
00019         if(number < collection->size())
00020             collection->erase(collection->begin() + number, 
00021                               collection->end());
00022 }
00023 
00024 } // namespace Util
00025 } // namespace Impala
00026 
00027 #endif

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