C
QSafeBitmapFileReader Class
class SafeRenderer::QSafeBitmapFileReaderThe QSafeBitmapFileReader class reads the bitmap data from the file. More...
Header: | #include <QSafeBitmapFileReader> |
Since: | QtSafeRenderer 1.0 |
Inherits: | SafeRenderer::QSafeBitmapReader |
Public Functions
QSafeBitmapFileReader() | |
virtual | ~QSafeBitmapFileReader() |
Reimplemented Public Functions
virtual const SafeRenderer::QSafeBitmap * | getBitmapByID(const SafeRenderer::quint32 hash) const override |
virtual void | loadBitmap(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg) override |
Member Function Documentation
QSafeBitmapFileReader::QSafeBitmapFileReader()
Constructs the QSafeBitmapFileReader object.
[virtual]
QSafeBitmapFileReader::~QSafeBitmapFileReader()
Destroys the QSafeBitmapFileReader object.
[override virtual]
const SafeRenderer::QSafeBitmap *QSafeBitmapFileReader::getBitmapByID(const SafeRenderer::quint32 hash) const
Reimplements: QSafeBitmapReader::getBitmapByID(const SafeRenderer::quint32 hash) const.
Returns the pointer to the bitmap data that is identified by hash. The hash value is the hash value of the bitmap file name. Hash can be calculated with SafeRenderer::qsafe_hash function.
[override virtual]
void QSafeBitmapFileReader::loadBitmap(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg)
Reimplements: QSafeBitmapReader::loadBitmap(const SafeRenderer::QSafeFileInfo &fileInfo, const SafeRenderer::quint32 crcArg).
Loads the given in fileInfo. The checksum of the file needs to match with crcArg.
In case of a failure, one of the following exceptions will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeBitmapException | SafeRenderer::QSafeBitmapException::BitmapException::TooMany | The number of bitmaps exceeds the MAXIMUM value. |
SafeRenderer::QSafeBitmapException | SafeRenderer::QSafeBitmapException::BitmapException::DataCorrupted | The read data does not pass a checksum. |
SafeRenderer::QSafeBitmapException | SafeRenderer::QSafeBitmapException::BitmapException::SizeError | The bitmap data is shorter than SafeRenderer::Constraints::BITMAPDATA_HEADER_SIZE. |
SafeRenderer::QSafeFileException | SafeRenderer::QSafeFileException::FileException::FailureToOpen | The file could not be opened for reading. |
SafeRenderer::QSafeFileException | SafeRenderer::QSafeFileException::FileException::SeekError | Seek failed on the opened file. For example, a filesystem error occurred or the file was a pipe. |
SafeRenderer::QSafeFileException | SafeRenderer::QSafeFileException::FileException::ReadError | The requested number of bytes could not be read from the opened file. |
Available under certain Qt licenses.
Find out more.