// SPDX-License-Identifier: GPL-3.0-or-later // Copyright 2019 Juan Palacios #include "profilepartprovider.h" #include std::unordered_map()>> const & ProfilePartProvider::profilePartProviders() const { return profilePartProviders_(); } std::unordered_map()>> & ProfilePartProvider::profilePartProviders_() { static std::unordered_map()>> providers; return providers; } bool ProfilePartProvider::registerProvider( std::string_view componentID, std::function()> &&provider) { profilePartProviders_().emplace(std::string(componentID), std::move(provider)); return true; }