As we just this throughout the whole program. and platform can be determined at compile time. we might as well allocate it statically.
31 lines
511 B
C++
31 lines
511 B
C++
|
|
#ifndef SPECTRE_PLATFORM_H
|
|
#define SPECTRE_PLATFORM_H
|
|
|
|
#include <Spectre/Core/NonCopyable.h>
|
|
|
|
namespace sp {
|
|
|
|
class PlatformInput;
|
|
class PlatformDisplay;
|
|
class MessageQueue;
|
|
|
|
class PlatformApplication : NonCopyable
|
|
{
|
|
public :
|
|
static PlatformApplication* get();
|
|
|
|
virtual void init() = 0;
|
|
|
|
virtual void shutdown() = 0;
|
|
|
|
//virtual PlatformDisplay& getDisplay() = 0;
|
|
|
|
virtual PlatformInput& getInput() = 0;
|
|
|
|
virtual MessageQueue& getMessageQueue() = 0;
|
|
};
|
|
|
|
} // namespace sp
|
|
|
|
#endif /* SPECTRE_PLATFORM_H */
|