MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / addInterface

Method addInterface

src/osvr/Client/InterfaceTree.cpp:52–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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) {

Callers 2

m_handleNewInterfaceMethod · 0.45
m_handleNewInterfaceMethod · 0.45

Calls 2

emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected