2021-11-03 15:42:16 +01:00
|
|
|
#ifndef PLATFORM_INITIALIZER_H
|
|
|
|
#define PLATFORM_INITIALIZER_H
|
|
|
|
|
2021-11-09 17:47:51 +01:00
|
|
|
#include "core/os/platform.h"
|
2021-11-03 15:42:16 +01:00
|
|
|
#include "core/os/crash_handler.h"
|
|
|
|
|
|
|
|
|
|
|
|
class PlatformInitializer {
|
2021-11-09 17:47:51 +01:00
|
|
|
public:
|
2021-11-09 17:55:55 +01:00
|
|
|
static void arg_setup(int argc, char **argv, char **envp);
|
|
|
|
|
2021-11-09 17:47:51 +01:00
|
|
|
static void allocate_platform();
|
|
|
|
static void free_platform();
|
|
|
|
|
2021-11-03 15:42:16 +01:00
|
|
|
static void allocate_crash_handler();
|
|
|
|
static void free_crash_handler();
|
|
|
|
|
|
|
|
static void allocate_all();
|
|
|
|
static void free_all();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static CrashHandler *_crash_handler;
|
2021-11-09 17:47:51 +01:00
|
|
|
static Platform *_platform;
|
2021-11-03 15:42:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|