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) | |
QSafeEvent(const SafeRenderer::QSafeEvent::SafeMessageData &eventData) | |
QSafeEvent() | |
QSafeEvent(const SafeRenderer::QSafeEvent &other) | |
void | add(const SafeRenderer::quint32 valueArg, const size_t offsetArg = 0U) |
void | add(const SafeRenderer::qchar *const strArg, const SafeRenderer::quint32 sizeArg, const size_t offsetArg = 0U) |
SafeRenderer::EventId | getEventId() const |
const SafeRenderer::QSafeEvent::SafeMessageData & | rawData() const & |
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
[explicit]
QSafeEvent::QSafeEvent(const SafeRenderer::EventId eventType)
Constructs a QSafeEvent object.
By default eventType is set to undefined.
[explicit]
QSafeEvent::QSafeEvent(const SafeRenderer::QSafeEvent::SafeMessageData &eventData)
Constructs QSafeEvent and copies the type and event data from eventData, an array of length messageLength.
QSafeEvent::QSafeEvent()
Constructs a QSafeEvent object with undefined event id.
QSafeEvent::QSafeEvent(const SafeRenderer::QSafeEvent &other)
Constructs a copy of other. The event's type and data are copied.
void QSafeEvent::add(const SafeRenderer::quint32 valueArg, const size_t offsetArg = 0U)
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 size_t offsetArg = 0U)
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::EventId QSafeEvent::getEventId() const
Returns the type of the event.
const SafeRenderer::QSafeEvent::SafeMessageData &QSafeEvent::rawData() const &
Returns the pointer to the raw data.
Available under certain Qt licenses.
Find out more.