src/Assets/Asset.hpp
Namespaces
Name |
---|
Engine This namespace contains all of the necessary engine components. |
Engine::Assets |
Classes
Name | |
---|---|
class | Engine::Assets::Asset |
union | Engine::Assets::Asset::Event |
struct | Engine::Assets::Asset::Event::Loaded |
struct | Engine::Assets::Asset::Event::Unloaded |
struct | Engine::Assets::Asset::Event::Waiting |
Source code
#pragma once
#include <queue>
#include <string>
namespace Engine {
namespace Assets {
class Asset {
public:
union Event {
struct Loaded {
bool success;
int usage;
} loaded;
struct Unloaded {
bool success;
} unloaded;
struct Waiting {
Asset* other;
} waiting;
};
explicit Asset(const std::string& name);
virtual ~Asset() = 0;
virtual void load();
virtual void unload();
const Event& getEvent() const {
return event;
}
private:
Event event;
};
}
}
Updated on 2022-10-19 at 22:22:00 +0000