Plasma5Support::DataEngineConsumer

Search for usage in LXR

Plasma5Support::DataEngineConsumer Class Reference

#include <Plasma/DataEngineConsumer>

Inheritance diagram for Plasma5Support::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

◆ DataEngineConsumer()

Plasma5Support::DataEngineConsumer::DataEngineConsumer ( )

Constructs a DataEngineConsumer.

Definition at line 41 of file dataengineconsumer.cpp.

◆ ~DataEngineConsumer()

Plasma5Support::DataEngineConsumer::~DataEngineConsumer ( )

Definition at line 46 of file dataengineconsumer.cpp.

Member Function Documentation

◆ dataEngine()

DataEngine * Plasma5Support::DataEngineConsumer::dataEngine ( const QString & name)

Returns a Plasma5Support::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.

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

Definition at line 55 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-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.