* Returns all the dependent objects of the given parent object. * * @param parent The parent object. * * @returns A list of the dependent objects. */
| 60 | * @returns A list of the dependent objects. |
| 61 | */ |
| 62 | std::vector<ConfigObject::Ptr> DependencyGraph::GetChildren(const ConfigObject::Ptr& parent) |
| 63 | { |
| 64 | std::vector<ConfigObject::Ptr> objects; |
| 65 | |
| 66 | std::unique_lock lock(m_Mutex); |
| 67 | auto [begin, end] = m_Dependencies.get<1>().equal_range(parent.get()); |
| 68 | std::transform(begin, end, std::back_inserter(objects), [](const Edge& edge) { |
| 69 | return edge.child; |
| 70 | }); |
| 71 | |
| 72 | return objects; |
| 73 | } |