39 std::vector<T> & unordered_interfaces,
const std::vector<std::string> & ordered_names,
40 const std::string & interface_type, std::vector<std::reference_wrapper<T>> & ordered_interfaces)
42 ordered_interfaces.reserve(ordered_names.size());
43 for (
const auto & name : ordered_names)
45 for (
auto & interface : unordered_interfaces)
47 if (!interface_type.empty())
49 if ((name == interface.get_name()) && (interface_type == interface.get_interface_name()))
51 ordered_interfaces.push_back(std::ref(interface));
56 if (name == interface.get_full_name())
58 ordered_interfaces.push_back(std::ref(interface));
64 return ordered_names.size() == ordered_interfaces.size();
68 const std::vector<std::string> & interface_type_list,
const std::string & interface_type)
bool get_ordered_interfaces(std::vector< T > &unordered_interfaces, const std::vector< std::string > &ordered_names, const std::string &interface_type, std::vector< std::reference_wrapper< T > > &ordered_interfaces)
Reorder interfaces with references according to joint names or full interface names.
Definition helpers.hpp:38