C
QSafeStateLoader Class
class SafeRenderer::QSafeStateLoaderThe QSafeStateLoader class loads the state definition file. More...
Header: | #include <QSafeStateLoader> |
Since: | QtSafeRenderer 1.2 |
Inherited By: | SafeRenderer::QSafeStateFileReader and SafeRenderer::QSafeStateResourceReader |
Public Functions
QSafeStateLoader() | |
virtual | ~QSafeStateLoader() |
virtual void | loadFile(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crc, SafeRenderer::QSafeStateTransition &statesArg) const = 0 |
Static Public Members
void | loadStates(SafeRenderer::QSafeDataReader &fileStream, SafeRenderer::QSafeStateTransition &stateContainer) |
Detailed Description
The QSafeStateLoader class loads the state definition file. QSafeStateLoader is an abstract class. Derived classes must implement the QSafeStateLoader::loadFile method.
Member Function Documentation
QSafeStateLoader::QSafeStateLoader()
Constructs a QSafeStateLoader object.
[virtual]
QSafeStateLoader::~QSafeStateLoader()
Destructs a QSafeStateLoader object.
[pure virtual]
void 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 crc must match with the CRC of the file. This function must be implemented in the derived class.
[static]
void QSafeStateLoader::loadStates(SafeRenderer::QSafeDataReader &fileStream, SafeRenderer::QSafeStateTransition &stateContainer)
Loads states definitions from fileStream to the stateContainer.
In case of a failure, one of the following exceptions will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeStateException | SafeRenderer::QSafeStateException::SafeStateException::ByteArrayReaderException | The size of the data in the file is inconsistent. |
SafeRenderer::QSafeStateException | SafeRenderer::QSafeStateException::SafeStateException::InvalidData | The animation data contains unknown data types. |
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.