BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
SPtr< T > Class Template Reference

#include <pointer.h>

Public Member Functions

T * operator-> () const
 
bool operator== (const T *pobj) const
 
bool operator!= (const T *pobj) const
 
bool operator== (const SPtr< T > &spobj) const
 
bool operator!= (const SPtr< T > &spobj) const
 
 SPtr (T *pobj=0)
 
 SPtr (const SPtr &ptr)
 
SPtroperator= (const SPtr &ptr)
 
 ~SPtr ()
 
T * operator-> () const
 
bool operator== (const T *pobj) const
 
bool operator!= (const T *pobj) const
 
bool operator== (const SPtr< T > &spobj) const
 
bool operator!= (const SPtr< T > &spobj) const
 
 SPtr (T *pobj=0)
 
 SPtr (const SPtr &ptr)
 
SPtroperator= (const SPtr &ptr)
 
 ~SPtr ()
 

Detailed Description

template<typename T>
class SPtr< T >

Definition at line 24 of file eemmg-lib-new/src/pointer.h.

Constructor & Destructor Documentation

◆ SPtr() [1/4]

template<typename T >
SPtr< T >::SPtr ( T * pobj = 0)
inline

Definition at line 34 of file eemmg-lib-new/src/pointer.h.

34 : pObj(pobj) {
35 if (pObj) { pObj->count++; }
36 }

◆ SPtr() [2/4]

template<typename T >
SPtr< T >::SPtr ( const SPtr< T > & ptr)
inline

Definition at line 37 of file eemmg-lib-new/src/pointer.h.

37 : pObj(ptr.pObj) {
38 if (pObj) { pObj->count++; }
39 }

◆ ~SPtr() [1/2]

template<typename T >
SPtr< T >::~SPtr ( )
inline

Definition at line 48 of file eemmg-lib-new/src/pointer.h.

48 {
49 if (pObj && --(pObj->count) == 0) { delete pObj; }
50 }

◆ SPtr() [3/4]

template<typename T >
SPtr< T >::SPtr ( T * pobj = 0)
inline

Definition at line 34 of file eemmg-lib/src/pointer.h.

34 : pObj(pobj) {
35 if (pObj) { pObj->count++; }
36 }

◆ SPtr() [4/4]

template<typename T >
SPtr< T >::SPtr ( const SPtr< T > & ptr)
inline

Definition at line 37 of file eemmg-lib/src/pointer.h.

37 : pObj(ptr.pObj) {
38 if (pObj) { pObj->count++; }
39 }

◆ ~SPtr() [2/2]

template<typename T >
SPtr< T >::~SPtr ( )
inline

Definition at line 48 of file eemmg-lib/src/pointer.h.

48 {
49 if (pObj && --(pObj->count) == 0) { delete pObj; }
50 }

Member Function Documentation

◆ operator!=() [1/4]

template<typename T >
bool SPtr< T >::operator!= ( const SPtr< T > & spobj) const
inline

Definition at line 32 of file eemmg-lib-new/src/pointer.h.

32{ return spobj.pObj!=pObj; }

◆ operator!=() [2/4]

template<typename T >
bool SPtr< T >::operator!= ( const SPtr< T > & spobj) const
inline

Definition at line 32 of file eemmg-lib/src/pointer.h.

32{ return spobj.pObj!=pObj; }

◆ operator!=() [3/4]

template<typename T >
bool SPtr< T >::operator!= ( const T * pobj) const
inline

Definition at line 29 of file eemmg-lib-new/src/pointer.h.

29{ return pobj!=pObj; }

◆ operator!=() [4/4]

template<typename T >
bool SPtr< T >::operator!= ( const T * pobj) const
inline

Definition at line 29 of file eemmg-lib/src/pointer.h.

29{ return pobj!=pObj; }

◆ operator->() [1/2]

template<typename T >
T * SPtr< T >::operator-> ( ) const
inline

Definition at line 27 of file eemmg-lib-new/src/pointer.h.

27{ return pObj; }

◆ operator->() [2/2]

template<typename T >
T * SPtr< T >::operator-> ( ) const
inline

Definition at line 27 of file eemmg-lib/src/pointer.h.

27{ return pObj; }

◆ operator=() [1/2]

template<typename T >
SPtr & SPtr< T >::operator= ( const SPtr< T > & ptr)
inline

Definition at line 41 of file eemmg-lib-new/src/pointer.h.

41 {
42 if (this == &ptr) { return *this; }
43 if (pObj && --(pObj->count) == 0) { delete pObj; }
44 if ( (pObj=ptr.pObj) ) { pObj->count++; }
45 return *this;
46 }

◆ operator=() [2/2]

template<typename T >
SPtr & SPtr< T >::operator= ( const SPtr< T > & ptr)
inline

Definition at line 41 of file eemmg-lib/src/pointer.h.

41 {
42 if (this == &ptr) { return *this; }
43 if (pObj && --(pObj->count) == 0) { delete pObj; }
44 if ( (pObj=ptr.pObj) ) { pObj->count++; }
45 return *this;
46 }

◆ operator==() [1/4]

template<typename T >
bool SPtr< T >::operator== ( const SPtr< T > & spobj) const
inline

Definition at line 31 of file eemmg-lib-new/src/pointer.h.

31{ return spobj.pObj==pObj; }

◆ operator==() [2/4]

template<typename T >
bool SPtr< T >::operator== ( const SPtr< T > & spobj) const
inline

Definition at line 31 of file eemmg-lib/src/pointer.h.

31{ return spobj.pObj==pObj; }

◆ operator==() [3/4]

template<typename T >
bool SPtr< T >::operator== ( const T * pobj) const
inline

Definition at line 28 of file eemmg-lib-new/src/pointer.h.

28{ return pobj==pObj; }

◆ operator==() [4/4]

template<typename T >
bool SPtr< T >::operator== ( const T * pobj) const
inline

Definition at line 28 of file eemmg-lib/src/pointer.h.

28{ return pobj==pObj; }

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