ROOT  6.06/08
Reference Guide
Public Member Functions | Private Attributes | List of all members
TFitResultPtr Class Reference

Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointer, i.e.

it is like a smart pointer to a TFitResult. In addition it provides an automatic comversion to an integer. In this way it can be returned from the TH1::Fit method and the change in TH1::Fit be backward compatible.

Definition at line 33 of file TFitResultPtr.h.

Public Member Functions

 TFitResultPtr (int status=-1)
 
 TFitResultPtr (const std::shared_ptr< TFitResult > &p)
 Constructor from a TFitResult pointer. More...
 
 TFitResultPtr (TFitResult *p)
 Constructor from a TFitResult pointer. More...
 
 TFitResultPtr (const TFitResultPtr &rhs)
 
 operator int () const
 
TFitResultoperator* () const
 Implement the de-reference operator to make the class acts as a pointer to a TFitResult assert in case the class does not contain a pointer to TFitResult. More...
 
TFitResultoperator-> () const
 Implement the -> operator to make the class acts as a pointer to a TFitResult. More...
 
TFitResultGet () const
 Return contained pointer. More...
 
TFitResultPtroperator= (const TFitResultPtr &rhs)
 Assignment operator. More...
 
virtual ~TFitResultPtr ()
 Destructor. More...
 

Private Attributes

int fStatus
 
std::shared_ptr< TFitResultfPointer
 

#include <TFitResultPtr.h>

Constructor & Destructor Documentation

§ TFitResultPtr() [1/4]

TFitResultPtr::TFitResultPtr ( int  status = -1)
inline

Definition at line 36 of file TFitResultPtr.h.

§ TFitResultPtr() [2/4]

TFitResultPtr::TFitResultPtr ( const std::shared_ptr< TFitResult > &  p)

Constructor from a TFitResult pointer.

Definition at line 28 of file TFitResultPtr.cxx.

§ TFitResultPtr() [3/4]

TFitResultPtr::TFitResultPtr ( TFitResult p)

Constructor from a TFitResult pointer.

Definition at line 38 of file TFitResultPtr.cxx.

§ TFitResultPtr() [4/4]

TFitResultPtr::TFitResultPtr ( const TFitResultPtr rhs)

Definition at line 45 of file TFitResultPtr.cxx.

§ ~TFitResultPtr()

TFitResultPtr::~TFitResultPtr ( )
virtual

Destructor.

Delete the contained TFitResult pointer if needed if ( fPointer != 0) delete fPointer;

Definition at line 55 of file TFitResultPtr.cxx.

Referenced by operator int().

Member Function Documentation

§ Get()

TFitResult * TFitResultPtr::Get ( ) const

Return contained pointer.

Definition at line 86 of file TFitResultPtr.cxx.

Referenced by operator int().

§ operator int()

TFitResultPtr::operator int ( ) const
inline

Definition at line 44 of file TFitResultPtr.h.

§ operator*()

TFitResult & TFitResultPtr::operator* ( ) const

Implement the de-reference operator to make the class acts as a pointer to a TFitResult assert in case the class does not contain a pointer to TFitResult.

Definition at line 63 of file TFitResultPtr.cxx.

Referenced by operator int().

§ operator->()

TFitResult * TFitResultPtr::operator-> ( ) const

Implement the -> operator to make the class acts as a pointer to a TFitResult.

assert in case the class does not contain a pointer to TFitResult

Definition at line 75 of file TFitResultPtr.cxx.

Referenced by operator int().

§ operator=()

TFitResultPtr & TFitResultPtr::operator= ( const TFitResultPtr rhs)

Assignment operator.

if needed copy the TFitResult object and delete previous one if existing

Definition at line 94 of file TFitResultPtr.cxx.

Referenced by operator int().

Member Data Documentation

§ fPointer

std::shared_ptr<TFitResult> TFitResultPtr::fPointer
private

Definition at line 59 of file TFitResultPtr.h.

Referenced by Get(), operator*(), operator->(), operator=(), and TFitResultPtr().

§ fStatus

int TFitResultPtr::fStatus
private

Definition at line 58 of file TFitResultPtr.h.

Referenced by operator int(), operator=(), and TFitResultPtr().


The documentation for this class was generated from the following files: