Debian Codegraph @

Source/Parser/CParsingExpressionSplitter.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_GENERATOR_CPARSINGEXPRESSIONSPLITTER_H
22 #define KONCLUDE_REASONER_GENERATOR_CPARSINGEXPRESSIONSPLITTER_H
23
24
25 // Libraries includes
26 #include <QListIterator>
27 #include <QHash>
28 #include <QString>
29 #include <QObject>
30
31 // Namespace includes
32
33
34 // Other includes
35 #include "Parser/Expressions/CClassTermExpression.h"
36 #include "Parser/Expressions/CObjectPropertyTermExpression.h"
37 #include "Parser/Expressions/CIndividualTermExpression.h"
38 #include "Parser/Expressions/CObjectIndividualVariableExpression.h"
39 #include "Parser/Expressions/CDataPropertyTermExpression.h"
40 #include "Parser/Expressions/CDataRangeTermExpression.h"
41 #include "Parser/Expressions/CDataLiteralTermExpression.h"
42
43 // Logger includes
44 #include "Logger/CLogger.h"
45
46
47
48
49
50 namespace Konclude {
51
52 using namespace Utilities;
53 using namespace Parser::Expression;
54
55 namespace Parser {
56
57 /*!
58 *
59 * \class CParsingExpressionSplitter
60 * \author Andreas Steigmiller
61 * \version 0.1
62 * \brief TODO
63 *
64 */
65 class CParsingExpressionSplitter {
66 // public methods
67 public:
68 //! Constructor
69 CParsingExpressionSplitter(const CEXPRESSIONLIST<CBuildExpression*>& expressions);
70 CParsingExpressionSplitter(CEXPRESSIONLIST<CBuildExpression*>* expressions);
71 CParsingExpressionSplitter(CBuildExpression* expression1 = nullptr, CBuildExpression* expression2 = nullptr, CBuildExpression* expression3 = nullptr);
72 //! Destructor
73 virtual ~CParsingExpressionSplitter();
74
75 bool proofExpressionComposition(cint64 requiredClassExpressions, cint64 requiredObjectPropertyExpressions = 0, cint64 requiredIndividualExpressions = 0, cint64 requiredVariableExpressions = 0, cint64 requiredNotVariableExpressions = 0, cint64 dataRangeExpressions = 0, cint64 dataPropertyExpressions = 0);
76
77 CEXPRESSIONLIST<CClassTermExpression*>* getClassTermExpressionList();
78 CEXPRESSIONLIST<CObjectPropertyTermExpression*>* getObjectPropertyTermExpressionList();
79 CEXPRESSIONLIST<CIndividualTermExpression*>* getIndividualTermExpressionList();
80 CEXPRESSIONLIST<CDataPropertyTermExpression*>* getDataPropertyTermExpressionList();
81 CEXPRESSIONLIST<CDataRangeTermExpression*>* getDataRangeTermExpressionList();
82 CEXPRESSIONLIST<CDataLiteralTermExpression*>* getDataLiteralTermExpressionList();
83
84 CEXPRESSIONLIST<CObjectIndividualVariableExpression*>* getClassVariableTermExpressionList();
85 CEXPRESSIONLIST<CClassTermExpression*>* getClassNotVariableTermExpressionList();
86
87 CClassTermExpression* getFirstClassTermExpression();
88 CClassTermExpression* getFirstOptionalClassTermExpression();
89 CClassTermExpression* getSecondClassTermExpression();
90
91 CObjectPropertyTermExpression* getFirstObjectPropertyTermExpression();
92 CObjectPropertyTermExpression* getSecondObjectPropertyTermExpression();
93
94 CIndividualTermExpression* getFirstIndividualTermExpression();
95 CIndividualTermExpression* getSecondIndividualTermExpression();
96
97 CObjectIndividualVariableExpression* getFirstClassVariableTermExpression();
98 CObjectIndividualVariableExpression* getSecondClassVariableTermExpression();
99
100
101 CDataPropertyTermExpression* getFirstDataPropertyTermExpression();
102 CDataPropertyTermExpression* getSecondDataPropertyTermExpression();
103
104
105 CDataRangeTermExpression* getFirstDataRangeTermExpression();
106 CDataRangeTermExpression* getSecondDataRangeTermExpression();
107
108 CDataLiteralTermExpression* getFirstDataLiteralTermExpression();
109 CDataLiteralTermExpression* getSecondDataLiteralTermExpression();
110
111 // protected methods
112 protected:
113 bool splitExpressions();
114
115 // protected variables
116 protected:
117 CEXPRESSIONLIST<CBuildExpression*> mExpressionList;
118 CEXPRESSIONLIST<CClassTermExpression*> mClassList;
119 CEXPRESSIONLIST<CObjectPropertyTermExpression*> mObjectPropertyList;
120 CEXPRESSIONLIST<CIndividualTermExpression*> mIndiList;
121 CEXPRESSIONLIST<CDataPropertyTermExpression*> mDataPropertyList;
122 CEXPRESSIONLIST<CDataRangeTermExpression*> mDataRangeList;
123 CEXPRESSIONLIST<CDataLiteralTermExpression*> mDataLitList;
124
125 CEXPRESSIONLIST<CObjectIndividualVariableExpression*> mObjIndiVarList;
126 CEXPRESSIONLIST<CClassTermExpression*> mNotObjIndiVarList;
127 // private methods
128 private:
129
130 // private variables
131 private:
132
133 };
134
135 }; // end namespace Parser
136
137 }; // end namespace Konclude
138
139 #endif // end KONCLUDE_REASONER_GENERATOR_CPARSINGEXPRESSIONSPLITTER_H