| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #include "profileviewfactory.h" |
| 5 | |
| 6 | #include "exportable.h" |
| 7 | #include "profileview.h" |
| 8 | #include <utility> |
| 9 | |
| 10 | std::unique_ptr<IProfileView> ProfileViewFactory::build( |
| 11 | Exportable const &profile, |
| 12 | std::optional<std::reference_wrapper<IProfileView>> base) const |
| 13 | { |
| 14 | auto profileView = std::make_unique<ProfileView>(); |
| 15 | ProfileView::Initializer pvInitializer(*profileView, base); |
| 16 | profile.exportWith(pvInitializer); |
| 17 | return std::move(profileView); |
| 18 | } |