Ocular Engine
ResourceDetails.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_RESOURCES_RESOURCE_DETAILS__H__
19 #define __H__OCULAR_RESOURCES_RESOURCE_DETAILS__H__
20 
21 #include "Resource.hpp"
22 #include <memory>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Core
37  {
38  class ResourceManager;
39 
45  {
46  friend class ResourceManager;
47 
48  public:
49 
50  ResourceDetails(Resource* resource, ResourceType type = ResourceType::Undefined);
51  ~ResourceDetails();
52 
56  Resource* getResource();
57 
61  Resource* getResourceUntracked() const;
62 
66  uint64_t getTimeOfLastRequest() const;
67 
71  unsigned getNumberOfRequests() const;
72 
76  uint64_t getSize() const;
77 
81  ResourceType getType() const;
82 
86  void reset();
87 
88  protected:
89 
90  Resource* m_Resource;
91  ResourceType m_Type;
92 
93  uint64_t m_LastRequest;
95 
96  private:
97  };
98  }
102 }
107 //------------------------------------------------------------------------------------------
108 
109 #endif
unsigned m_NumberOfRequests
In NS.
Definition: ResourceDetails.hpp:94
Maintains a resource and usage details.
Definition: ResourceDetails.hpp:44
uint64_t m_LastRequest
Secondary copy of ResourceType. Mainly used when identifying subresources of MultiResource instances...
Definition: ResourceDetails.hpp:93
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: ResourceManager.hpp:110
Definition: Resource.hpp:46