Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Resource.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Platform.h"
4 #include "FlingTypes.h"
5 
6 namespace Fling
7 {
11  class Resource
12  {
13  friend class ResourceManager;
14 
15  public:
16  explicit Resource(Fling::Guid t_ID)
17  : m_Guid(t_ID)
18  { }
19 
20  virtual ~Resource() = default;
21 
29 
35  std::string GetGuidString() const { return m_Guid.data(); }
36 
40  std::string GetFilepathReleativeToAssets() const;
41 
42  protected:
43 
45  };
46 } // namespace Fling
Fling::Guid_Handle GetGuidHandle() const
Get GUID handle (just an int) for this resources guid.
Definition: Resource.h:28
std::string GetFilepathReleativeToAssets() const
Returns the full file path that is relative to the assets path based on the GUID of this resource...
Definition: Resource.cpp:6
Resource(Fling::Guid t_ID)
Definition: Resource.h:16
Base class that represents a loaded resource in the engine.
Definition: Resource.h:11
entt::hashed_string::hash_type Guid_Handle
Definition: FlingTypes.h:22
Fling::Guid m_Guid
Definition: Resource.h:44
entt::hashed_string Guid
Definition: FlingTypes.h:21
std::string GetGuidString() const
Get the human-readable string representation of this GUID.
Definition: Resource.h:35
The resource manager handles loading of files off disk.
Definition: ResourceManager.h:23
virtual ~Resource()=default
Definition: Engine.h:13