C
QSafeStateFileReader Class
class SafeRenderer::QSafeStateFileReaderThe QSafeStateFileReader class loads the state definition from the file. More...
Header: | #include <QSafeStateFileReader> |
Since: | QtSafeRenderer 1.2 |
Inherits: | SafeRenderer::QSafeStateLoader |
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
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:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeStateException | SafeRenderer::QSafeStateException::SafeStateException::OutOfCache | The 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::QSafeStateException | SafeRenderer::QSafeStateException::SafeStateException::DataCorrupted | CRC value of the file does not match with \a crcArg. |
SafeRenderer::QSafeStateException | SafeRenderer::QSafeStateException::SafeStateException::InvalidData | The size of the data in the file is inconsistent. |
SafeRenderer::QSafeStateException | SafeRenderer::QSafeStateException::SafeStateException::UnsupportedAnimationType | The type of the animation is not supported. |
SafeRenderer::QSafeStateException | SafeRenderer::QSafeStateException::SafeStateException::IndexOutOfBounds | Amount of states is greater than Constraints::MAX_NUM_OF_STATES. |
SafeRenderer::QSafeAnimationException | SafeRenderer::QSafeAnimationException::AnimationsException::IndexOutOfBounds | Amount of transitions is greater than Constraints::MAX_NUM_OF_ANIMATIONS_PER_ITEM. |
Available under certain Qt licenses.
Find out more.