Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQsbIODeviceCollection Class Reference

#include <qqsbcollection_p.h>

+ Inheritance diagram for QQsbIODeviceCollection:
+ Collaboration diagram for QQsbIODeviceCollection:

Public Types

enum  MapMode { Read = QIODevice::ReadOnly , Write = (QIODevice::WriteOnly | QIODevice::Truncate) }
 
- Public Types inherited from QQsbCollection
using FeatureSet = QMap<QByteArray, bool>
 
using EntryMap = QSet<Entry>
 

Public Member Functions

 QQsbIODeviceCollection (const QString &filePath)
 
 QQsbIODeviceCollection (QIODevice &dev)
 
 ~QQsbIODeviceCollection ()
 
bool map (MapMode mode)
 
void unmap ()
 
EntryMap availableEntries () const override
 
Entry addEntry (const QByteArray &key, const EntryDesc &entryDesc) override
 
bool extractEntry (Entry entry, EntryDesc &entryDesc) override
 
void dumpInfo ()
 
- Public Member Functions inherited from QQsbCollection
virtual ~QQsbCollection ()
 

Static Public Member Functions

static void dumpInfo (const QString &device)
 
static void dumpInfo (QIODevice &device)
 
- Static Public Member Functions inherited from QQsbCollection
template<typename T >
static FeatureSet toFeatureSet (const T &ssgFeatureSet)
 

Additional Inherited Members

- Protected Types inherited from QQsbCollection
enum  Version : quint8 { Unknown , One = 0x10 , Two = 0x20 }
 
- Protected Member Functions inherited from QQsbCollection
bool readEndHeader (QDataStream &ds, qint64 *startPos, quint8 *version)
 
void writeEndHeader (QDataStream &ds, qint64 startPos, quint8 version, quint64 magic)
 
bool readEndHeader (QIODevice *device, EntryMap *entries, quint8 *version)
 
void writeEndHeader (QIODevice *device, const EntryMap &entries)
 

Detailed Description

Definition at line 128 of file qqsbcollection_p.h.

Member Enumeration Documentation

◆ MapMode

Enumerator
Read 
Write 

Definition at line 131 of file qqsbcollection_p.h.

Constructor & Destructor Documentation

◆ QQsbIODeviceCollection() [1/2]

QQsbIODeviceCollection::QQsbIODeviceCollection ( const QString & filePath)
explicit

Definition at line 252 of file qqsbcollection.cpp.

◆ QQsbIODeviceCollection() [2/2]

QQsbIODeviceCollection::QQsbIODeviceCollection ( QIODevice & dev)
explicit

Definition at line 258 of file qqsbcollection.cpp.

◆ ~QQsbIODeviceCollection()

QQsbIODeviceCollection::~QQsbIODeviceCollection ( )

Definition at line 265 of file qqsbcollection.cpp.

References QSet< T >::isEmpty(), QIODevice::isOpen(), and unmap().

+ Here is the call graph for this function:

Member Function Documentation

◆ addEntry()

QQsbCollection::Entry QQsbIODeviceCollection::addEntry ( const QByteArray & key,
const EntryDesc & entryDesc )
overridevirtual

Implements QQsbCollection.

Definition at line 322 of file qqsbcollection.cpp.

References QSet< T >::contains(), QSet< T >::insert(), map, QIODevice::pos(), QDataStream::setVersion(), and Write.

+ Here is the call graph for this function:

◆ availableEntries()

QQsbCollection::EntryMap QQsbIODeviceCollection::availableEntries ( ) const
overridevirtual

Implements QQsbCollection.

Definition at line 317 of file qqsbcollection.cpp.

◆ dumpInfo() [1/3]

void QQsbIODeviceCollection::dumpInfo ( )

Definition at line 360 of file qqsbcollection.cpp.

References borderText(), Qt::endl(), extractEntry(), i, map, qDebug, qWarning, Read, QSet< T >::size(), and unmap().

+ Here is the call graph for this function:

◆ dumpInfo() [2/3]

void QQsbIODeviceCollection::dumpInfo ( const QString & device)
static

Definition at line 386 of file qqsbcollection.cpp.

References file.

◆ dumpInfo() [3/3]

void QQsbIODeviceCollection::dumpInfo ( QIODevice & device)
static

Definition at line 392 of file qqsbcollection.cpp.

◆ extractEntry()

bool QQsbIODeviceCollection::extractEntry ( Entry entry,
EntryDesc & entryDesc )
overridevirtual

Implements QQsbCollection.

Definition at line 336 of file qqsbcollection.cpp.

References QIODevice::isOpen(), QIODevice::isReadable(), qWarning, QIODevice::seek(), QDataStream::setVersion(), QIODevice::size(), and QQsbCollection::Entry::value.

Referenced by dumpInfo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ map()

bool QQsbIODeviceCollection::map ( MapMode mode)

Definition at line 271 of file qqsbcollection.cpp.

References QIODevice::isOpen(), QIODevice::open(), QIODevice::openMode(), Q_ASSERT, qWarning, QQsbCollection::readEndHeader(), ret, QIODeviceBase::Text, QIODeviceBase::Truncate, unmap(), Write, and QIODeviceBase::WriteOnly.

+ Here is the call graph for this function:

◆ unmap()

void QQsbIODeviceCollection::unmap ( )

Definition at line 303 of file qqsbcollection.cpp.

References QSet< T >::clear(), QIODevice::close(), QSet< T >::isEmpty(), QIODevice::isOpen(), QIODevice::openMode(), QFile::remove(), Write, and QQsbCollection::writeEndHeader().

Referenced by ~QQsbIODeviceCollection(), dumpInfo(), and map().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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