2 * Copyright (C) 2012-2021 Euclid Science Ground Segment
4 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
5 * Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option)
8 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
9 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12 * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
13 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 * @file Configuration/_impl/Configuration.icpp
22#include "Configuration/ConfigManager.h"
25namespace Configuration {
28void Configuration::declareDependency() {
29 auto& manager = ConfigManager::getInstance(m_manager_id);
30 manager.registerConfiguration<T>();
31 m_dependencies.emplace(typeid(T));
35T& Configuration::getDependency() {
36 auto& manager = ConfigManager::getInstance(m_manager_id);
37 return manager.getConfiguration<T>();
41const T& Configuration::getDependency() const {
42 auto& manager = ConfigManager::getInstance(m_manager_id);
43 return manager.getConfiguration<T>();
46} // namespace Configuration