|
ACF $AcfVersion:0$
|
Interface providing loading and saving of data objects. More...
#include <IFilePersistence.h>
Public Types | |
| enum | OperationState { OS_OK , OS_CANCELED , OS_FAILED } |
| Result of operation. More... | |
| 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... | |
Public Types inherited from ifile::IFileTypeInfo | |
| 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=NULL, int flags=-1, bool beQuiet=true) const =0 |
Returns true if object dataObject can be loaded/saved. | |
| virtual OperationState | LoadFromFile (istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const =0 |
This function loads data data from file filePath. | |
| virtual OperationState | SaveToFile (const istd::IChangeable &data, const QString &filePath=QString(), ibase::IProgressManager *progressManagerPtr=NULL) const =0 |
This function saves data data to file filePath. | |
Public Member Functions inherited from ifile::IFileTypeInfo | |
| virtual bool | GetFileExtensions (QStringList &result, const istd::IChangeable *dataObjectPtr=NULL, int flags=-1, bool doAppend=false) const =0 |
| Get file extensions supported by this loader. | |
| virtual QString | GetTypeDescription (const QString *extensionPtr=NULL) const =0 |
| Get description of object type associated with single extension. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Interface providing loading and saving of data objects.
Definition at line 28 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 55 of file IFilePersistence.h.
List of possible message IDs used in context of this interface.
Definition at line 76 of file IFilePersistence.h.
Result of operation.
| Enumerator | |
|---|---|
| OS_OK | Operation was successful. |
| OS_CANCELED | Operation was aborted by user. |
| OS_FAILED | Operation failed. |
Definition at line 34 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 NULL if any object is meant. |
| filePathPtr | optional pointer to file should be loaded/stored. It can be NULL 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 idoc::CMultiPageDocumentFilePersistenceComp, idoc::CTextFileLoaderComp, ifile::CComposedFilePersistenceComp, ifile::CTextFileLogStreamerComp, ifilegui::CFileDialogLoaderComp, iimg::CBitmapLoaderComp, ipackage::CRegistryCodeSaverComp, iqt::CClipboardSerializerComp, iqt::CSettingsSerializerComp, and ifile::CFileSerializerCompBase.
|
pure virtual |
This function loads data data from file filePath.
Implemented in idoc::CMultiPageDocumentFilePersistenceComp, idoc::CTextFileLoaderComp, ifile::CComposedFilePersistenceComp, ifile::CTextFileLogStreamerComp, ifile::TFileSerializerComp< ReadArchive, WriteArchive >, ifilegui::CFileDialogLoaderComp, iimg::CBitmapLoaderComp, ipackage::CRegistryCodeSaverComp, iqt::CClipboardSerializerComp, iqt::CSettingsSerializerComp, and ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >.
|
pure virtual |
This function saves data data to file filePath.
Implemented in idoc::CMultiPageDocumentFilePersistenceComp, idoc::CTextFileLoaderComp, ifile::CComposedFilePersistenceComp, ifile::CTextFileLogStreamerComp, ifile::TFileSerializerComp< ReadArchive, WriteArchive >, ifilegui::CFileDialogLoaderComp, iimg::CBitmapLoaderComp, ipackage::CRegistryCodeSaverComp, iqt::CClipboardSerializerComp, iqt::CSettingsSerializerComp, and ifile::TXmlFileSerializerComp< ReadArchive, WriteArchive >.