Debian Codegraph @

Source/Reasoner/Ontology/CDataLiteralStringValue.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_ONTOLOGY_CDATALITERALSTRINGVALUE_H
22 #define KONCLUDE_REASONER_ONTOLOGY_CDATALITERALSTRINGVALUE_H
23
24 // Libraries includes
25 #include <QString>
26
27
28 // Namespace includes
29 #include "OntologySettings.h"
30 #include "CDataLiteralValue.h"
31 #include "CDataLiteralCompareValue.h"
32
33
34 // Other includes
35
36
37 // Logger includes
38 #include "Logger/CLogger.h"
39
40
41 namespace Konclude {
42
43 namespace Reasoner {
44
45 namespace Ontology {
46
47 /*!
48 *
49 * \class CDataLiteralStringValue
50 * \author Andreas Steigmiller
51 * \version 0.1
52 * \brief TODO
53 *
54 */
55 class CDataLiteralStringValue : public CDataLiteralCompareValue {
56 // public methods
57 public:
58 //! Constructor
59 CDataLiteralStringValue(CContext* context);
60
61
62 virtual CDataLiteralCompareValue* initValue(CDataLiteralCompareValue* value);
63 CDataLiteralStringValue* initValueFromInfiniteLength();
64 CDataLiteralStringValue* initValueFromLength(cuint64 length);
65 CDataLiteralStringValue* initValueFromString(const QString& string, const QString& langString);
66
67 CDataLiteralStringValue* initValue(CDataLiteralStringValue* value);
68
69 CDataLiteralStringValue* clearValue();
70
71
72 virtual DATA_LITERAL_VALUE_TYPE getDataValueType();
73
74 bool isInfiniteLength();
75 bool hasLanguageTag();
76 cuint64 getLength();
77
78 QString getStringValue();
79
80
81 bool isEqualTo(CDataLiteralValue* value);
82
83 bool isLessEqualThan(CDataLiteralCompareValue* value);
84 bool isLessThan(CDataLiteralCompareValue* value);
85 bool isEqualTo(CDataLiteralCompareValue* value);
86 bool isGreaterEqualThan(CDataLiteralCompareValue* value);
87 bool isGreaterThan(CDataLiteralCompareValue* value);
88
89 bool isLessEqualThan(CDataLiteralStringValue* value);
90 bool isLessThan(CDataLiteralStringValue* value);
91 bool isEqualTo(CDataLiteralStringValue* value);
92 bool isGreaterEqualThan(CDataLiteralStringValue* value);
93 bool isGreaterThan(CDataLiteralStringValue* value);
94
95 virtual QString getValueString();
96
97 // protected methods
98 protected:
99
100 QChar* createStringByteDataArrayCopy(QChar* stringByteDataArray, cint64 arrayLength);
101 QChar* createStringByteDataArray(const QString& string);
102
103
104 // protected variables
105 protected:
106 CContext* mContext;
107 bool mInfiniteLength;
108 cuint64 mLength;
109
110
111 QChar* mStringByteDataArray;
112 cint64 mStringByteDataArraySize;
113
114 QChar* mLanguageByteDataArray;
115 cint64 mLanguageByteDataArraySize;
116
117
118 // private methods
119 private:
120
121 // private variables
122 private:
123
124 };
125
126 }; // end namespace Ontology
127
128 }; // end namespace Reasoner
129
130 }; // end namespace Konclude
131
132 #endif // KONCLUDE_REASONER_ONTOLOGY_CDATALITERALSTRINGVALUE_H