dtinfo subtree dtinfo
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / UAS / Base / UAS_PtrList.hh
1 // $XConsortium: UAS_PtrList.hh /main/5 1996/08/21 15:44:37 drk $
2 #ifndef _UAS_PtrList_hh_
3 #define _UAS_PtrList_hh_
4
5 class UAS_Exception;
6 class UAS_String;
7
8 template <class T> class UAS_PtrList {
9     public:
10         UAS_PtrList ();
11         UAS_PtrList (const UAS_PtrList<T> &);
12         ~UAS_PtrList ();
13
14     public:
15         void append (T *);
16         void remove (T *);
17         T *item(int) const;
18         int numItems () const;
19         UAS_PtrList<T> &operator = (const UAS_PtrList<T> &);
20
21         //  zero-origined
22         T * operator [] (int) const;
23
24         void clear();
25
26     private:
27         typedef T *Tptr;
28
29         Tptr *fItems;
30         int fNumItems;
31         int fListSize;
32 };
33
34
35
36 #ifdef EXPAND_TEMPLATES
37 #include "UAS_PtrList.C"
38 #endif
39 #endif