QSafeLayoutResourceReader Class

class SafeRenderer::QSafeLayoutResourceReader

The QSafeLayoutResourceReader class reads the layout data from the Qt's resource structure. More...

Header: #include <QSafeLayoutResourceReader>
Since: QtSafeRenderer 1.0
Inherits: SafeRenderer::QSafeLayout

This class was introduced in QtSafeRenderer 1.0.

Public Functions

QSafeLayoutResourceReader(const SafeRenderer::qchar *const fileName)

Reimplemented Public Functions

virtual void readDataFromFile(const SafeRenderer::qchar *const fileName, SafeRenderer::LayoutDataBuffer &buffer) override

Detailed Description

Member Function Documentation

QSafeLayoutResourceReader::QSafeLayoutResourceReader(const SafeRenderer::qchar *const fileName)

Constructs a safe layout resource reader that reads the layout data from the fileName resource struct.

In case of a failure, an exception will be thrown:

SafeRenderer::QSafeBitmapFileReader::BitmapFileReaderException::TooManyThe number of bitmaps exceeds the MAXIMUM value.
SafeRenderer::QSafeLayout::LayoutException::DataSizeMismatchLayout file's size is more than buffer's size.
SafeRenderer::QSafeLayout::LayoutException::SizeErrorWidthThe width of the layout size too long.
SafeRenderer::QSafeLayout::LayoutException::SizeErrorHeightThe height of the layout size too long.
SafeRenderer::QSafeLayout::LayoutException::DataSizeMismatchThe layout file size is not multiple of the layout data size or layout data size is too small, or has too many layouts
SafeRenderer::QSafeLayout::LayoutException::InvalidLayoutVersionLayout version is not supported.
SafeRenderer::QSafeLayout::LayoutException::CheckSumFailedLayout checksum value does not match with the data checksum.
SafeRenderer::QSafeLayout::LayoutException::TooLongFilenameBitmap's filename was too long to fit in buffer.

[override virtual] void QSafeLayoutResourceReader::readDataFromFile(const SafeRenderer::qchar *const fileName, SafeRenderer::LayoutDataBuffer &buffer)

Reimplements: QSafeLayout::readDataFromFile(const SafeRenderer::qchar *const fileName, SafeRenderer::LayoutDataBuffer &buffer).

Read file with fileName to buffer.

This function was introduced in QtSafeRenderer 1.1.

Available under certain Qt licenses.
Find out more.