Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QRandomAccessAsyncFileBackend Class Referenceabstract

#include <qrandomaccessasyncfile_p_p.h>

Collaboration diagram for QRandomAccessAsyncFileBackend:

Public Member Functions

 QRandomAccessAsyncFileBackend (QRandomAccessAsyncFile *owner)
virtual ~QRandomAccessAsyncFileBackend ()
virtual bool init ()=0
virtual void cancelAndWait (QIOOperation *op)=0
virtual void close ()=0
virtual qint64 size () const =0
virtual QIOOperationopen (const QString &path, QIODeviceBase::OpenMode mode)=0
virtual QIOOperationflush ()=0
virtual QIOReadOperationread (qint64 offset, qint64 maxSize)=0
virtual QIOWriteOperationwrite (qint64 offset, const QByteArray &data)=0
virtual QIOWriteOperationwrite (qint64 offset, QByteArray &&data)=0
virtual QIOVectoredReadOperationreadInto (qint64 offset, QSpan< std::byte > buffer)=0
virtual QIOVectoredWriteOperationwriteFrom (qint64 offset, QSpan< const std::byte > buffer)=0
virtual QIOVectoredReadOperationreadInto (qint64 offset, QSpan< const QSpan< std::byte > > buffers)=0
virtual QIOVectoredWriteOperationwriteFrom (qint64 offset, QSpan< const QSpan< const std::byte > > buffers)=0

Protected Types

enum class  FileState : quint8 { Closed , OpenPending , Opened }

Protected Attributes

QString m_filePath
QRandomAccessAsyncFilem_owner = nullptr
QIODeviceBase::OpenMode m_openMode
FileState m_fileState = FileState::Closed

Detailed Description

Definition at line 53 of file qrandomaccessasyncfile_p_p.h.

Member Enumeration Documentation

◆ FileState

enum class QRandomAccessAsyncFileBackend::FileState : quint8
strongprotected
Enumerator
Closed 
OpenPending 
Opened 

Definition at line 84 of file qrandomaccessasyncfile_p_p.h.

Constructor & Destructor Documentation

◆ QRandomAccessAsyncFileBackend()

QT_BEGIN_NAMESPACE QRandomAccessAsyncFileBackend::QRandomAccessAsyncFileBackend ( QRandomAccessAsyncFile * owner)
explicit

Definition at line 10 of file qrandomaccessasyncfile.cpp.

◆ ~QRandomAccessAsyncFileBackend()

QRandomAccessAsyncFileBackend::~QRandomAccessAsyncFileBackend ( )
virtualdefault

Member Function Documentation

◆ cancelAndWait()

virtual void QRandomAccessAsyncFileBackend::cancelAndWait ( QIOOperation * op)
pure virtual

◆ close()

virtual void QRandomAccessAsyncFileBackend::close ( )
pure virtual

◆ flush()

virtual QIOOperation * QRandomAccessAsyncFileBackend::flush ( )
nodiscardpure virtual

Referenced by testing.tools.encode_pdf_filter._SinkPdfStream::close().

Here is the caller graph for this function:

◆ init()

virtual bool QRandomAccessAsyncFileBackend::init ( )
pure virtual

◆ open()

virtual QIOOperation * QRandomAccessAsyncFileBackend::open ( const QString & path,
QIODeviceBase::OpenMode mode )
nodiscardpure virtual

◆ read()

virtual QIOReadOperation * QRandomAccessAsyncFileBackend::read ( qint64 offset,
qint64 maxSize )
nodiscardpure virtual

◆ readInto() [1/2]

virtual QIOVectoredReadOperation * QRandomAccessAsyncFileBackend::readInto ( qint64 offset,
QSpan< const QSpan< std::byte > > buffers )
nodiscardpure virtual

◆ readInto() [2/2]

virtual QIOVectoredReadOperation * QRandomAccessAsyncFileBackend::readInto ( qint64 offset,
QSpan< std::byte > buffer )
nodiscardpure virtual

◆ size()

virtual qint64 QRandomAccessAsyncFileBackend::size ( ) const
pure virtual

◆ write() [1/2]

virtual QIOWriteOperation * QRandomAccessAsyncFileBackend::write ( qint64 offset,
const QByteArray & data )
nodiscardpure virtual

◆ write() [2/2]

virtual QIOWriteOperation * QRandomAccessAsyncFileBackend::write ( qint64 offset,
QByteArray && data )
nodiscardpure virtual

◆ writeFrom() [1/2]

virtual QIOVectoredWriteOperation * QRandomAccessAsyncFileBackend::writeFrom ( qint64 offset,
QSpan< const QSpan< const std::byte > > buffers )
nodiscardpure virtual

◆ writeFrom() [2/2]

virtual QIOVectoredWriteOperation * QRandomAccessAsyncFileBackend::writeFrom ( qint64 offset,
QSpan< const std::byte > buffer )
nodiscardpure virtual

Member Data Documentation

◆ m_filePath

QString QRandomAccessAsyncFileBackend::m_filePath
protected

Definition at line 91 of file qrandomaccessasyncfile_p_p.h.

◆ m_fileState

FileState QRandomAccessAsyncFileBackend::m_fileState = FileState::Closed
protected

Definition at line 94 of file qrandomaccessasyncfile_p_p.h.

◆ m_openMode

QIODeviceBase::OpenMode QRandomAccessAsyncFileBackend::m_openMode
protected

Definition at line 93 of file qrandomaccessasyncfile_p_p.h.

◆ m_owner

QRandomAccessAsyncFile* QRandomAccessAsyncFileBackend::m_owner = nullptr
protected

Definition at line 92 of file qrandomaccessasyncfile_p_p.h.


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