mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-01 10:28:52 -05:00
Stack plus minimum tests added Updated to master Removed useless or adressed TODOS Constants name applied Renamed searchModel to searchRequestModel Review applied We should remove legacy window names Bell names fixes
26 lines
671 B
C++
26 lines
671 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "WindowsFactory.hpp"
|
|
#include <AppWindow.hpp>
|
|
#include <utility>
|
|
|
|
namespace app
|
|
{
|
|
|
|
void WindowsFactory::attach(const std::string &name, builder builder)
|
|
{
|
|
builders[name] = std::move(builder);
|
|
}
|
|
|
|
auto WindowsFactory::isRegistered(const std::string &name) const -> bool
|
|
{
|
|
return builders.find(name) != std::end(builders);
|
|
}
|
|
|
|
auto WindowsFactory::build(ApplicationCommon *app, const std::string &name) -> handle
|
|
{
|
|
return builders[name](app, name);
|
|
}
|
|
} // namespace app
|