1 #ifndef fhiclcpp_types_OptionalTable_h 2 #define fhiclcpp_types_OptionalTable_h 24 class OptionalTable final :
public detail::TableBase,
25 private detail::RegisterIfTableMember {
39 std::function<
bool()> maybeUse);
41 std::set<std::string>
const& keysToIgnore);
58 return opt.has_value();
64 return TableBase::has_value();
70 return TableBase::guarantee_pset();
80 std::shared_ptr<T>
value_{std::make_shared<T>()};
103 template <
typename T>
106 std::function<
bool()> maybeUse)
117 template <
typename T>
119 std::set<std::string>
const& keysToIgnore)
#define NO_DELEGATED_PARAMETERS
std::shared_ptr< T > value_
std::optional< T > operator()() const
static void end_of_ctor()
std::function< bool()> AlwaysUse()
void validate(ParameterSet const &pset, std::set< std::string > const &ignorable_keys={})
#define NO_NESTED_FHICL_TYPES_IN_TABLE
RegisterIfTableMember(ParameterBase *pb)
#define NO_STD_CONTAINERS
std::string const & name() const
#define NO_NESTED_TABLE_FRAGMENTS
bool operator()(T &value) const
ParameterSet const & get_PSet() const
std::string const & comment() const
TableBase(Name const &name, Comment const &comment, par_style vt, std::function< bool()> maybeUse)