Search for usage in LXR

Plasma::DataEngineConsumer Class Reference

#include <Plasma/DataEngineConsumer>

Inheritance diagram for Plasma::DataEngineConsumer:

Public Member Functions

 DataEngineConsumer ()
DataEnginedataEngine (const QString &name)

Detailed Description

A class that makes it safe and easy to use DataEngines.

DataEngineConsumer provides access to DataEngines, which are internally reference counted and shared between all users of them. The only public method provided is dataEngine which returns engines upon request.

When the DataEngineConsumer class is deleted, all engines accessed using it are de-referenced and possibly deleted (in the case that there are no other users of the engine in question).

DataEngineConsumer can be subclassed by other C++ classes to allow this simple API to be used directly from these classes in a convenient manner.

Definition at line 35 of file dataengineconsumer.h.

Constructor & Destructor Documentation

Plasma::DataEngineConsumer::DataEngineConsumer ( )

Constructs a DataEngineConsumer.

Definition at line 60 of file dataengineconsumer.cpp.

Member Function Documentation

DataEngine * Plasma::DataEngineConsumer::dataEngine ( const QString name)

Returns a Plasma::DataEngine.

It never returns a null pointer, and the DataEngine returned should not be deleted. All DataEngines will be dereferenced once this DataEngineConsumer instance is deleted.

It is safe and fast to request the same engine more than once.

namethe name of the DataEngine. This corresponds to the plugin name of the DataEngine.

Definition at line 74 of file dataengineconsumer.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun May 16 2021 22:41:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.