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

Method SetActiveDataStorage

Modules/Core/src/DataManagement/mitkDataStorageService.cpp:69–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69bool DataStorageService::SetActiveDataStorage(const std::string& label)
70{
71 std::lock_guard<std::mutex> lock(m_Mutex);
72
73 if (label.empty() || label == DEFAULT_LABEL)
74 {
75 m_ActiveLabel.clear();
76 return true;
77 }
78
79 // Check that the label exists
80 if (this->FindStorageByLabel(label).IsValid())
81 {
82 m_ActiveLabel = label;
83 return true;
84 }
85
86 return false;
87}
88
89bool DataStorageService::AddDataStorage(const std::string& label, DataStorage::Pointer storage)
90{

Calls 4

FindStorageByLabelMethod · 0.95
emptyMethod · 0.45
clearMethod · 0.45
IsValidMethod · 0.45