C

QSafeEvent Class

class SafeRenderer::QSafeEvent

The QSafeEvent class provides a base class for the Qt Safe Renderer events. More...

This class was introduced in QtSafeRenderer 1.0.

Public Types

enum SafeEventException { OutOfBounds }

Public Functions

QSafeEvent(const SafeRenderer::quchar (&)[128] eventData = messageLength)
QSafeEvent(const SafeRenderer::QSafeEvent &other)
QSafeEvent(const SafeRenderer::EventId eventType = EventUndefined)
void add(const SafeRenderer::quint32 valueArg, const SafeRenderer::quint32 offsetArg)
void add(const SafeRenderer::qchar *const strArg, const SafeRenderer::quint32 sizeArg, const SafeRenderer::quint32 offsetArg)
SafeRenderer::quint32 get(const SafeRenderer::quint32 offsetArg) 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 Type Documentation

enum QSafeEvent::SafeEventException

This enum describes the exception for the QSafeEvent

ConstantValueDescription
SafeRenderer::QSafeEvent::OutOfBounds0The offset of the data goes out of the reserved memory area.

Member Function Documentation

QSafeEvent::QSafeEvent(const SafeRenderer::quchar (&)[128] eventData = messageLength)

Constructs QSafeEvent and copies the type and event data from eventData, an array of length messageLength.

QSafeEvent::QSafeEvent(const SafeRenderer::QSafeEvent &other)

Constructs a copy of other. The event's type and data are copied.

QSafeEvent::QSafeEvent(const SafeRenderer::EventId eventType = EventUndefined)

Constructs a QSafeEvent object.

By default eventType is set to undefined.

void QSafeEvent::add(const SafeRenderer::quint32 valueArg, const SafeRenderer::quint32 offsetArg)

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:

ConstantDescription
SafeRenderer::QSafeEventException::OutOfBoundsThe 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)

Copies the strArg to the data container with size sizeArg and offsetArg.

In case of a failure, the following exception will be thrown:

ConstantDescription
SafeRenderer::QSafeEvent::SafeEventException::OutOfBoundsThe offset of the data goes out of the reserved memory area.

SafeRenderer::quint32 QSafeEvent::get(const SafeRenderer::quint32 offsetArg) 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.