3 #include "g_cont_ref_custom.h"
4 #include "g_cont_ref_const.h"
11 template <
class T >
class ref :
public ref_custom<T>
14 ref(){ G_VERBOSE_MSG_L5(
"ref constructor."); }
16 #if G_AUTOPTION_ON_MSVC > 0 //Viual Studio Only
17 ref(
const ref& other){ G_VERBOSE_MSG_L5(
"ref copy constructor"); ref_custom<T>::mRefTake<T>(other); }
18 ref& operator = (
const ref& other) { G_VERBOSE_MSG_L5(
"ref copy operator"); ref_custom<T>::mRefTake<T>(other);
return *
this; }
20 template <
class O> ref(
const ref<O>& other):ref_custom<T>() { G_VERBOSE_MSG_L5(
"ref copy constructor (OTHER)"); this->mRefTake<O>(other); }
21 template <
class O> ref& operator = (
const ref<O>& other ) { G_VERBOSE_MSG_L5(
"ref copy operator()"); this->mRefTake<O> (other);
return *
this; }
22 template <
class O>
bool tryRefTakeDynamically ( ref<O>& o ) {
return this->mRefTakeTryDynamically<O>(o); }
24 ref(
const ref& other){ G_VERBOSE_MSG_L5(
"ref(const ref& other)"); this->mRefTake(other); }
25 ref& operator = (
const ref& other) { G_VERBOSE_MSG_L5(
"ref& operator = (ref& other )"); this->mRefTake(other);
return *
this; }
27 template <
class O> ref(
const ref<O>& other):ref_custom<T>() { G_VERBOSE_MSG_L5(
"ref(const ref<O>& other)"); this->mRefTake(other); }
28 template <
class O> ref& operator = (
const ref<O>& other ) { G_VERBOSE_MSG_L5(
"ref& operator = ( ref<O> other )"); this->mRefTake (other);
return *
this; }
29 template <
class O>
bool tryRefTakeDynamically ( ref<O>& o ) {
return this->mRefTakeTryDynamically(o); }
33 T& operator *() { G_VERBOSE_MSG_L5(
"T& ref_custom::operator *()");
return *this->mGetObjP(); }
34 T* operator ->() { G_VERBOSE_MSG_L5(
"T* ref_custom::operator ->()");
return this->mGetObjP(); }
35 const T& operator *()
const { G_VERBOSE_MSG_L5(
"const T& ref_custom::operator *()");
return *this->mGetObjP(); }
36 const T* operator ->()
const { G_VERBOSE_MSG_L5(
"const T* ref_custom::operator ->()");
return this->mGetObjP(); }
38 static ref g_cont_new ( AllocationPolicyAbstract* d_alloc_policy = AllocationPolicyAbstract::get_FromStandardPolicy ( ) )
42 new ( result.mAllocateMemForObject(d_alloc_policy) )T();
Definition: g.mthread.ThreadSimpleEvent.h:5