Debian Codegraph @

Source/Reasoner/Query/CVariableBindingFilteringLiteralComparison.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef KONCLUDE_REASONER_QUERY_CVARIABLEBINDINGFILTERINGLITERALCOMPARISON_H
22 #define KONCLUDE_REASONER_QUERY_CVARIABLEBINDINGFILTERINGLITERALCOMPARISON_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "QuerySettings.h"
29 #include "CVariableBindingFiltering.h"
30 #include "CVariableBindingFilteringIndexArrayAnswerMapping.h"
31 #include "CVariableBindingsListAnswerResult.h"
32 #include "CVariableBindingStringDataResult.h"
33
34
35 // Other includes
36 #include "Parser/Expressions/CExpressionVariable.h"
37 #include "Parser/Expressions/CDataLiteralExpression.h"
38
39 #include "Reasoner/Ontology/CDataLiteral.h"
40 #include "Reasoner/Ontology/CDataLiteralCompareValue.h"
41
42 // Logger includes
43 #include "Logger/CLogger.h"
44
45
46 namespace Konclude {
47
48 using namespace Parser::Expression;
49
50 namespace Reasoner {
51
52 using namespace Ontology;
53
54 namespace Query {
55
56 /*!
57 *
58 * \class CVariableBindingFilteringLiteralComparison
59 * \author Andreas Steigmiller
60 * \version 0.1
61 * \brief TODO
62 *
63 */
64 class CVariableBindingFilteringLiteralComparison : public CVariableBindingFiltering {
65 // public methods
66 public:
67
68 enum COMPARING_TYPE { LESS, LESS_EQUAL, EQUAL, UNEQUAL, GREATER_EQUAL, GREATER };
69
70 //! Constructor
71 CVariableBindingFilteringLiteralComparison(COMPARING_TYPE filteringType, CExpressionVariable* variableExp, CDataLiteralExpression* dataLiteralExp);
72
73 COMPARING_TYPE getFilteringType();
74
75 CExpressionVariable* getVariableExpression();
76 CDataLiteralExpression* getDataLiteralExpression();
77
78 CDataLiteral* getDataLiteral();
79 CVariableBindingFilteringLiteralComparison* setDataLiteral(CDataLiteral* dataLiteral);
80
81
82 virtual CVariableBindingFilteringAnswerMapping* createFitleringAnswerMapping(QHash<CExpressionVariable*, cint64> varPosHash);
83 virtual bool isFiltered(CVariableBindingFilteringAnswerMapping* answeringMapping, CVariableBindingsAnswerResult* bindingsAnswer);
84
85
86 // protected methods
87 protected:
88
89 // protected variables
90 protected:
91 COMPARING_TYPE mComparingType;
92 CExpressionVariable* mVariableExp;
93 CDataLiteralExpression* mDataLiteralExp;
94 CDataLiteral* mDataLiteral;
95
96
97 // private methods
98 private:
99
100 // private variables
101 private:
102
103 };
104
105 }; // end namespace Query
106
107 }; // end namespace Reasoner
108
109 }; // end namespace Konclude
110
111 #endif // KONCLUDE_REASONER_QUERY_CVARIABLEBINDINGFILTERINGLITERALCOMPARISON_H