Rasterfarm-SDK
Loading...
Searching...
No Matches
Engine::ResourceManager< MANAGED, RELEASER > Class Template Referenceabstract

#include <resourcemanager.h>

Inheritance diagram for Engine::ResourceManager< MANAGED, RELEASER >:
UnorderedSet

Protected Member Functions

virtual ~ResourceManager ()
 
virtual void release (MANAGED *)=0
 
UnorderedSet< MANAGED * > & container ()
 

Detailed Description

template<class MANAGED, class RELEASER>
class Engine::ResourceManager< MANAGED, RELEASER >

An ADT for managing resources utilized by other classes. With conventional programming the creator of a resource is responsible for destroying it and this responsiblity should generally not be delegated. In this library, for consistency that is the case.

As the pointer to a resource is often passed to an object that utilizes it, it's often helpful to the caller to receive a call-back indicating that the object no-longer references it. The creator can then decide what to-do if anything with the pointer. (eg. if created on the heap(new), destroy it(delete), Reference counting is another posibility.

Constructor & Destructor Documentation

◆ ~ResourceManager()

template<class MANAGED , class RELEASER >
virtual Engine::ResourceManager< MANAGED, RELEASER >::~ResourceManager ( )
inlineprotectedvirtual

Member Function Documentation

◆ container()

template<class MANAGED , class RELEASER >
UnorderedSet< MANAGED * > & Engine::ResourceManager< MANAGED, RELEASER >::container ( )
inlineprotected

◆ release()

template<class MANAGED , class RELEASER >
virtual void Engine::ResourceManager< MANAGED, RELEASER >::release ( MANAGED * )
protectedpure virtual

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