ACF $AcfVersion:0$
Public Types | Public Member Functions | List of all members
ifile::IDeviceBasedPersistence Class Referenceabstract

Interface providing reading and writing data objects via I/O-devices. More...

#include <IDeviceBasedPersistence.h>

Inheritance diagram for ifile::IDeviceBasedPersistence:
istd::IPolymorphic idoc::CTextFileLoaderComp ifile::CComposedFilePersistenceComp ifile::TDeviceBasedSerializerComp< ReadArchive, WriteArchive > iimg::CBitmapLoaderComp

Public Types

enum  OperationState { Successful , Canceled , Failed }
 Result of device-related operation. More...
 
enum  DeviceOperation { ReadOperation = 1 , WriteOperation = 2 }
 
enum  ErrorType {
  NoWritePermissions , NoReadPermissions , NoDeviceAccess , ReadOperationFailed ,
  WriteOperationFailed , UnsupportedArchiveVersion
}
 Possible operation errors. More...
 

Public Member Functions

virtual bool IsDeviceOperationSupported (const istd::IChangeable &dataObject, const QIODevice &device, int deviceOperation) const =0
 Returns true if object dataObject can be processed via defined I/O-device.
 
virtual OperationState ReadFromDevice (istd::IChangeable &data, QIODevice &device, ibase::IProgressManager *progressManagerPtr=nullptr) const =0
 This function loads data data from the given I/O-device device.
 
virtual OperationState WriteToDevice (const istd::IChangeable &data, QIODevice &device, ibase::IProgressManager *progressManagerPtr=nullptr) const =0
 This function writes data data to the given I/O-device device.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Detailed Description

Interface providing reading and writing data objects via I/O-devices.

Definition at line 32 of file IDeviceBasedPersistence.h.

Member Enumeration Documentation

◆ DeviceOperation

Enumerator
ReadOperation 
WriteOperation 

Definition at line 56 of file IDeviceBasedPersistence.h.

◆ ErrorType

Possible operation errors.

Enumerator
NoWritePermissions 

No write access granted.

NoReadPermissions 

No read access granted.

NoDeviceAccess 

Device could not be opened.

ReadOperationFailed 

Reading the data was failed.

WriteOperationFailed 

Writing the data was failed.

UnsupportedArchiveVersion 

The archive has a wrong/unsupported version.

Definition at line 65 of file IDeviceBasedPersistence.h.

◆ OperationState

Result of device-related operation.

Enumerator
Successful 

Operation was successful.

Canceled 

Operation was aborted by user.

Failed 

Operation failed.

Definition at line 38 of file IDeviceBasedPersistence.h.

Member Function Documentation

◆ IsDeviceOperationSupported()

virtual bool ifile::IDeviceBasedPersistence::IsDeviceOperationSupported ( const istd::IChangeable dataObject,
const QIODevice &  device,
int  deviceOperation 
) const
pure virtual

Returns true if object dataObject can be processed via defined I/O-device.

Parameters
dataObjectdata object should be red/written.

Implemented in idoc::CTextFileLoaderComp, ifile::CComposedFilePersistenceComp, ifile::TDeviceBasedSerializerComp< ReadArchive, WriteArchive >, and iimg::CBitmapLoaderComp.

◆ ReadFromDevice()

virtual OperationState ifile::IDeviceBasedPersistence::ReadFromDevice ( istd::IChangeable data,
QIODevice &  device,
ibase::IProgressManager progressManagerPtr = nullptr 
) const
pure virtual

This function loads data data from the given I/O-device device.

Returns
State of the reading operation.
See also
OperationState

Implemented in idoc::CTextFileLoaderComp, ifile::CComposedFilePersistenceComp, ifile::TDeviceBasedSerializerComp< ReadArchive, WriteArchive >, and iimg::CBitmapLoaderComp.

◆ WriteToDevice()

virtual OperationState ifile::IDeviceBasedPersistence::WriteToDevice ( const istd::IChangeable data,
QIODevice &  device,
ibase::IProgressManager progressManagerPtr = nullptr 
) const
pure virtual

This function writes data data to the given I/O-device device.

Returns
State of the writing operation.
See also
OperationState

Implemented in idoc::CTextFileLoaderComp, ifile::CComposedFilePersistenceComp, ifile::TDeviceBasedSerializerComp< ReadArchive, WriteArchive >, and iimg::CBitmapLoaderComp.


The documentation for this class was generated from the following file: