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

STLStackCleaner.hh

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

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