News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

TNL::RefObjectRef class Reference

TNL::RefObjectRef Class Reference

#include <tnlNetBase.h>

Inheritance diagram for TNL::RefObjectRef:

TNL::RefPtr< T >

Detailed Description

Base class for Object reference counting.


Public Member Functions

 RefObjectRef (Object *object=NULL)
 Constructor, assigns from the object and increments its reference count if it's not NULL.

 ~RefObjectRef ()
 Destructor, dereferences the object, if there is one.

void set (Object *object)
 Assigns this reference object from an existing Object instance.


Protected Member Functions

void incRef ()
 Increments the reference count on the referenced object.

void decRef ()
 Decrements the reference count on the referenced object.


Protected Attributes

ObjectmObject
 The object this RefObjectRef references.


Constructor & Destructor Documentation

TNL::RefObjectRef::RefObjectRef Object object = NULL  )  [inline]
 

Constructor, assigns from the object and increments its reference count if it's not NULL.

TNL::RefObjectRef::~RefObjectRef  )  [inline]
 

Destructor, dereferences the object, if there is one.


Member Function Documentation

void TNL::RefObjectRef::incRef  )  [inline, protected]
 

Increments the reference count on the referenced object.

void TNL::RefObjectRef::decRef  )  [inline, protected]
 

Decrements the reference count on the referenced object.

void TNL::RefObjectRef::set Object object  )  [inline]
 

Assigns this reference object from an existing Object instance.


Field Documentation

Object* TNL::RefObjectRef::mObject [protected]
 

The object this RefObjectRef references.