1#include "ResourceHandle.h"
3#include "ResourceBase.h"
14 if (otherResource) otherResource->
increment();
16 resetInternal(otherResource);
23 if (resource) resource->decrement();
25 resource = otherResource;
Base class for engine resources.
void decrement()
Decrement the reference count of the resource.
void increment()
Increments the reference count of the resource.
Resource handle base class handling reference counting of resources derived from ResourceBase.
static const ResourceHandleBase NoHandle
Provided as shorthand for empty resource handles.
void reset(ResourceBase *otherResource)
Reset the contents of this instance to the given handle and resource.
ResourceId getId() const
Get the resource id of the held resource.
~ResourceHandleBase()
Destructs a handle, and if a resource is held, releases the reference to this resource.
void resetInternal(ResourceBase *otherResource)
Reset the contents of this instance to the given handle and resource.
ResourceBase * resource
Pointer to held resource.