]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpPadIteratorPtr.h
Adding new libraries
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpPadIteratorPtr.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: AliMpPadIteratorPtr.h,v 1.7 2006/05/24 13:58:07 ivana Exp $
6
7 /// \ingroup basic
8 /// \class AliMpPadIteratorPtr
9 /// \brief  A pointer to the virtual pad iterator;
10 ///
11 /// It enables to allocate the virtual pad iterator on stack.
12 /// Usage:                                                                 \n
13 /// AliMpVIndexed* myIndexed = MyIndexed();                                \n
14 /// MVIterator& it = *AliMpPadIteratorPtr(myIndexed->CreateIterator());    \n
15 ///
16 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
17
18 #ifndef ALI_MP_PAD_ITERATOR_PTR_H
19 #define ALI_MP_PAD_ITERATOR_PTR_H
20
21 #include <TObject.h>
22
23 class AliMpVPadIterator;
24
25 class AliMpPadIteratorPtr : public TObject
26 {
27   public:
28     AliMpPadIteratorPtr(AliMpVPadIterator* it);
29     virtual ~AliMpPadIteratorPtr();
30   
31                        /// Operator ->
32     AliMpVPadIterator* operator->() { return  fIterator; }
33                        /// Operator *
34     AliMpVPadIterator& operator*()  { return *fIterator; }
35
36   private:   
37     /// Not implemented
38     AliMpPadIteratorPtr(const AliMpPadIteratorPtr& right);
39     /// Not implemented
40     AliMpPadIteratorPtr& operator=(const AliMpPadIteratorPtr& right);
41         // copy and assignment are disallowed to avoid
42         // multiple deletion of fIterator
43
44     // data members
45     AliMpVPadIterator*  fIterator; ///< The pad iterator
46      
47   ClassDef(AliMpPadIteratorPtr,1) // Pointer to abstract pad iterator
48 };
49
50 #endif // ALI_MP_PAD_ITERATOR_PTR_H