Oh GACK! src-clean doesn't quite work that easily since cleandist rebuilds the
[unix-history] / gnu / lib / libg++ / g++-include / gen / OXPBag.hP
CommitLineData
e87b4ac1
PR
1#ifndef _<T>OXPBag_h
2#ifdef __GNUG__
3#pragma interface
4#endif
5#define _<T>OXPBag_h 1
6
7#include "<T>.Bag.h"
8#include "<T>.XPlex.h"
9
10class <T>OXPBag : public <T>Bag
11{
12protected:
13 <T>XPlex p;
14
15public:
16 <T>OXPBag(int chunksize = DEFAULT_INITIAL_CAPACITY);
17 <T>OXPBag(const <T>OXPBag&);
18
19 Pix add(<T&> item);
20 void del(<T&> item);
21#undef remove
22 void remove(<T&>item);
23 int nof(<T&> item);
24 int contains(<T&> item);
25
26 void clear();
27
28 Pix first();
29 void next(Pix& i);
30 <T>& operator () (Pix i);
31 int owns(Pix i);
32 Pix seek(<T&> item, Pix from = 0);
33
34 int OK();
35};
36
37
38inline <T>OXPBag::<T>OXPBag(int chunksize)
39 : p(chunksize) { count = 0; }
40
41inline <T>OXPBag::<T>OXPBag(const <T>OXPBag& s) : p(s.p) { count = s.count; }
42
43inline Pix <T>OXPBag::first()
44{
45 return p.first();
46}
47
48inline void <T>OXPBag::next(Pix & idx)
49{
50 p.next(idx);
51}
52
53inline <T>& <T>OXPBag::operator ()(Pix idx)
54{
55 return p(idx);
56}
57
58inline void <T>OXPBag::clear()
59{
60 count = 0; p.clear();
61}
62
63inline int <T>OXPBag::owns (Pix idx)
64{
65 return p.owns(idx);
66}
67
68inline int <T>OXPBag::contains(<T&> item)
69{
70 return seek(item) != 0;
71}
72
73#endif