C

QSafeStateFileReader Class

class SafeRenderer::QSafeStateFileReader

The QSafeStateFileReader class loads the state definition from the file. More...

Header: #include <QSafeStateFileReader>
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 QSafeStateFileReader class loads the state definition from the file system. The QSafeStateFileReader is derived from the QSafeStateLoader class.

Member Function Documentation

QSafeStateFileReader::QSafeStateFileReader()

Constructs a QSafeStateFileReader object.

[override virtual] void QSafeStateFileReader::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.

Loads states definitions from the 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 qsafeconstr aints.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.
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.