Ocular Engine
ResourceMemoryDetails.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_RESOURCES_RESOURCE_MEMORY_DETAILS__H__
19 #define __H__OCULAR_RESOURCES_RESOURCE_MEMORY_DETAILS__H__
20 
21 #include "Resource.hpp"
22 #include <unordered_map>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Core
37  {
42  {
43  public:
44 
47 
53  void resourceLoaded(Resource const* resource);
54 
60  void resourceUnloaded(Resource const* resource);
61 
65  uint64_t getTotalMemoryUsage() const;
66 
71  uint64_t getMemoryUsage(ResourceType type) const;
72 
73  protected:
74 
75  private:
76 
77  uint64_t m_TotalUsage;
78 
79  std::unordered_map<ResourceType, uint64_t> m_MemoryMap;
80  };
81  }
85 }
90 //------------------------------------------------------------------------------------------
91 
92 #endif
uint64_t getMemoryUsage(ResourceType type) const
Definition: ResourceMemoryDetails.cpp:80
void resourceUnloaded(Resource const *resource)
Definition: ResourceMemoryDetails.cpp:63
uint64_t getTotalMemoryUsage() const
Definition: ResourceMemoryDetails.cpp:75
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: ResourceMemoryDetails.hpp:41
void resourceLoaded(Resource const *resource)
Definition: ResourceMemoryDetails.cpp:51
Definition: Resource.hpp:46