PixelLightAPI  .
Public Member Functions
PLCore::ObjectBase Class Reference

Internal Object base class. More...

#include <Object.h>

Inheritance diagram for PLCore::ObjectBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PLCORE_API ObjectBase ()
 Constructor.
virtual PLCORE_API ~ObjectBase ()
 Destructor.
virtual PLCORE_API ClassGetClass () const
 Get class.
PLCORE_API const ObjectBaseGetPointer () const
 Get a pointer to the object.
PLCORE_API ObjectBaseGetPointer ()
PLCORE_API uint32 AddReference ()
 Increases the reference count.
PLCORE_API uint32 Release ()
 Decreases the reference count.
PLCORE_API uint32 GetRefCount () const
 Gets the current reference count.
PLCORE_API uint32 SoftRelease ()
 Decreases the reference count without destroying this instance automatically.

Detailed Description

Internal Object base class.

Note:
  • Initially the reference counter is 1 (Lookout! Within the "RefCount"-template it's 0)

Constructor & Destructor Documentation

virtual PLCORE_API PLCore::ObjectBase::~ObjectBase ( ) [virtual]

Destructor.


Member Function Documentation

virtual PLCORE_API Class* PLCore::ObjectBase::GetClass ( ) const [virtual]

Get class.

Returns:
Class of the object (do not destroy the returned instance, should never be a null pointer, unless something is *terribly* wrong ;-) )
PLCORE_API const ObjectBase* PLCore::ObjectBase::GetPointer ( ) const

Get a pointer to the object.

Returns:
Pointer to the reference counter's object, NEVER a null pointer!
PLCORE_API uint32 PLCore::ObjectBase::AddReference ( )

Increases the reference count.

Returns:
Current reference count
PLCORE_API uint32 PLCore::ObjectBase::Release ( )

Decreases the reference count.

Returns:
Current reference count
Note:
  • When the last reference was released, the instance is destroyed automatically
PLCORE_API uint32 PLCore::ObjectBase::GetRefCount ( ) const

Gets the current reference count.

Returns:
Current reference count
PLCORE_API uint32 PLCore::ObjectBase::SoftRelease ( )

Decreases the reference count without destroying this instance automatically.

Returns:
Current reference count
Note:
  • Whenever possible, do not use this method, use "Release()" instead
  • Unlike "Release()", when the last reference was released the instance is not destroyed automatically
  • Use this method e.g. to release the initial set reference so e.g. a script can have the total control over an instance

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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:23
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported