KFileMetaData

simpleextractionresult.h
1/*
2 SPDX-FileCopyrightText: 2014 Vishesh Handa <me@vhanda.in>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef KFILEMETADATA_SimpleExtractionResult_H
8#define KFILEMETADATA_SimpleExtractionResult_H
9
10#include "extractionresult.h"
11#include <QList>
12#include <QString>
13
14#include <memory>
15
16namespace KFileMetaData {
17
18class SimpleExtractionResultPrivate;
19
20/**
21 * \class SimpleExtractionResult simpleextractionresult.h <KFileMetaData/SimpleExtractionResult>
22 *
23 * A simple ExtractionResult implementation which stores
24 * all the data in memory.
25 *
26 * This should ideally not be used in production applications as
27 * it holds all of the plain text in memory, and that can get quite large
28 * when extracting certain documents.
29 */
30class KFILEMETADATA_EXPORT SimpleExtractionResult : public ExtractionResult
31{
32public:
33 SimpleExtractionResult(const QString& url, const QString& mimetype = QString(), const Flags& flags = Flags{ExtractPlainText | ExtractMetaData});
35 ~SimpleExtractionResult() override;
36
38 bool operator==(const SimpleExtractionResult& rhs) const;
39
40 void add(Property::Property property, const QVariant& value) override;
41 void addType(Type::Type type) override;
42 void append(const QString& text) override;
43
44 /**
45 * Returns the properties of the extraction result.
46 */
47 PropertyMultiMap properties() const;
48
49 QString text() const;
50 QList<Type::Type> types() const;
51
52private:
53 const std::unique_ptr<SimpleExtractionResultPrivate> d;
54};
55
56}
57
58#endif // KFILEMETADATA_SimpleExtractionResult_H
The ExtractionResult class is where all the data extracted by the indexer is saved.
A simple ExtractionResult implementation which stores all the data in memory.
Property
The Property enum contains all files property types that KFileMetaData manipulates.
Definition properties.h:26
Type
A Type represents a way to represent a way to group files based on a higher level view,...
Definition types.h:29
The KFileMetaData namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.