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

Resource handler template. More...

#include <ResourceHandler.h>

List of all members.

Public Member Functions

 ResourceHandler ()
 Constructor.
virtual ~ResourceHandler ()
 Destructor.
AType * GetResource () const
 Returns a pointer to the handlers resource.
virtual bool SetResource (AType *pResource=nullptr)
 Sets the handlers resource.

Detailed Description

template<class AType>
class PLCore::ResourceHandler< AType >

Resource handler template.


Constructor & Destructor Documentation

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

Destructor.


Member Function Documentation

template<class AType >
AType * PLCore::ResourceHandler< AType >::GetResource ( ) const

Returns a pointer to the handlers resource.

Returns:
A pointer to the handlers resource, a null pointer if no resource
template<class AType>
bool PLCore::ResourceHandler< AType >::SetResource ( AType *  pResource = nullptr) [virtual]

Sets the handlers resource.

Parameters:
[in]pResourceResource to set, a null pointer to set no element
Returns:
'true' if all went fine, else 'false'
Note:
  • If the resource manager should delete unused resources automatically, (see ResourceManager::GetUnloadUnused()) the previous resource will be destroyed within this function if the resource is no longer used by any handlers and if the resource 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:14
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported