Platform/PlatformApplication: adding create() method.
This commit is contained in:
parent
0540f5d201
commit
b91b9f3768
3 changed files with 24 additions and 0 deletions
21
source/Platform/PlatformApplication.cpp
Normal file
21
source/Platform/PlatformApplication.cpp
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
#include "PlatformApplication.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Platform/Win32/Win32Application.h>
|
||||
typedef sp::Win32Application ApplicationType;
|
||||
#elif defined(__linux__) || defined(unix) || defined(__unix) || defined(__unix__)
|
||||
#include <Platform/Unix/UnixApplication.h>
|
||||
typedef sp::UnixApplication ApplicationType;
|
||||
#else
|
||||
#error "No Application implementation exists"
|
||||
#endif
|
||||
|
||||
namespace sp {
|
||||
|
||||
PlatformApplication* PlatformApplication::create()
|
||||
{
|
||||
return new ApplicationType;
|
||||
}
|
||||
|
||||
} // namespace sp
|
||||
Loading…
Add table
Add a link
Reference in a new issue