Nepomuk-Core
#include <Nepomuk2/Query/OptionalTerm>
Static Public Member Functions | |
static Term | optionalizeTerm (const Term &term) |
Static Public Member Functions inherited from Nepomuk2::Query::Term | |
static Term | fromString (const QString &s) |
static Term | fromVariant (const Variant &variant) |
Additional Inherited Members | |
Public Types inherited from Nepomuk2::Query::Term | |
enum | Type { Invalid, Literal, Resource, And, Or, Comparison, ResourceType, Negation, Optional } |
Related Functions inherited from Nepomuk2::Query::Term | |
static Term | fromProperty (const Types::Property &property, const Variant &variant) |
Detailed Description
Make a term optional.
OptionalTerm can be used to mark another term as optional. This is mostly useful with subterms of type ComparisonTerm (or an AndTerm combining ComparisonTerms) which either have additional bindings (ComparisonTerm::setVariableName()) or a specified sort weight (ComparisonTerm::setSortWeight()).
- Since
- 4.5
Definition at line 46 of file optionalterm.h.
Constructor & Destructor Documentation
Nepomuk2::Query::OptionalTerm::OptionalTerm | ( | ) |
Default constructor: creates an invalid optional term.
Definition at line 35 of file optionalterm.cpp.
Nepomuk2::Query::OptionalTerm::OptionalTerm | ( | const OptionalTerm & | term | ) |
Copy constructor.
Definition at line 41 of file optionalterm.cpp.
Nepomuk2::Query::OptionalTerm::~OptionalTerm | ( | ) |
Destructor.
Definition at line 47 of file optionalterm.cpp.
Member Function Documentation
Nepomuk2::Query::OptionalTerm & Nepomuk2::Query::OptionalTerm::operator= | ( | const OptionalTerm & | term | ) |
Assignment operator.
Definition at line 52 of file optionalterm.cpp.
|
static |
Mark term
as optional.
This method will encasulate term
in an OptionalTerm except if term
is already of type OptionalTerm.
- Returns
- The optional term.
Definition at line 59 of file optionalterm.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.