3065 some functions in the tcp module can be static
[unleashed.git] / usr / src / cmd / man / src / util / nsgmls.src / include / IList.h
blob8ccdaa5d7100c4fb82e640a18d250eaf7aa116af
1 // Copyright (c) 1994 James Clark
2 // See the file COPYING for copying permission.
3 #pragma ident "%Z%%M% %I% %E% SMI"
5 #ifndef IList_INCLUDED
6 #define IList_INCLUDED 1
8 #include "IListBase.h"
10 #ifdef SP_NAMESPACE
11 namespace SP_NAMESPACE {
12 #endif
14 template<class T> class IListIter;
16 // This owns the objects that are put in it.
18 template<class T>
19 class IList : private IListBase {
20 public:
21 IList() { }
22 IList(T *p) : IListBase(p) { }
23 ~IList() { clear(); }
24 void append(T *p) { IListBase::append(p); }
25 void insert(T *p) { IListBase::insert(p); }
26 void remove(T *p) { IListBase::remove(p); }
27 void swap(IList<T> &list) { IListBase::swap(list); }
28 T *head() const { return (T *)IListBase::head(); }
29 T *get() { return (T *)IListBase::get(); }
30 IListBase::clear;
31 IListBase::empty;
32 friend class IListIter<T>;
33 private:
34 IList(const IList<T> &); // undefined
35 IList<T> &operator=(const IList<T> &); // undefined
38 #ifdef SP_NAMESPACE
40 #endif
42 #endif /* not IList_INCLUDED */