| 50 | InterfaceTree::InterfaceTree() : m_root(node_type::createRoot()) {} |
| 51 | |
| 52 | bool InterfaceTree::addInterface(common::ClientInterfacePtr const &iface) { |
| 53 | auto &ifaces = getInterfacesForPath(iface->getPath()); |
| 54 | bool ret = ifaces.empty(); |
| 55 | |
| 56 | // Makes sure we only have one copy of any interface pointer in the |
| 57 | // vector |
| 58 | auto it = std::find(begin(ifaces), end(ifaces), iface); |
| 59 | if (it == end(ifaces)) { |
| 60 | ifaces.push_back(iface); |
| 61 | } |
| 62 | return ret; |
| 63 | } |
| 64 | |
| 65 | bool |
| 66 | InterfaceTree::removeInterface(common::ClientInterfacePtr const &iface) { |
no test coverage detected