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

Element handler template. More...

#include <ElementHandler.h>

List of all members.

Public Member Functions

 ElementHandler ()
 Constructor.
virtual ~ElementHandler ()
 Destructor.
AType * GetElement () const
 Returns a pointer to the handlers element.
virtual bool SetElement (AType *pElement=nullptr)
 Sets the handlers element.

Detailed Description

template<class AType>
class PLCore::ElementHandler< AType >

Element handler template.


Constructor & Destructor Documentation

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

Destructor.

Reimplemented in PLPhysics::ElementHandler.


Member Function Documentation

template<class AType >
AType * PLCore::ElementHandler< AType >::GetElement ( ) const

Returns a pointer to the handlers element.

Returns:
A pointer to the handlers element, a null pointer if no element
template<class AType>
bool PLCore::ElementHandler< AType >::SetElement ( AType *  pElement = nullptr) [virtual]

Sets the handlers element.

Parameters:
[in]pElementElement to set, a null pointer to set no element
Returns:
'true' if all went fine, else 'false'
Note:
  • If the element manager should delete unused elements automatically, (see ElementManager::GetUnloadUnused()) the previous element will be destroyed within this function if the element is no longer used by any handlers and if the element is not marked as protected.

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:13
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported