Qt 6.x
The Qt SDK
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 ()
 
virtual EntryMap availableEntries () const =0
 
virtual Entry addEntry (const QByteArray &key, const EntryDesc &entryDesc)=0
 
virtual bool extractEntry (Entry entry, EntryDesc &entryDesc)=0
 

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(), e, QSet< T >::insert(), map, QIODevice::pos(), QDataStream::Qt_6_0, 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.

Referenced by QSSGShaderLibraryManager::loadPregeneratedShaderInfo().

+ Here is the caller graph for this function:

◆ dumpInfo() [1/3]

void QQsbIODeviceCollection::dumpInfo ( )

Definition at line 360 of file qqsbcollection.cpp.

References borderText(), e, Qt::endl(), extractEntry(), QQsbCollection::EntryDesc::featureSet, QQsbCollection::EntryDesc::fragShader, i, map, QQsbCollection::EntryDesc::materialKey, qDebug, qWarning, Read, QSet< T >::size(), unmap(), and QQsbCollection::EntryDesc::vertShader.

Referenced by dumpInfo(), and dumpInfo().

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

◆ dumpInfo() [2/3]

void QQsbIODeviceCollection::dumpInfo ( const QString device)
static

Definition at line 386 of file qqsbcollection.cpp.

References dumpInfo(), and file.

+ Here is the call graph for this function:

◆ dumpInfo() [3/3]

void QQsbIODeviceCollection::dumpInfo ( QIODevice device)
static

Definition at line 392 of file qqsbcollection.cpp.

References dumpInfo().

+ Here is the call graph for this function:

◆ extractEntry()

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

Implements QQsbCollection.

Definition at line 336 of file qqsbcollection.cpp.

References QIODevice::isOpen(), QIODevice::isReadable(), QDataStream::Qt_6_0, qWarning, QIODevice::seek(), QDataStream::setVersion(), and QIODevice::size().

Referenced by dumpInfo(), and QSSGShaderCache::newPipelineFromPregenerated().

+ 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.

Referenced by QSSGShaderLibraryManager::loadPregeneratedShaderInfo(), and QSSGShaderCache::newPipelineFromPregenerated().

+ Here is the call graph for this function:
+ Here is the caller 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(), QSSGShaderLibraryManager::loadPregeneratedShaderInfo(), map(), and QSSGShaderCache::newPipelineFromPregenerated().

+ 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: