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) 2010 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_OPTIONAL_TERM_H_
23#define _NEPOMUK2_QUERY_OPTIONAL_TERM_H_
24
25#include "simpleterm.h"
26
27#include "nepomuk_export.h"
28
29namespace Nepomuk2 {
30 namespace Query {
31 /**
32 * \class OptionalTerm optionalterm.h Nepomuk2/Query/OptionalTerm
33 *
34 * \brief Make a term optional.
35 *
36 * %OptionalTerm can be used to mark another term as optional.
37 * This is mostly useful with subterms of type ComparisonTerm
38 * (or an AndTerm combining ComparisonTerms) which either have
39 * additional bindings (ComparisonTerm::setVariableName()) or
40 * a specified sort weight (ComparisonTerm::setSortWeight()).
41 *
42 * \author Sebastian Trueg <trueg@kde.org>
43 *
44 * \since 4.5
45 */
46 class NEPOMUK_EXPORT OptionalTerm : public SimpleTerm
47 {
48 public:
49 /**
50 * Default constructor: creates an invalid optional term.
51 */
52 OptionalTerm();
53
54 /**
55 * Copy constructor.
56 */
57 OptionalTerm( const OptionalTerm& term );
58
59 /**
60 * Destructor.
61 */
62 ~OptionalTerm();
63
64 /**
65 * Assignment operator.
66 */
67 OptionalTerm& operator=( const OptionalTerm& term );
68
69 /**
70 * Mark \p term as optional. This method will encasulate
71 * \p term in an OptionalTerm except if \p term is already
72 * of type OptionalTerm.
73 *
74 * \return The optional term.
75 */
76 static Term optionalizeTerm( 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.