| 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 | class AliMpVPadIterator; |
| 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 | protected: |
| 32 | AliMpPadIteratorPtr(const AliMpPadIteratorPtr& right); |
| 33 | |
| 34 | // operators |
| 35 | AliMpPadIteratorPtr& operator=(const AliMpPadIteratorPtr& right); |
| 36 | // copy and assignment are disallowed to avoid |
| 37 | // multiple deletion of fIterator |
| 38 | |
| 39 | private: |
| 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 |