/* ******************************************************************************* * INCLUDE ******************************************************************************* */ #include "Application.h" #ifdef USING_HARDWARE_SUBSYSTEM #include "HardwareSubsystem.h" #endif #ifdef USING_NETWORK_SUBSYSTEM #include "NetworkSubsystem.h" #endif #ifdef USING_GRAPHICS_SUBSYSTEM #include "GraphicsSubsystem.h" #endif #ifdef WINDOWS_GUI_APPLICATION #include #include #endif #ifdef USING_VIDEO_SUBSYSTEM #include "VideoSubsystem.h" #endif /* ******************************************************************************* * FUNCTIONS ******************************************************************************* */ #ifdef WINDOWS_GUI_APPLICATION int WINAPI _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ INT nCmdShow) #else int main() #endif { Application app; #ifdef USING_HARDWARE_SUBSYSTEM app.addSubsystem(new Hardware::HardwareSubsystem()); #endif #ifdef USING_NETWORK_SUBSYSTEM app.addSubsystem(new Network::NetworkSubsystem()); #endif #ifdef USING_GRAPHICS_SUBSYSTEM app.addSubsystem(new Graphics::GraphicsSubsystem()); #endif #ifdef USING_VIDEO_SUBSYSTEM app.addSubsystem(new Video::VideoSubsystem()); #endif int rc = 0; try { rc = app.run(); } catch (const std::exception& e) { std::cout << e.what() << std::endl; } catch (...) { std::cout << "Unknown exception" << std::endl; } return rc; }