Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | List of all members
Mezzanine::IntrusiveRefCount Class Reference

A sample class that implements a minimal intrusive reference counting scheme. More...

#include <countedptr.h>

+ Inheritance diagram for Mezzanine::IntrusiveRefCount:

Public Member Functions

 IntrusiveRefCount ()
 Constructor for instatiating the Reference Count.
 
virtual ~IntrusiveRefCount ()
 Virtual Deconstructor to prevent issues with deletion with incomplete type information.
 
Whole DecrementReferenceCount ()
 Decrease the reference count by one and return the updated count. More...
 
virtual IntrusiveRefCountGetMostDerived ()
 Get a pointer to the most Derived type of this class. More...
 
Whole GetReferenceCount () const
 Get the current amount of references. More...
 
IntrusiveRefCountGetReferenceCountTargetAsPointer ()
 Gets the actual pointer to the target. More...
 
Whole IncrementReferenceCount ()
 Increase the reference count by one and return the updated count. More...
 

Detailed Description

A sample class that implements a minimal intrusive reference counting scheme.

It might work to inherit from this, however on some platforms multiple inheritance comes with the exact same cost intrusive pointers are designed to avoid. This should be used as an example of how to implement a reference counted object.

Definition at line 147 of file countedptr.h.

Member Function Documentation

Whole Mezzanine::IntrusiveRefCount::DecrementReferenceCount ( )
inline

Decrease the reference count by one and return the updated count.

Returns
The updated count;

Definition at line 165 of file countedptr.h.

virtual IntrusiveRefCount* Mezzanine::IntrusiveRefCount::GetMostDerived ( )
inlinevirtual
Whole Mezzanine::IntrusiveRefCount::GetReferenceCount ( ) const
inline

Get the current amount of references.

Returns
A Whole with the current reference count

Definition at line 175 of file countedptr.h.

IntrusiveRefCount* Mezzanine::IntrusiveRefCount::GetReferenceCountTargetAsPointer ( )
inline

Gets the actual pointer to the target.

Returns
A Pointer of the targeted type to the object being managed.

Definition at line 170 of file countedptr.h.

Whole Mezzanine::IntrusiveRefCount::IncrementReferenceCount ( )
inline

Increase the reference count by one and return the updated count.

Returns
The updated count;

Definition at line 160 of file countedptr.h.


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