|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
XML file-backed implementation of IPreferencesStorage. More...
#include <mitkXMLPreferencesStorage.h>


Public Member Functions | |
| XMLPreferencesStorage (const fs::path &filename) | |
| Construct storage backed by the given XML file. More... | |
| ~XMLPreferencesStorage () override | |
| void | Flush () override |
| Serialize the entire preferences tree to the backing XML file. More... | |
Public Member Functions inherited from mitk::IPreferencesStorage | |
| IPreferencesStorage (const fs::path &filename) | |
| Constructor. Load preferences from the specified file. More... | |
| virtual | ~IPreferencesStorage () |
| Destructor. Write preferences to disk for the last time. More... | |
| virtual IPreferences * | GetRoot () |
| Get the preferences root node. More... | |
| virtual const IPreferences * | GetRoot () const |
| virtual fs::path | GetFilename () const |
| Get the filename of the preferences storage. More... | |
Additional Inherited Members | |
Protected Attributes inherited from mitk::IPreferencesStorage | |
| fs::path | m_Filename |
| std::unique_ptr< IPreferences > | m_Root |
XML file-backed implementation of IPreferencesStorage.
Persists the preferences tree to an XML file using TinyXML2. On construction, loads existing preferences from the file if it exists, otherwise creates an empty root node and ensures the parent directory exists. On Flush(), serializes the entire preferences tree back to the file.
Definition at line 32 of file mitkXMLPreferencesStorage.h.
|
explicit |
Construct storage backed by the given XML file.
If the file exists, its contents are deserialized into the preferences tree. Otherwise, parent directories are created and an empty root node is initialized.
| [in] | filename | Path to the XML preferences file. |
|
override |
|
overridevirtual |
Serialize the entire preferences tree to the backing XML file.
Overwrites the file with the current state of all preferences nodes.
Implements mitk::IPreferencesStorage.