C
QSafeEvent Class
class SafeRenderer::QSafeEventThe QSafeEvent class provides a base class for the Qt Safe Renderer events. More...
Public Functions
QSafeEvent(const SafeRenderer::EventId eventType = EventUndefined) | |
QSafeEvent(const SafeRenderer::QSafeEvent &other) | |
QSafeEvent(const SafeRenderer::quchar (&)[128] eventData = messageLength) | |
void | add(const SafeRenderer::quint32 valueArg, const SafeRenderer::quint32 offsetArg = 0) |
void | add(const SafeRenderer::qchar *const strArg, const SafeRenderer::quint32 sizeArg, const SafeRenderer::quint32 offsetArg = 0) |
SafeRenderer::quint32 | get(const SafeRenderer::quint32 offsetArg = 0) const |
SafeRenderer::EventId | getEventId() const |
const SafeRenderer::quchar * | rawData() const |
Static Public Members
const SafeRenderer::quint32 | messageLength |
Detailed Description
All the Qt Safe Renderer events are inherited from QSafeEvent. The QSafeEvent class packs the event parameters to the char
array.
Member Function Documentation
QSafeEvent::QSafeEvent(const SafeRenderer::EventId eventType = EventUndefined)
Constructs a QSafeEvent object.
By default eventType is set to undefined.
QSafeEvent::QSafeEvent(const SafeRenderer::QSafeEvent &other)
Constructs a copy of other. The event's type and data are copied.
QSafeEvent::QSafeEvent(const SafeRenderer::quchar (&)[128] eventData = messageLength)
Constructs QSafeEvent and copies the type and event data from eventData, an array of length messageLength.
void QSafeEvent::add(const SafeRenderer::quint32 valueArg, const SafeRenderer::quint32 offsetArg = 0)
Adds the quint32 value to the data container.
valueArg is a quint32 value. offsetArg is the position in the data structure.
The data is packed in bigEndian format to the char array. The maximum data length is 128 bytes.
In case of a failure, the following exception will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeEventException | SafeRenderer::QSafeEventException::SafeEventException::OutOfBounds | The offset of the data goes out of the reserved memory area. |
void QSafeEvent::add(const SafeRenderer::qchar *const strArg, const SafeRenderer::quint32 sizeArg, const SafeRenderer::quint32 offsetArg = 0)
Copies the strArg to the data container with size sizeArg and offsetArg.
In case of a failure, the following exception will be thrown:
Exception | Id | Description |
---|---|---|
SafeRenderer::QSafeEventException | SafeRenderer::QSafeEventException::SafeEventException::OutOfBounds | The offset of the data goes out of the reserved memory area. |
SafeRenderer::quint32 QSafeEvent::get(const SafeRenderer::quint32 offsetArg = 0) const
Reads the quint32 value from the data container.
offsetArg is the position in the data structure. The maximum offset value is 124.
SafeRenderer::EventId QSafeEvent::getEventId() const
Returns the type of the event.
const SafeRenderer::quchar *QSafeEvent::rawData() const
Returns the pointer to the raw data.
Member Variable Documentation
const SafeRenderer::quint32 QSafeEvent::messageLength
This variable holds the event parameter array.
Available under certain Qt licenses.
Find out more.