| 123456789101112131415161718192021222324252627282930313233343536373839 |
- /*
- * author: Patrick-Christopher Mattulat
- * e-mail: webmaster@lynarstudios.com
- */
- #include <factory/WindowApiEventManagerFactory.hpp>
- #include <ls-std/core/exception/IllegalArgumentException.hpp>
- #include <window/SdlWindowApiEventManager.hpp>
- using ls::atlantis::factory::WindowApiEventManagerFactory;
- using ls::atlantis::glossary::WindowApiTypes;
- using ls::atlantis::interfaces::IWindowApiEventManager;
- using ls::atlantis::window::SdlWindowApiEventManager;
- using ls::std::core::IllegalArgumentException;
- using ::std::make_shared;
- using ::std::shared_ptr;
- WindowApiEventManagerFactory::WindowApiEventManagerFactory() = default;
- WindowApiEventManagerFactory::~WindowApiEventManagerFactory() = default;
- shared_ptr<IWindowApiEventManager> WindowApiEventManagerFactory::build(const WindowApiTypes &_windowApi)
- {
- shared_ptr<IWindowApiEventManager> eventManager{};
- switch (_windowApi)
- {
- case WindowApiTypes::NONE_SELECTED:
- {
- throw IllegalArgumentException{};
- }
- case WindowApiTypes::SDL_WINDOW_API:
- {
- eventManager = make_shared<SdlWindowApiEventManager>();
- } break;
- }
- return eventManager;
- }
|