PixelLightAPI  .
Public Member Functions
PLCore::RefCount< AType > Class Template Reference

Reference counter template. More...

#include <RefCount.h>

Inheritance diagram for PLCore::RefCount< AType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 RefCount ()
 Constructor.
virtual ~RefCount ()
 Destructor.
virtual const AType * GetPointer () const
 Get a pointer to the object.
virtual AType * GetPointer ()
uint32 AddReference ()
 Increases the reference count.
uint32 Release ()
 Decreases the reference count.
uint32 GetRefCount () const
 Gets the current reference count.

Detailed Description

template<class AType>
class PLCore::RefCount< AType >

Reference counter template.

Note:
  • Initially the reference counter is 0

Constructor & Destructor Documentation

template<class AType >
PLCore::RefCount< AType >::RefCount ( )
template<class AType >
PLCore::RefCount< AType >::~RefCount ( ) [virtual]

Destructor.


Member Function Documentation

template<class AType >
const AType * PLCore::RefCount< AType >::GetPointer ( ) const [virtual]

Get a pointer to the object.

Returns:
Pointer to the reference counter's object, NEVER a null pointer!

Reimplemented in PLCore::RefCountPtr< AType >.

template<class AType >
AType * PLCore::RefCount< AType >::GetPointer ( ) [virtual]

Reimplemented in PLCore::RefCountPtr< AType >.

template<class AType >
uint32 PLCore::RefCount< AType >::AddReference ( )

Increases the reference count.

Returns:
Current reference count
template<class AType >
uint32 PLCore::RefCount< AType >::Release ( )

Decreases the reference count.

Returns:
Current reference count
template<class AType >
uint32 PLCore::RefCount< AType >::GetRefCount ( ) const

Gets the current reference count.

Returns:
Current reference count

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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:14
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported