QIfServiceInterface Class

Defines the interface for services. More...

Header: #include <QIfServiceInterface>
qmake: QT += interfaceframework
Inherited By:

QIfServiceObject

Public Functions

virtual ~QIfServiceInterface()
virtual QIfFeatureInterface *interfaceInstance(const QString &interfaceName) const = 0
virtual QStringList interfaces() const = 0
T qif_interface_cast(QObject *backend)

Detailed Description

The QIfServiceInterface class defines the interface for services registered with QIfServiceManager.

Typically, service objects inherit the concrete class, QIfServiceObject, instead of using QIfServiceInterface directly.

See also QIfServiceObject.

Member Function Documentation

[virtual] QIfServiceInterface::~QIfServiceInterface()

Destructs the QIfServiceInterface instance.

[pure virtual] QIfFeatureInterface *QIfServiceInterface::interfaceInstance(const QString &interfaceName) const

Returns an object implementing the service interface requested through interfaceName.

[pure virtual] QStringList QIfServiceInterface::interfaces() const

Returns a list of service interface names supported by the service object instance.

Related Non-Members

template <typename T> T qif_interface_cast(QObject *backend)

Casts the given backend to the interface type T.

When implementing a QtInterfaceFramework Feature, use this function as it shows a meaningful error message when the cast fails.

See also qobject_cast.

© 2021 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.