![]() |
|
|||
File indexing completed on 2025-07-10 07:55:27
0001 // Created by Dmitry Romanov 0002 // Subject to the terms in the LICENSE file found in the top-level directory. 0003 // 0004 0005 #pragma once 0006 namespace eicrecon { 0007 0008 /** 0009 * This struct might be used for factories that has no underlying config class, 0010 * for example: 0011 * WithPodConfig<NoConfig> 0012 */ 0013 struct NoConfig {}; 0014 0015 /** 0016 * Small helper class that brings common functions interface for classes that have POD type config 0017 * @tparam ConfigT 0018 * 0019 * @example: 0020 * 0021 */ 0022 template <typename ConfigT = NoConfig> class WithPodConfig { 0023 public: 0024 using ConfigType = ConfigT; 0025 0026 /// Get a configuration to be changed 0027 ConfigT& getConfig() { return m_cfg; } 0028 0029 /// Sets a configuration (config is properly copyible) 0030 ConfigT& applyConfig(ConfigT cfg) { 0031 m_cfg = cfg; 0032 return m_cfg; 0033 } 0034 0035 protected: 0036 /** configuration parameters **/ 0037 ConfigT m_cfg; 0038 }; 0039 } // namespace eicrecon
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |