TDME2 1.9.121
Public Member Functions | Private Attributes | List of all members
Reference Class Reference

Reference counter implementation to be used with inheritance. More...

#include <tdme/utilities/Reference.h>

Inheritance diagram for Reference:
Inheritance graph
Collaboration diagram for Reference:
Collaboration graph

Public Member Functions

 Reference ()
 Public constructor. More...
 
virtual ~Reference ()
 destructor More...
 
void acquireReference ()
 acquires a reference, incrementing the counter More...
 
void releaseReference ()
 releases a reference, thus decrementing the counter and delete it if reference counter is zero More...
 
virtual void onDelete ()
 Callback method to be overridden, will be called if object will be deleted. More...
 

Private Attributes

unsigned int referenceCounter
 

Detailed Description

Reference counter implementation to be used with inheritance.

Author
Andreas Drewke

Definition at line 10 of file Reference.h.

Constructor & Destructor Documentation

◆ Reference()

Reference ( )

Public constructor.

Definition at line 10 of file Reference.cpp.

◆ ~Reference()

~Reference ( )
virtual

destructor

Definition at line 13 of file Reference.cpp.

Member Function Documentation

◆ acquireReference()

void acquireReference ( )

acquires a reference, incrementing the counter

Definition at line 16 of file Reference.cpp.

◆ onDelete()

void onDelete ( )
virtual

Callback method to be overridden, will be called if object will be deleted.

Reimplemented in Texture.

Definition at line 27 of file Reference.cpp.

◆ releaseReference()

void releaseReference ( )

releases a reference, thus decrementing the counter and delete it if reference counter is zero

Definition at line 20 of file Reference.cpp.

Member Data Documentation

◆ referenceCounter

unsigned int referenceCounter
private

Definition at line 38 of file Reference.h.


The documentation for this class was generated from the following files: