| 46 | // find in vector with tag |
| 47 | template<typename T> |
| 48 | std::shared_ptr<T> Find_(const std::vector<std::pair<std::string, std::shared_ptr<T>>>& vec, const std::string& tag) |
| 49 | { |
| 50 | if (tag.empty()) { |
| 51 | return {}; |
| 52 | } |
| 53 | else { |
| 54 | using PairType = std::decay_t<decltype(vec)>::value_type; |
| 55 | if (auto i = rn::find(vec, tag, &PairType::first); i != vec.end()) { |
| 56 | return i->second; |
| 57 | } |
| 58 | else { |
| 59 | return {}; |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | // command packets that can be put on the entry queue in place of log entries |
| 64 | // used to control the worker thread. Each packet encodes what functionality |
| 65 | // to call in the variant visit routine |
no test coverage detected