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
QQsbInMemoryCollection Class Reference

#include <qqsbcollection_p.h>

+ Inheritance diagram for QQsbInMemoryCollection:
+ Collaboration diagram for QQsbInMemoryCollection:

Public Member Functions

 QQsbInMemoryCollection ()=default
 
EntryMap availableEntries () const override
 
Entry addEntry (const QByteArray &key, const EntryDesc &entryDesc) override
 
bool extractEntry (Entry entry, EntryDesc &entryDesc) override
 
void clear ()
 
bool load (const QString &filename)
 
bool save (const QString &filename)
 
- Public Member Functions inherited from QQsbCollection
virtual ~QQsbCollection ()
 

Additional Inherited Members

- Public Types inherited from QQsbCollection
using FeatureSet = QMap<QByteArray, bool>
 
using EntryMap = QSet<Entry>
 
- Static Public Member Functions inherited from QQsbCollection
template<typename T >
static FeatureSet toFeatureSet (const T &ssgFeatureSet)
 
- 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 107 of file qqsbcollection_p.h.

Constructor & Destructor Documentation

◆ QQsbInMemoryCollection()

QQsbInMemoryCollection::QQsbInMemoryCollection ( )
default

Member Function Documentation

◆ addEntry()

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

Implements QQsbCollection.

Definition at line 143 of file qqsbcollection.cpp.

Referenced by QSSGShaderCache::compileForRhi().

+ Here is the caller graph for this function:

◆ availableEntries()

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

Implements QQsbCollection.

Definition at line 138 of file qqsbcollection.cpp.

Referenced by QSSGShaderCache::QSSGShaderCache().

+ Here is the caller graph for this function:

◆ clear()

void QQsbInMemoryCollection::clear ( )

Definition at line 163 of file qqsbcollection.cpp.

References QSet< T >::clear().

+ Here is the call graph for this function:

◆ extractEntry()

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

Implements QQsbCollection.

Definition at line 153 of file qqsbcollection.cpp.

References QSet< T >::constEnd(), QSet< T >::constFind(), and it.

Referenced by QSSGShaderCache::tryNewPipelineFromPersistentCache().

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

◆ load()

bool QQsbInMemoryCollection::load ( const QString & filename)

Definition at line 173 of file qqsbcollection.cpp.

References clear(), lock, lockFileName(), qPrintable, qWarning, QQsbCollection::readEndHeader(), QIODeviceBase::ReadOnly, and QDataStream::setVersion().

Referenced by QSSGShaderCache::QSSGShaderCache().

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

◆ save()

bool QQsbInMemoryCollection::save ( const QString & filename)

Definition at line 214 of file qqsbcollection.cpp.

References QSet< T >::cbegin(), QSet< T >::insert(), it, lock, lockFileName(), qPrintable, qWarning, QDataStream::setVersion(), QIODeviceBase::Truncate, QQsbCollection::writeEndHeader(), and QIODeviceBase::WriteOnly.

Referenced by QSSGShaderCache::~QSSGShaderCache().

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