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 | |
2998a151 |
19 | class AliMpVPadIterator; |
5f91c9e8 |
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 | |
2998a151 |
31 | protected: |
5f91c9e8 |
32 | AliMpPadIteratorPtr(const AliMpPadIteratorPtr& right); |
2998a151 |
33 | |
34 | // operators |
5f91c9e8 |
35 | AliMpPadIteratorPtr& operator=(const AliMpPadIteratorPtr& right); |
2998a151 |
36 | // copy and assignment are disallowed to avoid |
37 | // multiple deletion of fIterator |
38 | |
39 | private: |
5f91c9e8 |
40 | // data members |
41 | AliMpVPadIterator* fIterator; //The pad iterator |
42 | |
43 | ClassDef(AliMpPadIteratorPtr,1) // Pointer to abstract pad iterator |
44 | }; |
45 | |
46 | #endif // ALI_MP_PAD_ITERATOR_PTR_H |