MCPcopy Create free account
hub / github.com/MITK/MITK / RestoreUid

Method RestoreUid

Modules/RESTAPI/src/mitkNodeUidMapper.cpp:161–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void NodeUidMapper::RestoreUid(const DataNode* node, const std::string& uid)
162{
163 if (node == nullptr)
164 {
165 throw std::invalid_argument("Node cannot be null");
166 }
167
168 std::lock_guard<std::mutex> lock(m_Mutex);
169
170 // Restore the mapping in both directions
171 m_UidToNode[uid] = const_cast<DataNode*>(node);
172 m_NodeToUid[node] = uid;
173
174 // Restore as property for debugging visibility
175 const_cast<DataNode*>(node)->SetStringProperty(UID_PROPERTY_KEY, uid.c_str());
176}
177
178std::string NodeUidMapper::GenerateUid()
179{

Callers 2

UpdateNodeMethod · 0.80

Calls 1

SetStringPropertyMethod · 0.45

Tested by 1