![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
Interface providing loading and saving of data objects. More...
#include <IFilePersistence.h>
Public Types | |
enum | ErrorType { ET_NO_WRITE_PERMISSIONS , ET_NO_READ_PERMISSIONS , ET_FILE_NOT_EXIST } |
Possible file I/O errors. More... | |
enum | MessageId { MI_BAD_OBJECT_TYPE = 0xabf0 , MI_CANNOT_LOAD , MI_CANNOT_SAVE , MI_BAD_EXTENSION , MI_FILE_NOT_EXIST , MI_UNSUPPORTED_VERSION } |
List of possible message IDs used in context of this interface. More... | |
![]() | |
enum | QueryFlags { QF_LOAD = 1 << 0 , QF_SAVE = 1 << 1 , QF_FILE = 1 << 2 , QF_DIRECTORY = 1 << 3 , QF_ANONYMOUS = 1 << 4 } |
Describe detailed options of query. More... | |
Public Member Functions | |
virtual bool | IsOperationSupported (const istd::IChangeable *dataObjectPtr, const QString *filePathPtr=nullptr, int flags=-1, bool beQuiet=true) const =0 |
Returns true if object dataObject can be loaded/saved. | |
virtual iproc::CTaskState | LoadFromFile (istd::IChangeable &data, const QString &filePath=QString(), iproc::IProgressManager *progressManagerPtr=nullptr) const =0 |
This function loads data data from file filePath . | |
virtual iproc::CTaskState | SaveToFile (const istd::IChangeable &data, const QString &filePath=QString(), iproc::IProgressManager *progressManagerPtr=nullptr) const =0 |
This function saves data data to file filePath . | |
![]() | |
virtual bool | GetFileExtensions (QStringList &result, const istd::IChangeable *dataObjectPtr=nullptr, int flags=-1, bool doAppend=false) const =0 |
Get file extensions supported by this loader. | |
virtual QString | GetTypeDescription (const QString *extensionPtr=nullptr) const =0 |
Get description of object type associated with single extension. | |
Interface providing loading and saving of data objects.
Definition at line 32 of file IFilePersistence.h.
Possible file I/O errors.
Enumerator | |
---|---|
ET_NO_WRITE_PERMISSIONS | File could not be written, no write access granted. |
ET_NO_READ_PERMISSIONS | File could not be read, no read access granted. |
ET_FILE_NOT_EXIST | File doesn't exist. |
Definition at line 38 of file IFilePersistence.h.
List of possible message IDs used in context of this interface.
Definition at line 59 of file IFilePersistence.h.
|
pure virtual |
Returns true
if object dataObject
can be loaded/saved.
dataObjectPtr | optional pointer to data object should be loaded/stored. It can be nullptr if any object is meant. |
filePathPtr | optional pointer to file should be loaded/stored. It can be nullptr if any file is meant. If it points at empty string, anonymous loading is mean. |
flags | combination of flags defined in QueryFlags and ifile::IFileTypeInfo::QueryFlags . |
beQuiet | if true, no user message output is allowed. |
Implemented in icmpstr::CRegistrySerializerComp, idoc::CMultiPageDocumentFilePersistenceComp, idoc::CTextFilePersistenceComp, idocgui::CClipboardSerializerComp, ifile::CComposedFilePersistenceComp, ifile::CFileSerializerCompBase, ifile::CSettingsSerializerComp, ifilegui::CFileDialogPersistenceComp, iimg::CBitmapPersistenceComp, iipr::CRenderedObjectFileLoaderComp, imeas::CWavSamplesSaverComp, and ipackage::CRegistryCodeSaverComp.
|
pure virtual |
This function loads data data
from file filePath
.
Implemented in icmpstr::CRegistrySerializerComp, idoc::CMultiPageDocumentFilePersistenceComp, idoc::CTextFilePersistenceComp, idocgui::CClipboardSerializerComp, ifile::CComposedFilePersistenceComp, ifile::CSettingsSerializerComp, ifile::TFileSerializerComp< ReadArchive, WriteArchive >, ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >, ifilegui::CFileDialogPersistenceComp, iimg::CBitmapPersistenceComp, iipr::CRenderedObjectFileLoaderComp, imeas::CWavSamplesSaverComp, and ipackage::CRegistryCodeSaverComp.
|
pure virtual |
This function saves data data
to file filePath
.
Implemented in icmpstr::CRegistrySerializerComp, idoc::CMultiPageDocumentFilePersistenceComp, idoc::CTextFilePersistenceComp, idocgui::CClipboardSerializerComp, ifile::CComposedFilePersistenceComp, ifile::CSettingsSerializerComp, ifile::TFileSerializerComp< ReadArchive, WriteArchive >, ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >, ifilegui::CFileDialogPersistenceComp, iimg::CBitmapPersistenceComp, iipr::CRenderedObjectFileLoaderComp, imeas::CWavSamplesSaverComp, and ipackage::CRegistryCodeSaverComp.
© Witold Gantzke and Kirill Lepskiy