1    	// @(#)root/mathcore:$Id$
2    	// Author: David Gonzalez Maline Tue Nov 10 15:01:24 2009
3    	
4    	/*************************************************************************
5    	 * Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
6    	 * All rights reserved.                                                  *
7    	 *                                                                       *
8    	 * For the licensing terms see $ROOTSYS/LICENSE.                         *
9    	 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
10   	 *************************************************************************/
11   	
12   	#ifndef ROOT_TFitResultPtr
13   	#define ROOT_TFitResultPtr
14   	
15   	//////////////////////////////////////////////////////////////////////////
16   	//                                                                      //
17   	// TFitResultPtr                                                        //
18   	//                                                                      //
19   	// Provides an indirection to TFitResult class and with a semantics     //
20   	// identical to a TFitResult pointer                                    //
21   	//                                                                      //
22   	//                                                                      //
23   	//////////////////////////////////////////////////////////////////////////
24   	
25   	#ifndef ROOT_Rtypes
26   	#include "Rtypes.h"
27   	#endif
28   	
29   	class TFitResult;
30   	
31   	class TFitResultPtr {
32   	public:
33   	
34   	   TFitResultPtr(int status = -1): fStatus(status), fPointer(0) {};
35   	
36   	   TFitResultPtr(TFitResult* p);
37   	
38   	   TFitResultPtr(const TFitResultPtr& rhs); 
39   	
40   	   operator int() const { return fStatus; }
41   	   
42   	   TFitResult& operator*() const;
43   	
44   	   TFitResult* operator->() const;
45   	
46   	   TFitResult* Get() const { return fPointer; }
47   	
48   	   TFitResultPtr& operator= (const TFitResultPtr& rhs); 
49   	
50   	   virtual ~TFitResultPtr();
51   	
52   	private:
53   	   
54   	   int fStatus;          // fit status code
55   	   TFitResult* fPointer; // Smart Pointer to TFitResult class  
56   	
57   	   ClassDef(TFitResultPtr,1)  //indirection to TFitResult
58   	};
59   	
60   	#endif
61