Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
#define P6_REFCOUNTED_THREADSAFE_ADDREF (   classname)
Value:
P6R::P6INT32 tmp = p6AtomicInc32(&m_cRef.value); \
p6TraceAddref(#classname,sizeof(*this),this,tmp,NULL); \
return tmp; \
} \
int P6INT32
Definition: p6types.h:41
#define P6COMMETHOD_(type)
Definition: p6types.h:873
P6API P6R::P6INT32 p6AtomicInc32(P6R::P6INT32 volatile *pVar)
Atomically increments the variable pointed to by pVar by one.

P6_REFCOUNTED_THREADSAFE_ADDREF(classname)

The P6_REFCOUNTED_THREADSAFE_ADDREF helper macro implements a threadsafe addref() method for use in classes which inhereit from p6IRefCounted. The macro assumes that a member variable of type P6AUTO_INT32 named m_cRef exists in the class. This macro is called by the P6_REFCOUNTED macro.

Parameters
classnameThe name of the class in which the addref() method is being declared/implemented.

Definition at line 554 of file p6comhlpr.h.