1 #ifndef fhiclcpp_types_AllowedConfigurationMacro_h 2 #define fhiclcpp_types_AllowedConfigurationMacro_h 12 #include "cetlib/compiler_macros.h" 18 #include <type_traits> 22 template <
class T,
class Enable =
void>
24 static std::unique_ptr<fhicl::ConfigurationTable>
25 get(std::string
const& )
27 return std::unique_ptr<fhicl::ConfigurationTable>{
nullptr};
33 std::void_t<decltype(typename T::Parameters{
34 std::declval<fhicl::Name>()})>> {
35 static std::unique_ptr<fhicl::ConfigurationTable>
36 get(std::string
const& name)
38 return std::make_unique<typename T::Parameters>(
fhicl::Name{name});
43 #define FHICL_PROVIDE_ALLOWED_CONFIGURATION(klass) \ 44 EXTERN_C_FUNC_DECLARE_START \ 45 std::unique_ptr<fhicl::ConfigurationTable> allowed_configuration( \ 46 std::string const& name) \ 48 return fhicl::detail::AllowedConfiguration<klass>::get(name); \ 50 EXTERN_C_FUNC_DECLARE_END