KActivities::Stats::ResultSet

Search for usage in LXR

KActivities::Stats::ResultSet Class Reference

#include <KActivities/Stats/ResultSet>

Classes

class  Result
 

Public Types

typedef Result value_type
 

Public Member Functions

 ResultSet (Query query)
 
 ResultSet (ResultSet &&source)
 
 ResultSet (const ResultSet &source)
 
Result at (int index) const
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator constBegin () const
 
const_iterator constEnd () const
 
const_iterator end () const
 
ResultSetoperator= (ResultSet source)
 

Detailed Description

Class that can query the KActivities usage tracking mechanism for resources.

Note: It is important to note that you should not create long-living instances of ResultSet. It might lock the database and break proper updating mechanisms. If you want a list of results that automatically get updated, use ResultModel.

ResultSet is meant to be used when you just need to fetch a few results like this:

auto results = ResultSet(AllResources | Agent("org.kde.kate"));
for (const auto &result: results) {
// ...
}

Definition at line 43 of file resultset.h.

Member Typedef Documentation

ResultSet is a container.

This notifies the generic algorithms from STLboost, and others of the contained type.

Definition at line 93 of file resultset.h.

Constructor & Destructor Documentation

KActivities::Stats::ResultSet::ResultSet ( Query  query)

Creates the ResultSet from the specified query.

Definition at line 530 of file resultset.cpp.

Member Function Documentation

ResultSet::Result KActivities::Stats::ResultSet::at ( int  index) const
Returns
a result at the specified index
Parameters
indexof the result
Note
You should use iterators instead

Definition at line 571 of file resultset.cpp.

iterator KActivities::Stats::ResultSet::begin ( ) const
Returns
a constant iterator pointing to the start of the collection (to the first item)
Note
as usual in C++, the range of the collection is [begin, end)

Definition at line 167 of file resultset_iterator.cpp.

const_iterator KActivities::Stats::ResultSet::cbegin ( ) const
inline

Alias for begin.

Definition at line 193 of file resultset.h.

const_iterator KActivities::Stats::ResultSet::cend ( ) const
inline

Alias for end.

Definition at line 200 of file resultset.h.

const_iterator KActivities::Stats::ResultSet::constBegin ( ) const
inline

Alias for begin.

Definition at line 208 of file resultset.h.

const_iterator KActivities::Stats::ResultSet::constEnd ( ) const
inline

Alias for end.

Definition at line 215 of file resultset.h.

iterator KActivities::Stats::ResultSet::end ( ) const
Returns
a constant iterator pointing to the end of the collection (after the last item)
Note
as usual in C++, the range of the collection is [begin, end)

Definition at line 172 of file resultset_iterator.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 Tue Apr 20 2021 22:46:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.