SFrame 3.6
SPointer< T > Class Template Reference

Class used internally by SCycleBaseNTuple. More...

#include <core/include/SPointer.h>

List of all members.

Public Member Functions

 SPointer (T *object)
 Constructor taking ownership of the object.
 ~SPointer ()
 Destructor deleting the owned object.

Detailed Description

template<class T>
class SPointer< T >

Class used internally by SCycleBaseNTuple.

SCycleBaseNTuple creates some objects when the user calls SCycleBaseNTuple::ConnectVariable(...). Since the user is not told to delete these objects, SCycleBaseNTuple has to do this itself. Such objects are used to do this.

Such an SPointer object owns an object given to it in its constructor. Very much like std::auto_ptr does. But unlike std::auto_ptr, it inherits from TObject. So it is possible to store multiple SPointer objects together without knowing their exact types.

Version:
Revision:
120

Definition at line 37 of file SPointer.h.


Constructor & Destructor Documentation

template<class T >
SPointer< T >::SPointer ( T *  object)

Constructor taking ownership of the object.

The constructor stores the pointer given to it, and takes ownership of it. The user is responsible for not giving ownership of the same pointer to multiple SPointer objects.

Parameters:
objectPointer to the object that this object will own

Definition at line 25 of file SPointer.icc.

template<class T >
SPointer< T >::~SPointer ( )

Destructor deleting the owned object.

The destructor deletes the object owned by this object.

Definition at line 34 of file SPointer.icc.


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