Subversion Repositories spk

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
114 cycrow 1
#ifndef PTR_LIST_INCLUDED
2
#define PTR_LIST_INCLUDED
3
 
4
template <class C>
5
class ptr_list : public C
6
{
7
	public:
8
		typedef C base;
9
 
10
		void clear()
11
		{
12
			for(iterator &it=begin(); it!=end(); ++it){
13
				delete *it;
14
			}
15
			base::clear();
16
		}
17
		~ptr_list() { clear(); }
18
};
19
 
20
#endif // !defined(PTR_LIST_INCLUDED)