Debian Codegraph @

Source/Reasoner/Triples/CRedlandStoredTriplesIndividualResolvingHashMemoryManaged.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 #ifdef KONCLUDE_REDLAND_INTEGRATION
21
22 #ifndef KONCLUDE_REASONER_TRIPLES_CREDLANDSTOREDTRIPLESINDIVIDUALRESOLVINGHASHMEMORYMANAGED_H
23 #define KONCLUDE_REASONER_TRIPLES_CREDLANDSTOREDTRIPLESINDIVIDUALRESOLVINGHASHMEMORYMANAGED_H
24
25 // Libraries includes
26
27
28 // Namespace includes
29 #include "TriplesSettings.h"
30 #include "CRedlandNodeHasher.h"
31 #include "CRedlandStoredTriplesIndividualPreProcessMemoryManagingContext.h"
32
33
34 // Other includes
35 #include "Utilities/UtilitiesSettings.h"
36
37 #include "Context/CMemoryPoolNewAllocationIncreasingContext.h"
38 #include "Context/CMemoryPoolNewAllocationContext.h"
39
40 #include "Utilities/Memory/CMemoryPoolContainer.h"
41 #include "Utilities/Memory/CMemoryPoolContainerAllocationManager.h"
42 #include "Utilities/Memory/CNewAllocationMemoryPoolProvider.h"
43 #include "Utilities/Memory/CObjectAllocator.h"
44
45
46 #include "Utilities/Container/CQtManagedRestrictedModificationHash.h"
47
48 #include "Reasoner/Ontology/CIndividual.h"
49
50 #include "Reasoner/Preprocess/CDataLiteralNormalizerPreProcess.h"
51
52 // Logger includes
53 #include "Logger/CLogger.h"
54
55
56 namespace Konclude {
57
58 using namespace Utilities;
59 using namespace Utilities::Memory;
60 using namespace Utilities::Container;
61
62 namespace Reasoner {
63
64 using namespace Ontology;
65 using namespace Preprocess;
66
67 namespace Triples {
68
69
70 /*!
71 *
72 * \class COptimizedComplexVariableCompositionItemVariableExpressionBinding
73 * \author Andreas Steigmiller
74 * \version 0.1
75 * \brief TODO
76 *
77 */
78 class CRedlandStoredTriplesIndividualResolvingHashMemoryManaged : public CMemoryPoolNewAllocationIncreasingContext, public CQtManagedRestrictedModificationHash<CRedlandNodeHasher, CIndividual*> {
79 // public methods
80 public:
81 //! Constructor
82 CRedlandStoredTriplesIndividualResolvingHashMemoryManaged(CConcreteOntology* ontology, CConfiguration* configuration, const QString& anonymousOntologyIdentifier);
83
84 CIndividual*& getIndividual(librdf_node* node);
85 CIndividual*& getIndividual(const CRedlandNodeHasher& indiNode);
86 CRedlandStoredTriplesIndividualResolvingHashMemoryManaged* insertIndividual(const CRedlandNodeHasher& indiNode, CIndividual* indi);
87
88 CConceptAssertionLinker* createAssertionConceptLinker();
89 CRoleAssertionLinker* createAssertionRoleLinker();
90 CDataAssertionLinker* createAssertionDataLinker();
91 CReverseRoleAssertionLinker* createReverseAssertionRoleLinker();
92
93 CRedlandStoredTriplesIndividualPreProcessMemoryManagingContext* getIndividualDataMemoryManager();
94 CDataLiteralNormalizerPreProcess* getIndividualDataLiteralNormalizer();
95
96 CMemoryPool* takeIndividualDataMemoryPools();
97
98 cint64 getConceptAssertionCount();
99 cint64 getObjectPropertyAssertionCount();
100 cint64 getDataPropertyAssertionCount();
101
102
103 // protected methods
104 protected:
105
106 // protected variables
107 protected:
108 QString mAnonymousOntologyIdentifier;
109 CDataLiteralNormalizerPreProcess mIndiDataLiteralNormalizer;
110 CRedlandStoredTriplesIndividualPreProcessMemoryManagingContext mIndiDataMemAllocManager;
111 CPreProcessContext* mPreprocessContext;
112
113 cint64 mConceptAssertionCount = 0;
114 cint64 mObjectPropertyAssertionCount = 0;
115 cint64 mDataPropertyAssertionCount = 0;
116
117
118 // private methods
119 private:
120
121 // private variables
122 private:
123
124 };
125
126
127 }; // end namespace Triples
128
129 }; // end namespace Reasoner
130
131 }; // end namespace Konclude
132
133 #endif // KONCLUDE_REASONER_TRIPLES_CREDLANDSTOREDTRIPLESINDIVIDUALRESOLVINGHASHMEMORYMANAGED_H
134
135 #endif // !KONCLUDE_REDLAND_INTEGRATION