Medical Imaging Interaction Toolkit
2024.06.00
Medical Imaging Interaction Toolkit
|
#include <mitkIPersistenceService.h>
Public Member Functions | |
virtual mitk::PropertyList::Pointer | GetPropertyList (std::string &id, bool *existed=nullptr)=0 |
virtual bool | RemovePropertyList (std::string &id)=0 |
virtual std::string | GetDefaultPersistenceFile ()=0 |
virtual std::string | GetPersistenceNodePropertyName ()=0 |
virtual DataStorage::SetOfObjects::Pointer | GetDataNodes (DataStorage *ds=nullptr)=0 |
virtual bool | RestorePropertyListsFromPersistentDataNodes (const DataStorage *storage)=0 |
virtual bool | Save (const std::string &fileName="", bool appendChanges=false)=0 |
virtual bool | Load (const std::string &fileName="", bool enforeReload=true)=0 |
virtual void | SetAutoLoadAndSave (bool autoLoadAndSave)=0 |
virtual bool | GetAutoLoadAndSave ()=0 |
virtual void | AddPropertyListReplacedObserver (PropertyListReplacedObserver *observer)=0 |
virtual void | RemovePropertyListReplacedObserver (PropertyListReplacedObserver *observer)=0 |
virtual | ~IPersistenceService () |
The central service for the persistence module Basic idea is to create PropertyLists with a unique id using AddPropertyList(). A consumer of this interface can write arbitrary information into this propertylist Calling Save() and Load() will cause the Service to save and load the current set of propertlists from a file in the user directory. Using SetAutoLoadAndSave(true) will cause the service to load/save the property lists at application start/stop. Moreover, depending on the backend type, the service is connected to the SceneSerialization module, i.e. the user will be asked whether to save/load the propertlists in/from the current ".mitk" file that is selected by the user.
Definition at line 40 of file mitkIPersistenceService.h.
|
virtual |
nothing to do here
|
pure virtual |
adds a observer which is informed if a propertyList gets replaced during a Load() procedure
Implemented in mitk::PersistenceService.
|
pure virtual |
Implemented in mitk::PersistenceService.
|
pure virtual |
Creates a vector of DataNodes that contain all PropertyLists. Additionally, the DataNodes will have the property name set to the PropertyList's id and a BoolProperty equal to GetPersistenceNodePropertyName() set to true. If ds is set the returned DataNodes will also be added to that DS.
Implemented in mitk::PersistenceService.
|
pure virtual |
Get the default name of the PersistenceFile (the one that is loaded at startup)
Implemented in mitk::PersistenceService.
|
pure virtual |
Implemented in mitk::PersistenceService.
|
pure virtual |
If PropertyList with the given id exists, returns it. Otherwise creates a new one and returns it. If id is empty a UUID will be created and set on the variable If existed was passed, it is true if the PropertyList with that id existed, false otherwise
Implemented in mitk::PersistenceService.
|
pure virtual |
Load PropertyLists from fileName. If fileName is empty, a special file in the users home directory will be used. If enforeReload is false, the service will take care of modified time flags, i.e. it will not load a file that was loaded before and did not change in the meantime or that was modified by the service itself ATTENTION: If there are PropertyLists with the same id contained in the file, existing PropertyLists will be overwritten!
Implemented in mitk::PersistenceService.
|
pure virtual |
removes the PropertyList with the given id
Implemented in mitk::PersistenceService.
|
pure virtual |
removes a specific observer
Implemented in mitk::PersistenceService.
|
pure virtual |
Searches storage for persistent DataNodes, extracts and inserts the appended property lists to this service
Implemented in mitk::PersistenceService.
|
pure virtual |
Save the current PropertyLists to fileName. If fileName is empty, a special file in the users home directory will be used. if appendchanges is true, the file will not replaced but first loaded, then overwritten and then replaced
Implemented in mitk::PersistenceService.
|
pure virtual |
Using SetAutoLoadAndSave(true) will cause the service to load/save the property lists at application start/stop.
Implemented in mitk::PersistenceService.