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

Method Initialize

Modules/Persistence/src/mitkPersistenceService.cpp:391–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389}
390
391void mitk::PersistenceService::Initialize()
392{
393 if (m_Initialized || m_InInitialized)
394 return;
395 m_InInitialized = true;
396
397 m_PropertyListsXmlFileReaderAndWriter = PropertyListsXmlFileReaderAndWriter::New();
398
399 // Load Default File in any case
400 this->Load();
401 // std::string id = mitk::PersistenceService::PERSISTENCE_PROPERTYLIST_NAME; //see bug 17729
402 std::string id = GetPersistencePropertyListName();
403 mitk::PropertyList::Pointer propList = this->GetPropertyList(id);
404 bool autoLoadAndSave = true;
405 propList->GetBoolProperty("m_AutoLoadAndSave", autoLoadAndSave);
406
407 if (autoLoadAndSave == false)
408 {
409 MITK_DEBUG("mitk::PersistenceService") << "autoloading was not wished. clearing data we got so far.";
410 this->SetAutoLoadAndSave(false);
411 this->Clear();
412 }
413
414 m_InInitialized = false;
415 m_Initialized = true;
416}
417
418void mitk::PersistenceService::Unitialize()
419{

Callers 15

ClearMethod · 0.95
GetPropertyListMethod · 0.95
SaveMethod · 0.95
LoadMethod · 0.95
SetAutoLoadAndSaveMethod · 0.95
GetDataNodesMethod · 0.95
GetAutoLoadAndSaveMethod · 0.95

Calls 6

LoadMethod · 0.95
GetPropertyListMethod · 0.95
SetAutoLoadAndSaveMethod · 0.95
ClearMethod · 0.95
NewFunction · 0.50
GetBoolPropertyMethod · 0.45

Tested by 5

MakeImageFunction · 0.36
MakeSyntheticImageFunction · 0.36
MakeMinimalImageMethod · 0.36
MakeMultiSliceImageMethod · 0.36