Feature #11106
Feature #9078: ParameterSet validation enhancements
Feature #8962: Create 'TupleAs' class that supports FHiCL-to-C++ conversion
Redesign fhiclcpp parameter registration system
Description
In order to more easily support extensions to the fhiclcpp
parameter system, which enables configuration validation and description, the parameter registration system must be redesigned so that only the parameters that must be registered due to C++ limitations actually are.
History
#1 Updated by Kyle Knoepfel about 5 years ago
- Status changed from New to Assigned
#2 Updated by Kyle Knoepfel about 5 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
The redesign was implemented with fhicl-cpp:ed42628. To summarize the changes:
- All parameters used to be registered at construction time. Since stack-variable addresses were being used, this resulted in unnecessarily complicated memory handling. To remove this complication, heap-memory was used instead, where the
std::shared_ptr<T>
is used to manage it. - To facilitate the above change, the c'tor signatures for the
Sequence<T(,N)>
andTuple<T...>
parameters needed to be adjusted -- if specifying a default value for sequences is desired, the return type should be used:
Brace-enclosed default-values are still supported.- Sequence<int> nums { Name("nums"), Sequence<int>{1, 3, 5} }; + Sequence<int> nums { Name("nums"), std::vector<int>{1, 3, 5} }; Sequence<int> nums { Name("nums"), {1,3,5} }; // brace-enclosed - Tuple<string, int> pair { Name("pair"), Tuple<string,int>{"foo", 3} }; + Tuple<string, int> pair { Name("pair"), std::tuple<string,int>{"foo", 3} }; Tuple<string, int> pair { Name("pair"), {"foo", 3} }; // brace-enclosed
- Now, only table-members are registered--i.e. a
struct
object's data members, which cannot be easily provided due to inadequate reflection support by C++.
#3 Updated by Kyle Knoepfel about 5 years ago
- Target version changed from 2.01.00 to 1.17.05
#4 Updated by Kyle Knoepfel about 5 years ago
- Status changed from Resolved to Closed