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

Method addString

src/osvr/Server/ServerImpl.cpp:274–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272 }
273
274 bool ServerImpl::addString(std::string const &path,
275 std::string const &value) {
276 bool wasChanged = false;
277 auto newElement =
278 common::PathElement{common::elements::StringElement{value}};
279 m_callControlled([&] {
280 auto &node = m_tree.getNodeByPath(path);
281 if (!(newElement == node.value())) {
282 m_treeDirty.set();
283 wasChanged = true;
284 node.value() = newElement;
285 }
286 });
287 return wasChanged;
288 }
289
290 std::string ServerImpl::getSource(std::string const &destination) const {
291 /// @todo needs removal/replacement post path tree

Callers

nothing calls this directly

Calls 2

valueMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected