Doxybook Example
Asset.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <queue>
3 #include <string>
4 
5 namespace Engine {
6  namespace Assets {
10  class Asset {
11  public:
15  union Event {
16  struct Loaded {
17  bool success;
18  int usage;
19  } loaded;
20  struct Unloaded {
21  bool success;
23  struct Waiting {
30  };
31 
32  explicit Asset(const std::string& name);
33  virtual ~Asset() = 0;
34 
38  virtual void load();
42  virtual void unload();
48  const Event& getEvent() const {
49  return event;
50  }
51  private:
52  Event event;
53  };
54  }
55 }
Definition: Asset.hpp:10
const Event & getEvent() const
Returns the current status of the asset.
Definition: Asset.hpp:48
virtual void load()
Call this method to load the asset.
virtual void unload()
Call this method to unload the asset.
Asset(const std::string &name)
This namespace contains all of the necessary engine components.
Definition: Asset.hpp:5
Definition: Asset.hpp:16
int usage
Definition: Asset.hpp:18
bool success
Definition: Asset.hpp:17
bool success
Definition: Asset.hpp:21
Asset * other
The pointer to the other asset this asset is waiting for.
Definition: Asset.hpp:28
Definition: Asset.hpp:15
struct Engine::Assets::Asset::Event::Waiting waiting
struct Engine::Assets::Asset::Event::Unloaded unloaded
struct Engine::Assets::Asset::Event::Loaded loaded