stl_adds.h

Go to the documentation of this file.
00001 #ifndef __STL_ADDS_H 00002 #define __STL_ADDS_H 00003 00004 #include<list> 00005 #include<string> 00006 00007 #define FOREACH(colltype, coll, it) for( colltype::iterator it = (coll).begin(); it!= (coll).end(); it++) 00008 #define FOREACHC(colltype, coll, it) for( colltype::const_iterator it = (coll).begin(); it!= (coll).end() ; it++ ) 00009 00010 00011 namespace std { 00012 00013 /// += operators for list (list concat) 00014 template <class T, class A> 00015 list<T,A>& operator += (list<T,A>& l1, const list<T,A>& l2) 00016 { l1.insert(l1.end(), l2.begin(), l2.end()); return l1;} 00017 00018 /// += operators for list (append) 00019 template <class T, class A> 00020 list<T,A>& operator += (list<T,A>& l1, const T& v) 00021 { l1.push_back(v); return l1;} 00022 00023 string itos(int i); 00024 00025 } 00026 00027 #endif

Generated on Tue Jan 16 02:14:38 2007 for Robotsystem of the Robot Group Leipzig by doxygen 1.3.8