Disable all code related to libXp
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / dti_cc / CC_Dlist.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: CC_Dlist.h /main/5 1996/08/21 15:48:36 drk $ */
24 #ifndef __CC_Dlist_h
25 #define __CC_Dlist_h
26
27 #include "CC_Listbase.h"
28 #include "CC_Slist.h"
29
30 template <class T> class CC_TPtrDlist;
31 template <class T> class CC_TPtrDlistIterator;
32
33 template <class T>
34 class CC_TPtrDlist : public CC_TPtrSlist<T>
35 {
36 friend class CC_TPtrDlistIterator<T>;
37
38 // Inherit all the public/protected members from CC_TPtrSlist<T>
39 /*
40   entries();
41   prepend(T*element);
42   append(T*element);
43   insert(T*element);
44   at(size_t);
45   removeAt
46   removeLast
47   removeFirst
48   first
49   last
50   T *find(const T*)
51   T *find(Boolean...)
52   contains
53   remove
54   operator CC_Listbase *
55   */
56
57 public:
58   CC_TPtrDlist(const CC_TPtrDlist<T>&); 
59
60   CC_TPtrDlist() {} 
61   ~CC_TPtrDlist();
62   void clear();
63   virtual void clearAndDestroy();
64
65   operator CC_TPtrSlist<T> *() { return(this); }
66   
67 };
68
69
70 template <class T>
71 class CC_TPtrDlistIterator : public CC_TPtrSlistIterator<T>
72 {
73
74 /* all the inherited member from CC_TPtrSlistIterator<T> and
75  * List_Iterator_base...
76  */
77 //  From CC_TPtrSlistIterator<T>
78 //    T *key() const
79 //    T *operator()()
80 //    Boolean operator++()
81
82
83 // From CC_Listbase_Iterator
84 //    Boolean operator--();    
85      
86
87 public:
88
89   CC_TPtrDlistIterator (CC_TPtrDlist<T> &list)
90     : CC_TPtrSlistIterator<T>( *((CC_TPtrSlist<T> *)&list) ) 
91     { }
92
93
94   CC_Boolean operator+=(size_t n);
95
96 };
97
98 #ifdef EXPAND_TEMPLATES
99 #include "CC_Dlist.C"
100 #endif
101
102 #endif /* __CC_Slist_h */
103 /* DO NOT ADD ANY LINES AFTER THIS #endif */
104