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 Exception { 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 offset)
void add(const SafeRenderer::qchar *const strArg, const SafeRenderer::quint32 sizeArg, const SafeRenderer::quint32 offset)
const SafeRenderer::quchar *data() const
SafeRenderer::quint32 get(const SafeRenderer::quint32 offset) const
SafeRenderer::EventId type() 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::Exception

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 offset)

Adds the quint32 value to the data container.

valueArg is a quint32 value. offset 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::QSafeEvent::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 offset)

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

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

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

const SafeRenderer::quchar *QSafeEvent::data() const

Returns the pointer to the raw data.

SafeRenderer::quint32 QSafeEvent::get(const SafeRenderer::quint32 offset) const

Reads the quint32 value from the data container.

offset is the position in the data structure. The maximum offset value is 124.

SafeRenderer::EventId QSafeEvent::type() const

Returns the type of the event.

Member Variable Documentation

const SafeRenderer::quint32 QSafeEvent::messageLength

Length of the event parameter array.

Available under certain Qt licenses.
Find out more.