1 #ifndef fhiclcpp_types_AllowedConfigurationMacro_h 2 #define fhiclcpp_types_AllowedConfigurationMacro_h 12 #include "cetlib/compiler_macros.h" 13 #include "cetlib/metaprogramming.h" 23 template <
class T,
class Enable =
void>
25 static std::unique_ptr<fhicl::ConfigurationTable>
26 get(std::string
const& )
28 return std::unique_ptr<fhicl::ConfigurationTable>{
nullptr};
36 static std::unique_ptr<fhicl::ConfigurationTable>
37 get(std::string
const& name)
39 return std::make_unique<typename T::Parameters>(
fhicl::Name{name});
45 #define FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass) \ 46 EXTERN_C_FUNC_DECLARE_START \ 47 std::unique_ptr<fhicl::ConfigurationTable> allowed_configuration( \ 48 std::string const& name) \ 50 return fhicl::detail::AllowedConfiguration<klass>::get(name); \ 52 EXTERN_C_FUNC_DECLARE_END
typename enable_if_type_exists< T, R >::type enable_if_type_exists_t