Subversion Repositories spk

Rev

Blame | Last modification | View Log | RSS feed

#ifndef PTR_LIST_INCLUDED
#define PTR_LIST_INCLUDED

template <class C>
class ptr_list : public C
{
        public:
                typedef C base;

                void clear()
                {
                        for(iterator &it=begin(); it!=end(); ++it){
                                delete *it;
                        }
                        base::clear();
                }
                ~ptr_list() { clear(); }
};

#endif // !defined(PTR_LIST_INCLUDED)