C
SafeRenderer::QSafeEvent Class
class SafeRenderer::QSafeEventThe QSafeEvent class provides a base class for the Qt Safe Renderer events. More...
Public Functions
QSafeEvent() | |
QSafeEvent(const SafeRenderer::EventId eventType) | |
QSafeEvent(const SafeRenderer::QSafeEvent::SafeMessageData &eventData) | |
QSafeEvent(const SafeRenderer::QSafeEvent &other) | |
QSafeEvent(SafeRenderer::QSafeEvent &&other) | |
virtual | ~QSafeEvent() |
void | add(const SafeRenderer::qint32 valueArg, const size_t offsetArg = 0U) |
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 & |
SafeRenderer::QSafeEvent & | operator=(SafeRenderer::QSafeEvent &&other) & |
SafeRenderer::QSafeEvent & | operator=(const SafeRenderer::QSafeEvent &other) & |
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
[noexcept]
QSafeEvent::QSafeEvent()
Constructs a QSafeEvent object with undefined event id.
[explicit noexcept]
QSafeEvent::QSafeEvent(const SafeRenderer::EventId eventType)
Constructs a QSafeEvent object.
By default eventType is set to undefined.
[explicit noexcept]
QSafeEvent::QSafeEvent(const SafeRenderer::QSafeEvent::SafeMessageData &eventData)
Constructs QSafeEvent and copies the type and event data from eventData, an array of length messageLength.
[noexcept]
QSafeEvent::QSafeEvent(const SafeRenderer::QSafeEvent &other)
Constructs a copy of other. The event's type and data are copied.
[noexcept]
QSafeEvent::QSafeEvent(SafeRenderer::QSafeEvent &&other)
Constructs QSafeEvent and moves the event data from other QSafeEvent to this newly constructed one.
[virtual constexpr noexcept]
QSafeEvent::~QSafeEvent()
Destructs the QSafeEvent instance.
void QSafeEvent::add(const SafeRenderer::qint32 valueArg, const size_t offsetArg = 0U)
Adds the qint32 value to the data container.
This is overloaded method. \see
void QSafeEvent::add(const quint32 valueArg, const size_t offsetArg)
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.
[noexcept]
SafeRenderer::QSafeEvent &QSafeEvent::operator=(SafeRenderer::QSafeEvent &&other) &
Moves the data from other QSafeEvent to this one. Returns reference to this QSafeEvent instance.
[noexcept]
SafeRenderer::QSafeEvent &QSafeEvent::operator=(const SafeRenderer::QSafeEvent &other) &
Copies the data from other QSafeEvent to this one. Returns reference to this QSafeEvent instance.
Available under certain Qt licenses.
Find out more.