35 template<
class TYPE>
void Validate(TYPE* obj);
39 template<
class TYPE> TYPE*
Ref()
const;
51 return (0 != this->
ref);
57template<
class TYPE>
inline void
81template<
class TYPE>
inline TYPE*
86 return (TYPE*) this->
ref;
The common base class of Nebula.
Definition refcounted.h:38
bool IsA(const Rtti &rtti) const
return true if this object is instance of given class, or a derived class
Definition refcounted.h:180
void Release()
decrement refcount and destroy object if refcount is zero
Definition refcounted.h:131
A thread-safe reference to a shared object.
Definition objectref.h:24
__DeclareClass(ObjectRef)
bool IsValid() const
return true if the ObjectRef points to a valid object
Definition objectref.h:49
void Invalidate()
invalidate the ref
Definition objectref.h:71
ObjectRef()
constructor
Definition objectref.cc:15
TYPE * Ref() const
get pointer to object
Definition objectref.h:82
Core::RefCounted *volatile ref
Definition objectref.h:42
void Validate(TYPE *obj)
validate the ref with a pointer to a target object (must be RefCounted)
Definition objectref.h:58
virtual ~ObjectRef()
destructor
Definition objectref.cc:24
#define n_assert(exp)
Definition debug.h:50
void * ExchangePointer(void *volatile *dest, void *value)
interlocked exchange
Definition gccinterlocked.cc:130
The Jobs2 system provides a set of threads and a pool of jobs from which threads can pickup work.
Definition jobs2.h:16