QIviProxyServiceObject Class

QIviProxyServiceObject is a helper class to connect a Feature to already instantiated QIviServiceInterface classes. More...

Header: #include <QIviProxyServiceObject>
qmake: QT += ivicore
Inherits: QIviServiceObject

Public Functions

QIviProxyServiceObject(const QHash<QString, QIviFeatureInterface *> &interfaceMap)
QIviProxyServiceObject(QIviServiceInterface *interface)

Reimplemented Public Functions

virtual QIviFeatureInterface *interfaceInstance(const QString &interface) const override
virtual QStringList interfaces() const override

Detailed Description

In constrast to the QIviServiceObject which is created for you by the QIviServiceManager for every backend plugin, the QIviProxyServiceObject can be instantiated by the user and then manually set to the feature class.

There are two ways to construct a QIviProxyServiceObject. The first takes a QIviServiceInterface pointer as input and can be used to load a backend which is derived from QIviServiceInterface and supposed to be loaded as a plugin, but is part of the same library and can be loaded directly instead. e.g. within a autotest.

The second constructor takes a QHash<QString, QIviFeatureInterface*> and can be used to directly connect a feature class to the backend implementing the QIviFeatureInterface.

See also QIviAbstractFeature.

Member Function Documentation

QIviProxyServiceObject::QIviProxyServiceObject(const QHash<QString, QIviFeatureInterface *> &interfaceMap)

Creates a new QIviProxyServiceObject for the given interfaceMap.

This can be used to directly connect a feature class to the backend implementing the QIviFeatureInterface.

QIviProxyServiceObject::QIviProxyServiceObject(QIviServiceInterface *interface)

Creates a new QIviProxyServiceObject for the given interface.

This can be used to load a backend which is derived from QIviServiceInterface and supposed to be loaded as a plugin, but is part of the same library and can be loaded directly instead. e.g. within a autotest

[override virtual] QIviFeatureInterface *QIviProxyServiceObject::interfaceInstance(const QString &interface) const

Reimplements: QIviServiceInterface::interfaceInstance(const QString &interfaceName) const.

[override virtual] QStringList QIviProxyServiceObject::interfaces() const

Reimplements: QIviServiceInterface::interfaces() const.

© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.