1
0
Files
BasaltMeter/BasaltPresenter/Shared/basalt/engine.hpp

46 lines
1.3 KiB
C++

#pragma once
#include "guid.hpp"
#include "object_loader.hpp"
#include "anime_loader.hpp"
#include <string>
#include <cinttypes>
namespace basalt::shared::engine {
struct EngineConfig {
bool headless; ///< Whether enable headless mode (No Window created).
std::uint32_t width; ///< Window width.
std::uint32_t height; ///< Window height.
guid::Guid deliver; ///< The GUID of deliver.
object_loader::IObjectLoader* object_loader; ///< The instance of object loader.
anime_loader::IAnimeLoader* anime_loader; ///< The instance of anime loader.
};
enum class EngineStatus {
Ready, ///< Engine was allocated but not initialized.
Running, ///< Engine has been initialized and running.
Stop, ///< Engine is shutdown.
};
class IEngine {
public:
IEngine();
virtual ~IEngine();
public:
virtual guid::Guid get_guid() const;
virtual void startup(EngineConfig&& config);
/**
* @brief
* @return True for active exit.
*/
virtual bool tick();
virtual void shutdown();
protected:
EngineConfig config;
EngineStatus status;
};
} // namespace basalt::shared::engine