ezEngine  Milestone 7
ResourceTypeLoader.h
1 #pragma once
2 
3 #include <Core/ResourceManager/Implementation/Declarations.h>
4 #include <Foundation/IO/Stream.h>
5 #include <Foundation/Time/Timestamp.h>
6 
8 struct EZ_CORE_DLL ezResourceLoadData
9 {
11  {
12  m_pDataStream = nullptr;
13  m_pCustomLoaderData = nullptr;
14  }
15 
18 
21 
24 
27 };
28 
33 class EZ_CORE_DLL ezResourceTypeLoader
34 {
35 public:
37  virtual ~ezResourceTypeLoader () { }
38 
46  virtual ezResourceLoadData OpenDataStream(const ezResourceBase* pResource) = 0;
47 
49  virtual void CloseDataStream(const ezResourceBase* pResource, const ezResourceLoadData& LoaderData) = 0;
50 
55  virtual bool IsResourceOutdated(const ezResourceBase* pResource) const { return false; }
56 };
57 
64 {
65 public:
66  virtual ezResourceLoadData OpenDataStream(const ezResourceBase* pResource) override;
67  virtual void CloseDataStream(const ezResourceBase* pResource, const ezResourceLoadData& LoaderData) override;
68  virtual bool IsResourceOutdated(const ezResourceBase* pResource) const override;
69 };
70