OpenClonk
C4RefCntPointer< T > Class Template Reference

#include <C4StringTable.h>

Inheritance diagram for C4RefCntPointer< T >:
[legend]

Public Member Functions

 C4RefCntPointer (T *p)
 
 C4RefCntPointer ()
 
 C4RefCntPointer (const C4RefCntPointer< T > &r)
 
template<class U >
 C4RefCntPointer (const C4RefCntPointer< U > &r)
 
 C4RefCntPointer (C4RefCntPointer< T > &&r)
 
template<class U >
 C4RefCntPointer (C4RefCntPointer< U > &&r)
 
C4RefCntPointeroperator= (C4RefCntPointer< T > &&r)
 
template<class U >
C4RefCntPointeroperator= (C4RefCntPointer< U > &&r)
 
 ~C4RefCntPointer ()
 
template<class U >
C4RefCntPointeroperator= (U *new_p)
 
C4RefCntPointeroperator= (const C4RefCntPointer< T > &r)
 
template<class U >
C4RefCntPointeroperator= (const C4RefCntPointer< U > &r)
 
T & operator* ()
 
const T & operator* () const
 
T * operator-> ()
 
const T * operator-> () const
 
 operator T* ()
 
 operator const T * () const
 
T * Get () const
 

Detailed Description

template<class T>
class C4RefCntPointer< T >

Definition at line 55 of file C4StringTable.h.

Constructor & Destructor Documentation

◆ C4RefCntPointer() [1/6]

template<class T >
C4RefCntPointer< T >::C4RefCntPointer ( T *  p)
inline

Definition at line 58 of file C4StringTable.h.

58 : p(p) { IncRef(); }

◆ C4RefCntPointer() [2/6]

template<class T >
C4RefCntPointer< T >::C4RefCntPointer ( )
inline

Definition at line 59 of file C4StringTable.h.

59 : p(nullptr) { }

◆ C4RefCntPointer() [3/6]

template<class T >
C4RefCntPointer< T >::C4RefCntPointer ( const C4RefCntPointer< T > &  r)
inline

Definition at line 60 of file C4StringTable.h.

60 : p(r.p) { IncRef(); }

◆ C4RefCntPointer() [4/6]

template<class T >
template<class U >
C4RefCntPointer< T >::C4RefCntPointer ( const C4RefCntPointer< U > &  r)
inline

Definition at line 61 of file C4StringTable.h.

61 : p(r.p) { IncRef(); }

◆ C4RefCntPointer() [5/6]

template<class T >
C4RefCntPointer< T >::C4RefCntPointer ( C4RefCntPointer< T > &&  r)
inline

Definition at line 63 of file C4StringTable.h.

63 : p(r.p) { r.p = nullptr; }

◆ C4RefCntPointer() [6/6]

template<class T >
template<class U >
C4RefCntPointer< T >::C4RefCntPointer ( C4RefCntPointer< U > &&  r)
inline

Definition at line 64 of file C4StringTable.h.

64 : p(r.p) { r.p = 0; }

◆ ~C4RefCntPointer()

template<class T >
C4RefCntPointer< T >::~C4RefCntPointer ( )
inline

Definition at line 86 of file C4StringTable.h.

86 { DecRef(); }

Member Function Documentation

◆ Get()

template<class T >
T* C4RefCntPointer< T >::Get ( ) const
inline

Definition at line 111 of file C4StringTable.h.

111 { return p; }

Referenced by C4EditCursor::PerformDuplication().

Here is the caller graph for this function:

◆ operator const T *()

template<class T >
C4RefCntPointer< T >::operator const T * ( ) const
inline

Definition at line 110 of file C4StringTable.h.

110 { return p; }

◆ operator T*()

template<class T >
C4RefCntPointer< T >::operator T* ( )
inline

Definition at line 109 of file C4StringTable.h.

109 { return p; }

◆ operator*() [1/2]

template<class T >
T& C4RefCntPointer< T >::operator* ( )
inline

Definition at line 105 of file C4StringTable.h.

105 { return *p; }

◆ operator*() [2/2]

template<class T >
const T& C4RefCntPointer< T >::operator* ( ) const
inline

Definition at line 106 of file C4StringTable.h.

106 { return *p; }

◆ operator->() [1/2]

template<class T >
T* C4RefCntPointer< T >::operator-> ( )
inline

Definition at line 107 of file C4StringTable.h.

107 { return p; }

◆ operator->() [2/2]

template<class T >
const T* C4RefCntPointer< T >::operator-> ( ) const
inline

Definition at line 108 of file C4StringTable.h.

108 { return p; }

◆ operator=() [1/5]

template<class T >
C4RefCntPointer& C4RefCntPointer< T >::operator= ( C4RefCntPointer< T > &&  r)
inline

Definition at line 66 of file C4StringTable.h.

67  {
68  if (p != r.p)
69  {
70  DecRef();
71  p = r.p;
72  r.p = nullptr;
73  }
74  return *this;
75  }

◆ operator=() [2/5]

template<class T >
template<class U >
C4RefCntPointer& C4RefCntPointer< T >::operator= ( C4RefCntPointer< U > &&  r)
inline

Definition at line 76 of file C4StringTable.h.

77  {
78  if (p != r.p)
79  {
80  DecRef();
81  p = r.p;
82  r.p = 0;
83  }
84  return *this;
85  }

◆ operator=() [3/5]

template<class T >
C4RefCntPointer& C4RefCntPointer< T >::operator= ( const C4RefCntPointer< T > &  r)
inline

Definition at line 97 of file C4StringTable.h.

98  {
99  return *this = r.p;
100  }

◆ operator=() [4/5]

template<class T >
template<class U >
C4RefCntPointer& C4RefCntPointer< T >::operator= ( const C4RefCntPointer< U > &  r)
inline

Definition at line 101 of file C4StringTable.h.

102  {
103  return *this = r.p;
104  }

◆ operator=() [5/5]

template<class T >
template<class U >
C4RefCntPointer& C4RefCntPointer< T >::operator= ( U *  new_p)
inline

Definition at line 87 of file C4StringTable.h.

88  {
89  if (p != new_p)
90  {
91  DecRef();
92  p = new_p;
93  IncRef();
94  }
95  return *this;
96  }

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