Debian Codegraph @

Source/Reasoner/Kernel/Cache/CCacheValue.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_KERNEL_CACHE_CCACHEVALUE_H
22 #define KONCLUDE_REASONER_KERNEL_CACHE_CCACHEVALUE_H
23
24 // Libraries includes
25 #include <QHash>
26
27 // Namespace includes
28
29
30 // Other includes
31 #include "Utilities/CTrible.hpp"
32
33 // Logger includes
34 #include "Logger/CLogger.h"
35
36
37 namespace Konclude {
38
39 using namespace Utilities;
40
41 namespace Reasoner {
42
43 namespace Kernel {
44
45 namespace Cache {
46
47 /*!
48 *
49 * \class CCacheValue
50 * \author Andreas Steigmiller
51 * \version 0.1
52 * \brief TODO
53 *
54 */
55 class CCacheValue : public CTrible<qint64> {
56 // public methods
57 public:
58 enum CACHEVALUEIDENTIFIER {
59 CACHEVALCONCEPTONTOLOGYTAG = 0,
60 CACHEVALNEGATEDCONCEPTONTOLOGYTAG = 1,
61 CACHEVALROLEONTOLOGYTAG = 2,
62 CACHEVALUETERMINATOR = 3,
63 CACHEVALUENOTHING = 4,
64
65 CACHEVALTAGANDCONCEPT = 5,
66 CACHEVALTAGANDNEGATEDCONCEPT = 6,
67 CACHEVALTAGAND_NONDETERMINISTIC_CONCEPT = 7,
68 CACHEVALTAGAND_NONDETERMINISTIC_NEGATED_CONCEPT = 8,
69
70 CACHEVALTAGANDROLE = 9,
71 CACHEVALTAGANDINVERSEDROLE = 10,
72 CACHEVALTAGANDASSERTEDROLE = 11,
73 CACHEVALTAGANDINVERSEDASSERTEDROLE = 12,
74 CACHEVALTAGAND_NOMINAL_CONNECTED_ROLE = 13,
75 CACHEVALTAGANDINVERSED_NOMINAL_CONNECTED_ROLE = 14,
76
77 CACHEVALTAGAND_NONDETERMINISTIC_ROLE = 15,
78 CACHEVALTAGAND_NONDETERMINISTIC_INVERSEDROLE = 16,
79 CACHEVALTAGAND_NONDETERMINISTIC_ASSERTEDROLE = 17,
80 CACHEVALTAGAND_NONDETERMINISTIC_INVERSEDASSERTEDROLE = 18,
81 CACHEVALTAGAND_NONDETERMINISTIC_NOMINAL_CONNECTED_ROLE = 19,
82 CACHEVALTAGAND_NONDETERMINISTIC_INVERSED_NOMINAL_CONNECTED_ROLE = 20,
83
84 CACHE_VALUE_INDIVIDUAL_ID = 21,
85 CACHE_VALUE_NEGATED_INDIVIDUAL_ID = 22,
86 CACHE_VALUE_TAG_AND_ENTRY = 23,
87 CACHE_VALUE_TAG_AND_TEMPORARY_ENTRY = 24
88 };
89
90 //! Constructor
91 CCacheValue();
92 CCacheValue(const qint64 &first, const qint64 &second, const qint64 &third);
93 CCacheValue(const qint64 &tag, const qint64 &identification, const CACHEVALUEIDENTIFIER &cacheValueIdentifier = CACHEVALCONCEPTONTOLOGYTAG);
94
95 CCacheValue* initCacheValue(const qint64 &tag, const qint64 &identification, const CACHEVALUEIDENTIFIER &cacheValueIdentifier = CACHEVALCONCEPTONTOLOGYTAG);
96
97 bool isCachedConcept();
98 bool isCachedRole();
99 bool isCachedTerminator();
100 bool isCachedNothing();
101
102
103 qint64 getTag() const;
104 qint64 getIdentification() const;
105 CACHEVALUEIDENTIFIER getCacheValueIdentifier() const;
106
107
108 // protected methods
109 protected:
110
111 // protected variables
112 protected:
113
114 // private methods
115 private:
116
117 // private variables
118 private:
119
120 };
121
122 }; // end namespace Cache
123
124 }; // end namespace Kernel
125
126 }; // end namespace Reasoner
127
128 }; // end namespace Konclude
129
130 #endif // KONCLUDE_REASONER_KERNEL_CACHE_CCACHEVALUE_H