LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ParameterSetImplHelpers.h
Go to the documentation of this file.
1 #ifndef fhiclcpp_detail_ParameterSetImplHelpers_h
2 #define fhiclcpp_detail_ParameterSetImplHelpers_h
3 
4 #include <any>
5 #include <string>
6 #include <vector>
7 
8 namespace fhicl::detail {
9 
10  //===============================================================
11  // get_names
12 
13  class Keys {
14  public:
15  Keys(std::vector<std::string> const& keys, std::string const& last);
16  ~Keys();
17 
18  std::vector<std::string> const& tables() const noexcept;
19  std::string const& last() const noexcept;
20 
21  private:
22  std::vector<std::string> tables_;
23  std::string last_;
24  };
25 
26  Keys get_names(std::string const& key);
27 
28  //===============================================================
29  // get_sequence_indices
30 
31  class SequenceKey {
32  public:
33  SequenceKey(std::string const& name,
34  std::vector<std::size_t> const& indices);
35  ~SequenceKey();
36 
37  std::string const& name() const noexcept;
38  std::vector<std::size_t> const& indices() const noexcept;
39 
40  private:
41  std::string name_;
42  std::vector<std::size_t> indices_;
43  };
44 
45  SequenceKey get_sequence_indices(std::string const& key);
46 
47  //===============================================================
48  // find_an_any
49 
52  std::any& a);
53 }
54 
55 #endif /* fhiclcpp_detail_ParameterSetImplHelpers_h */
56 
57 // Local variables:
58 // mode: c++
59 // End:
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:93
Keys get_names(std::string const &key)
intermediate_table::const_iterator const_iterator
std::vector< std::string > const & tables() const noexcept
std::vector< std::string > tables_
std::vector< std::size_t > indices_
constexpr std::array< std::size_t, geo::vect::dimension< Vector >)> indices()
Returns a sequence of indices valid for a vector of the specified type.
bool find_an_any(std::vector< std::size_t >::const_iterator it, std::vector< std::size_t >::const_iterator const cend, std::any &a)
SequenceKey get_sequence_indices(std::string const &key)
Keys(std::vector< std::string > const &keys, std::string const &last)
std::string const & last() const noexcept