00001 00017 #ifndef _MAPTOLIST 00018 #define _MAPTOLIST 00019 00020 #include <map> 00021 #include <list> 00022 00023 00029 template<class key,class element> 00030 list<element>* map_to_list(const typename map<key,element>::const_iterator inBegin, 00031 const typename map<key,element>::const_iterator inEnd){ 00032 list<element> lNewList=new list<element>; 00033 00034 while(inBegin!=inEnd){ 00035 lNewList->push_back((inBegin++).second); 00036 } 00037 00038 return lNewList; 00039 } 00040 00041 #endif