NLS Engine  v0.1
The Next Logical Step in game engine design.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines
OSInterface.cpp
Go to the documentation of this file.
00001 
00007 #include "OSInterface.h"
00008 
00009 // Standard Includes
00010 
00011 // Library Includes
00012 
00013 // Local Includes
00014 
00015 // Forward Declarations
00016 
00017 // Typedefs
00018 
00019 // Static data
00020 OSInterfaceSPTR OSInterface::operatingSystem(nullptr);
00021 
00022 // Static methods
00023 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00024 void OSInterface::SetOS(OSInterfaceSPTR operating_system) {
00025   if (OSInterface::operatingSystem.get() == nullptr) {
00026     OSInterfaceSPTR os(operating_system);
00027     OSInterface::operatingSystem = os;
00028   }
00029 }
00030 
00031 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00032 OSInterfaceSPTR OSInterface::GetOS() {
00033   OSInterfaceSPTR os(OSInterface::operatingSystem);
00034   return os;
00035 }
00036 
00037 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00038 bool OSInterface::HasOS() {
00039   return OSInterface::operatingSystem.get() != nullptr;
00040 }