rcpp_framework/core/os/platform.cpp

27 lines
442 B
C++
Raw Normal View History

2021-11-09 17:47:51 +01:00
#include "platform.h"
#include "core/error_macros.h"
void Platform::arg_setup(int argc, char **argv, char **envp) {
arg_parser.setup(argc, argv, envp);
}
String Platform::get_executable_path() {
return arg_parser.executable_name;
}
2021-11-09 17:47:51 +01:00
Platform *Platform::get_singleton() {
return _self;
}
Platform::Platform() {
_self = this;
}
Platform::~Platform() {
if (_self == this) {
_self = nullptr;
}
}
Platform *Platform::_self = nullptr;