Debian Codegraph @

Source/Reasoner/Triples/CRedlandStoredTriplesIndexingBaseBatchLinkerVector.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_ANSWERER_CREDLANDSTOREDTRIPLESINDEXINGBASEBATCHLINKERVECTOR_H
22 #define KONCLUDE_REASONER_ANSWERER_CREDLANDSTOREDTRIPLESINDEXINGBASEBATCHLINKERVECTOR_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "TriplesSettings.h"
29 #include "CRedlandStoredTriplesIndexingBaseBatchLinkerVectorData.h"
30
31
32 // Other includes
33 #include "Reasoner/Ontology/CIndividual.h"
34
35 #include "Utilities/Memory/CMemoryPoolContainer.h"
36 #include "Utilities/Memory/CMemoryPoolContainerAllocationManager.h"
37 #include "Utilities/Memory/CNewAllocationMemoryPoolProvider.h"
38 #include "Utilities/Memory/CObjectAllocator.h"
39
40 #include "Utilities/UtilitiesSettings.h"
41
42 #include "Context/CMemoryPoolNewAllocationIncreasingContext.h"
43 #include "Context/CMemoryPoolNewAllocationContext.h"
44
45 // Logger includes
46 #include "Logger/CLogger.h"
47 #include "Logger/CLogIdentifier.h"
48
49
50
51
52
53 namespace Konclude {
54
55 using namespace Context;
56 using namespace Utilities;
57 using namespace Utilities::Memory;
58
59 namespace Reasoner {
60
61 using namespace Ontology;
62
63 namespace Triples {
64
65
66 /*!
67 *
68 * \class CRedlandStoredTriplesIndexingBaseBatchLinkerVector
69 * \author Andreas Steigmiller
70 * \version 0.1
71 * \brief TODO
72 *
73 */
74 template<class T>
75 class CRedlandStoredTriplesIndexingBaseBatchLinkerVector : public QVector<CRedlandStoredTriplesIndexingBaseBatchLinkerVectorData<T>*>, public CMemoryPoolNewAllocationIncreasingContext {
76 // public methods
77 public:
78 //! Constructor
79 CRedlandStoredTriplesIndexingBaseBatchLinkerVector(cint64 size);
80 CRedlandStoredTriplesIndexingBaseBatchLinkerVector();
81
82
83 CRedlandStoredTriplesIndexingBaseBatchLinkerVectorData<T>* getVectorLinkerData(cint64 index, bool createIfNotExists = true);
84
85
86 CRedlandStoredTriplesIndexingBaseBatchLinkerVector* addBatchLinker(cint64 index, T* linker);
87
88
89 T* createBatchLinker();
90
91 cint64 getNextIndex(bool moveNext = true);
92
93
94 CXLinker<CIndividual*>* getIndvidualCreationLinker() const;
95 CRedlandStoredTriplesIndexingBaseBatchLinkerVector* addCreationIndvidual(CIndividual* indi);
96
97
98 // protected methods
99 protected:
100
101 // protected variables
102 protected:
103 cint64 mNextIndex;
104 cint64 mSize;
105
106 CXLinker<CIndividual*>* mIndiCreationLinker;
107
108
109 // private methods
110 private:
111
112 // private variables
113 private:
114
115 };
116
117
118 }; // end namespace Triples
119
120 }; // end namespace Reasoner
121
122 }; // end namespace Konclude
123
124 #include "CRedlandStoredTriplesIndexingBaseBatchLinkerVector.cpp"
125
126 #endif // KONCLUDE_REASONER_ANSWERER_CREDLANDSTOREDTRIPLESINDEXINGBASEBATCHLINKERVECTOR_H