Files
MuditaOS/module-apps/apps-common/PopupBlueprintFactory.cpp
Adam Dobrowolski 0ec9428917 [EGD-7773] Popups stack poc
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
2022-01-04 13:01:23 +01:00

21 lines
618 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 "PopupBlueprintFactory.hpp"
namespace app
{
void PopupBlueprintFactory::registerBlueprint(gui::popup::ID id, gui::popup::Blueprint &&bp)
{
blueprints[id] = bp;
}
std::optional<gui::popup::Blueprint> PopupBlueprintFactory::getBlueprint(gui::popup::ID id)
{
if (auto blueprint = blueprints.find(id); blueprint != blueprints.end()) {
return {blueprint->second};
}
return std::nullopt;
}
} // namespace app