Doxybook2 Example
 
Loading...
Searching...
No Matches
Asset.hpp
Go to the documentation of this file.
1#pragma once
2#include <queue>
3#include <string>
4
5namespace Engine {
6 namespace Assets {
10 class Asset {
11 public:
15 union Event {
16 struct Loaded {
17 bool success;
18 int usage;
20 struct Unloaded {
21 bool success;
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}
virtual void load()
Call this method to load the asset.
const Event & getEvent() const
Returns the current status of the asset.
Definition Asset.hpp:48
virtual void unload()
Call this method to unload the asset.
Asset(const std::string &name)
Definition Asset.hpp:6
This namespace contains all of the necessary engine components.
Definition Asset.hpp:5
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