ezEngine  Milestone 7
ezResourceLock< RESOURCE_TYPE > Class Template Reference

Helper class to acquire and release a resource safely. More...

#include <ResourceManager.h>

Public Member Functions

 ezResourceLock (const ezResourceHandle< RESOURCE_TYPE > &hResource, ezResourceAcquireMode mode=ezResourceAcquireMode::AllowFallback, const ezResourceHandle< RESOURCE_TYPE > &hFallbackResource=ezResourceHandle< RESOURCE_TYPE >(), ezResourcePriority Priority=ezResourcePriority::Unchanged)
 
RESOURCE_TYPE * operator-> ()
 

Private Attributes

RESOURCE_TYPE * m_pResource
 

Detailed Description

template<class RESOURCE_TYPE>
class ezResourceLock< RESOURCE_TYPE >

Helper class to acquire and release a resource safely.

The constructor calls ezResourceManager::BeginAcquireResource, the destructor makes sure to call ezResourceManager::EndAcquireResource. The instance of this class can be used like a pointer to the resource.


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