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 }
00025 }
00026
00027 #endif