Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

STLQueueCleaner.hh

Go to the documentation of this file.
00001 
00020 #ifndef MANGO_STL_QUEUE_CONTAINER_CLEANER_H
00021 #define MANGO_STL_QUEUE_CONTAINER_CLEANER_H
00022 
00023 // file in order to decrease the dependencies on STL
00024 #include "CntrCleaner.hh" // general defn
00025 #include <queue>   // specialization for std::queue
00026 
00027 namespace MangoPtr
00028 {          
00030     template <typename T, typename U>
00031     struct CntrCleaner<std::queue<T, U> >
00032     {
00033         typedef std::queue<T, U> Queue;
00034         static void execute(Queue& obj)
00035         {
00036             while (!obj.empty()) 
00037             {
00038                 delete obj.front();
00039                 obj.pop(); // pop the front object
00040             }
00041         }
00042     };
00043         
00044 } // namespace
00045 
00046 #endif // MANGO_STL_QUEUE_CONTAINER_CLEANER_H
00047 

Generated on Tue Nov 12 20:43:53 2002 for Mango-ptr Library by doxygen1.2.18