LameShadowPtr_imp.h
Go to the documentation of this file.
1 #ifndef _LameShadowPtr_imp_h_
2 #define _LameShadowPtr_imp_h_
3 
4 #include <utl/ShadowPtr.h>
5 #include <utl/LameShadowPtr.h>
6 
7 
8 #define LAMESHADOWPTR_INST(_T_...) \
9  template class utl::LameShadowPtr<_T_ >
10 
11 
12 namespace utl {
13 
14  template<typename T, class DereferenceCheck>
15  T&
17  {
18  DereferenceCheck::Examine(fPtr);
19  return *fPtr;
20  }
21 
22 
23  template<typename T, class DereferenceCheck>
24  const T&
26  const
27  {
28  DereferenceCheck::Examine(fPtr);
29  return *fPtr;
30  }
31 
32 
33  template<typename T, class D>
34  void
36  {
37  delete fPtr;
38  }
39 
40 
41  template<typename T, class D>
42  void
44  {
45  fPtr = (p ? Meta<T>::GetCopy(*p) : 0);
46  }
47 
48 }
49 
50 
51 #endif
void DeepCopy(const T *const p)
static T * GetCopy(const T &t)
Definition: ShadowPtr.h:108

, generated on Tue Sep 26 2023.