BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
dchain::ReferenceHolderBase< TPtr, TRef > Class Template Reference

#include <ReferenceHolderBase.h>

+ Inheritance diagram for dchain::ReferenceHolderBase< TPtr, TRef >:

Public Member Functions

 ReferenceHolderBase ()
 
 ReferenceHolderBase (TPtr iRef)
 
 ~ReferenceHolderBase ()
 
 ReferenceHolderBase (const ReferenceHolderBase< TPtr, TRef > &iOther)
 
const ReferenceHolderBaseoperator= (const ReferenceHolderBase< TPtr, TRef > &iRHS)
 
TPtr operator-> () const
 
TRef operator* () const
 
TPtr pointer () const
 

Detailed Description

template<class TPtr, class TRef>
class dchain::ReferenceHolderBase< TPtr, TRef >

Definition at line 40 of file ReferenceHolderBase.h.

Constructor & Destructor Documentation

◆ ReferenceHolderBase() [1/3]

template<class TPtr , class TRef >
dchain::ReferenceHolderBase< TPtr, TRef >::ReferenceHolderBase ( )
inline

Definition at line 44 of file ReferenceHolderBase.h.

44: m_ref(0) {}

◆ ReferenceHolderBase() [2/3]

template<class TPtr , class TRef >
dchain::ReferenceHolderBase< TPtr, TRef >::ReferenceHolderBase ( TPtr  iRef)
inline

Definition at line 45 of file ReferenceHolderBase.h.

45 : m_ref(iRef) {
46 if(0 != m_ref) { m_ref->addLink(); } }

◆ ~ReferenceHolderBase()

template<class TPtr , class TRef >
dchain::ReferenceHolderBase< TPtr, TRef >::~ReferenceHolderBase ( )
inline

Definition at line 47 of file ReferenceHolderBase.h.

47 {
48 if (0 != m_ref ) {m_ref->dropLink();}
49 }

◆ ReferenceHolderBase() [3/3]

template<class TPtr , class TRef >
dchain::ReferenceHolderBase< TPtr, TRef >::ReferenceHolderBase ( const ReferenceHolderBase< TPtr, TRef > &  iOther)
inline

Definition at line 51 of file ReferenceHolderBase.h.

51 :
52 m_ref( iOther.m_ref ) {
53 if(0 != m_ref ) {
54 m_ref->addLink();
55 }
56 }

Member Function Documentation

◆ operator*()

template<class TPtr , class TRef >
TRef dchain::ReferenceHolderBase< TPtr, TRef >::operator* ( ) const
inline

Definition at line 75 of file ReferenceHolderBase.h.

75 {
76 return *m_ref;
77 }

◆ operator->()

template<class TPtr , class TRef >
TPtr dchain::ReferenceHolderBase< TPtr, TRef >::operator-> ( ) const
inline

Definition at line 71 of file ReferenceHolderBase.h.

71 {
72 return m_ref;
73 }

◆ operator=()

template<class TPtr , class TRef >
const ReferenceHolderBase & dchain::ReferenceHolderBase< TPtr, TRef >::operator= ( const ReferenceHolderBase< TPtr, TRef > &  iRHS)
inline

Definition at line 59 of file ReferenceHolderBase.h.

59 {
60 if( 0 != iRHS.m_ref ) {
61 iRHS.m_ref->addLink();
62 }
63 if( 0 != m_ref ) {
64 m_ref->dropLink();
65 }
66 m_ref = iRHS.m_ref;
67 return *this;
68 }

◆ pointer()

template<class TPtr , class TRef >
TPtr dchain::ReferenceHolderBase< TPtr, TRef >::pointer ( ) const
inline

Definition at line 79 of file ReferenceHolderBase.h.

79 {
80 return m_ref;
81 }

Referenced by dchain::LabeledCandidate< CandidateClass >::pointer().


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