Nebula
Loading...
Searching...
No Matches
osxsysfunc.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
11#include "core/types.h"
12#include "core/exithandler.h"
13
14namespace System
15{
16class SystemInfo;
17}
18
19//------------------------------------------------------------------------------
20namespace OSX
21{
23{
24public:
26 static void Setup();
28 static void Exit(int exitCode);
30 static void Error(const char* error);
32 static void MessageBox(const char* msg);
34 static void DebugOut(const char* msg);
36 static void Sleep(double sec);
39
40private:
41 friend class Core::ExitHandler;
43 static const Core::ExitHandler* RegisterExitHandler(const Core::ExitHandler* exitHandler);
44
45 static bool volatile SetupCalled;
46 static const Core::ExitHandler* ExitHandlers; // forward linked list of exit handlers
48};
49
50} // namespace OSX
51//------------------------------------------------------------------------------
52
ExitHandlers are static objects which register themselves automatically once at startup and are calle...
Definition exithandler.h:22
Lowest-level functions for OSX platform.
Definition osxsysfunc.h:23
static void Error(const char *error)
display an error message
static void MessageBox(const char *msg)
display a message which must be confirmed by the user
static const Core::ExitHandler * ExitHandlers
Definition osxsysfunc.h:46
static void Setup()
setup lowlevel Nebula runtime (called before anything else)
static void DebugOut(const char *msg)
print a message on the debug concole
static bool volatile SetupCalled
Definition osxsysfunc.h:45
static const Core::ExitHandler * RegisterExitHandler(const Core::ExitHandler *exitHandler)
register an exit handler which will be called from within Exit()
static void Exit(int exitCode)
cleanly exit the process
static void Sleep(double sec)
sleep for a specified amount of seconds
static System::SystemInfo systemInfo
Definition osxsysfunc.h:47
static const System::SystemInfo * GetSystemInfo()
get system information
Provides information about the host system.
Definition osxsysfunc.h:21
Definition osxsysfunc.h:15