C

QSafeStateResourceReader Class

class SafeRenderer::QSafeStateResourceReader

The QSafeStateResourceReader class loads the state definition from the resource data. More...

Header: #include <QSafeStateResourceReader>
Since: QtSafeRenderer 1.2
Inherits: SafeRenderer::QSafeStateLoader

This class was introduced in QtSafeRenderer 1.2.

Public Functions

Reimplemented Public Functions

virtual void loadFile(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg, SafeRenderer::QSafeStateTransition &statesArg) const override

Detailed Description

The QSafeStateResourceReader class loads the state definition from the resource data. The QSafeStateResourceReader is derived from the QSafeStateLoader class.

Member Function Documentation

QSafeStateResourceReader::QSafeStateResourceReader()

Constructs a QSafeStateResourceReader object.

[override virtual] void QSafeStateResourceReader::loadFile(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg, SafeRenderer::QSafeStateTransition &statesArg) const

Reimplements: QSafeStateLoader::loadFile(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crc, SafeRenderer::QSafeStateTransition &statesArg) const.

Loades states definitions from the resource data fileInfo to the statesArg. The value of the crcArg must match with the CRC of the file.

In case of a failure, one of the following exceptions will be thrown:

ConstantDescription
SafeRenderer::QSafeStateLoader::StateFileReaderException::OutOfCacheThe file exceeds the maximum size of the state file. The maximum file size is calculated based on the values defined in the qsafeconstraints.h. The maximum size of the file can be increased by changing the variables SafeRenderer::Constraints::MAX_NUM_OF_STATES and SafeRenderer::Constraints::MAX_NUM_OF_ANIMATIONS_PER_ITEM.
SafeRenderer::QSafeStateLoader::StateFileReaderException::DataCorruptedCRC value of the file does not match with crcArg or fileInfo is not defined in the resource.
SafeRenderer::QSafeStateLoader::StateFileReaderException::InvalidDataThe size of the data in the file is inconsistent.
SafeRenderer::QSafeStateLoader::StateFileReaderException::UnsupportedAnimationTypeThe type of the animation is not supported.
SafeRenderer::QSafeStates::IndexOutOfBoundsAmount of states is greater than Constraints::MAX_NUM_OF_STATES.
SafeRenderer::QSafeAnimations::IndexOutOfBoundsAmount of transitions is greater than Constraints::MAX_NUM_OF_ANIMATIONS_PER_ITEM.

Available under certain Qt licenses.
Find out more.