Warning: That file was not part of the compilation database. It may have many parsing errors.

1/*
2 This file is part of the Nepomuk KDE project.
3 Copyright (C) 2009 Sebastian Trueg <trueg@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) version 3, or any
9 later version accepted by the membership of KDE e.V. (or its
10 successor approved by the membership of KDE e.V.), which shall
11 act as a proxy defined in Section 6 of version 3 of the license.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#ifndef _NEPOMUK2_QUERY_NEGATION_TERM_H_
23#define _NEPOMUK2_QUERY_NEGATION_TERM_H_
24
25#include "simpleterm.h"
26
27#include "nepomuk_export.h"
28
29namespace Nepomuk2 {
30 namespace Query {
31 /**
32 * \class NegationTerm negationterm.h Nepomuk2/Query/NegationTerm
33 *
34 * \brief Negate an arbitrary term.
35 *
36 * %NegationTerm can be used to negate any other term. A typical example
37 * could be to match all resources that do not have a specific tag:
38 *
39 * \code
40 * NegationTerm::negateTerm( ComparisonTerm( Vocabulary::NAO::hasTag(), LiteralTerm("nepomuk") ) );
41 * \endcode
42 *
43 * \author Sebastian Trueg <trueg@kde.org>
44 *
45 * \since 4.4
46 */
47 class NEPOMUK_EXPORT NegationTerm : public SimpleTerm
48 {
49 public:
50 /**
51 * Default constructor: creates an invalid negation term.
52 */
53 NegationTerm();
54
55 /**
56 * Copy constructor.
57 */
58 NegationTerm( const NegationTerm& term );
59
60 /**
61 * Destructor.
62 */
63 ~NegationTerm();
64
65 /**
66 * Assignment operator.
67 */
68 NegationTerm& operator=( const NegationTerm& term );
69
70 /**
71 * Negate \p term. This method will either strip the first NegationTerm
72 * from \p term or add one.
73 *
74 * \return The negated term.
75 */
76 static Term negateTerm( const Term& term );
77 };
78 }
79}
80
81#endif
82

Warning: That file was not part of the compilation database. It may have many parsing errors.