]>
Commit | Line | Data |
---|---|---|
5f91c9e8 | 1 | // $Id$ |
2 | // Category: basic | |
3 | // | |
4 | // Class AliMpPadIteratorPtr | |
5 | // -------------------------- | |
6 | // Pointer to the virtual pad iterator; | |
7 | // enables to allocate the virtual pad iterator on stack. | |
8 | // Usage: | |
9 | // AliMpVIndexed* myIndexed = MyIndexed() | |
10 | // MVIterator& it = *AliMpPadIteratorPtr(myIndexed->CreateIterator()); | |
11 | // | |
12 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
13 | ||
14 | #ifndef ALI_MP_PAD_ITERATOR_PTR_H | |
15 | #define ALI_MP_PAD_ITERATOR_PTR_H | |
16 | ||
17 | #include <TObject.h> | |
18 | ||
19 | #include "AliMpVPadIterator.h" | |
20 | ||
21 | class AliMpPadIteratorPtr : public TObject | |
22 | { | |
23 | public: | |
24 | AliMpPadIteratorPtr(AliMpVPadIterator* it); | |
25 | // AliMpPadIteratorPtr(const AliMpPadIteratorPtr& right); --> private | |
26 | virtual ~AliMpPadIteratorPtr(); | |
27 | ||
28 | AliMpVPadIterator* operator->() { return fIterator; } | |
29 | AliMpVPadIterator& operator*() { return *fIterator; } | |
30 | ||
31 | private: | |
32 | // disallow copy and assignment to avoid | |
33 | // multiple deletion of fIterator | |
34 | AliMpPadIteratorPtr(const AliMpPadIteratorPtr& right); | |
35 | AliMpPadIteratorPtr& operator=(const AliMpPadIteratorPtr& right); | |
36 | ||
37 | // data members | |
38 | AliMpVPadIterator* fIterator; //The pad iterator | |
39 | ||
40 | ClassDef(AliMpPadIteratorPtr,1) // Pointer to abstract pad iterator | |
41 | }; | |
42 | ||
43 | #endif // ALI_MP_PAD_ITERATOR_PTR_H |