Debian Codegraph @

Source/Reasoner/Kernel/Cache/CBackendRepresentativeMemoryCacheIndividualAssociationContext.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_CBACKENDREPRESENTATIVEMEMORYCACHEINDIVIDUALASSOCIATIONCONTEXT_H
22 #define KONCLUDE_REASONER_KERNEL_CACHE_CBACKENDREPRESENTATIVEMEMORYCACHEINDIVIDUALASSOCIATIONCONTEXT_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "CacheSettings.h"
29 #include "CBackendRepresentativeMemoryCacheBaseContext.h"
30 #include "CBackendRepresentativeMemoryCacheContext.h"
31 #include "CBackendRepresentativeMemoryCacheOntologyDataRecomputationReferenceLinker.h"
32
33
34 // Other includes
35 #include "Context/CContext.h"
36
37 #include "Utilities/Memory/CMemoryPoolProvider.h"
38 #include "Utilities/Memory/CMemoryPoolAllocationManager.h"
39 #include "Utilities/Memory/CNewAllocationMemoryPoolProvider.h"
40 #include "Utilities/Memory/CMemoryPoolContainerAllocationManager.h"
41
42 #include "Utilities/Container/CLinker.h"
43
44
45 // Logger includes
46 #include "Logger/CLogger.h"
47
48
49 namespace Konclude {
50
51 using namespace Context;
52 using namespace Utilities::Memory;
53 using namespace Utilities::Container;
54
55 namespace Reasoner {
56
57 namespace Kernel {
58
59 namespace Cache {
60
61 /*!
62 *
63 * \class CBackendRepresentativeMemoryCacheIndividualAssociationContext
64 * \author Andreas Steigmiller
65 * \version 0.1
66 * \brief TODO
67 *
68 */
69 class CBackendRepresentativeMemoryCacheIndividualAssociationContext : public CBackendRepresentativeMemoryCacheContext, public CLinkerBase<CBackendRepresentativeMemoryCacheIndividualAssociationContext*, CBackendRepresentativeMemoryCacheIndividualAssociationContext> {
70 // public methods
71 public:
72 //! Constructor
73 CBackendRepresentativeMemoryCacheIndividualAssociationContext(CBackendRepresentativeMemoryCacheContext* cacheContext);
74
75
76 virtual CMemoryAllocationManager* getMemoryAllocationManager();
77
78 virtual CMemoryPoolProvider* getMemoryPoolProvider();
79
80 CMemoryPoolContainer* getMemoryPoolContainer();
81
82
83 CBackendRepresentativeMemoryCacheOntologyDataRecomputationReferenceLinker* getLastRecomputationReferenceLinker();
84 CBackendRepresentativeMemoryCacheOntologyDataRecomputationReferenceLinker* getFirstRecomputationReferenceLinker();
85
86
87 CBackendRepresentativeMemoryCacheIndividualAssociationContext* setLastRecomputationReferenceLinker(CBackendRepresentativeMemoryCacheOntologyDataRecomputationReferenceLinker* recomputationReferenceLinker);
88 CBackendRepresentativeMemoryCacheIndividualAssociationContext* setFirstRecomputationReferenceLinker(CBackendRepresentativeMemoryCacheOntologyDataRecomputationReferenceLinker* recomputationReferenceLinker);
89
90
91 cint64 getIndividualAssociationDataUsageCount();
92 CBackendRepresentativeMemoryCacheIndividualAssociationContext* incIndividualAssociationDataUsageCount(cint64 count = 1);
93
94
95 cint64 getPreviousMemoryManagementCount();
96 CBackendRepresentativeMemoryCacheIndividualAssociationContext* setPreviousMemoryManagementCount(cint64 previousCount);
97
98 #ifdef KONCLUDE_CACHE_DEBUGGING_DATA_GENERATION
99 cint64 mIndiId;
100 #endif
101
102 // protected methods
103 protected:
104
105 // protected variables
106 protected:
107 CMemoryPoolContainerAllocationManager mMemMan;
108 CBackendRepresentativeMemoryCacheContext* mCacheContext;
109 CMemoryPoolProvider* mMemoryPoolProvider;
110
111 CMemoryPoolContainer mMemPoolContainer;
112
113 CBackendRepresentativeMemoryCacheOntologyDataRecomputationReferenceLinker* mFirstRecomputationReferenceLinker;
114 CBackendRepresentativeMemoryCacheOntologyDataRecomputationReferenceLinker* mLastRecomputationReferenceLinker;
115
116 cint64 mIndividualAssociationDataUsageCount;
117 cint64 mPreviousMemoryManagementCount;
118
119
120 // private methods
121 private:
122
123 // private variables
124 private:
125
126 };
127
128 }; // end namespace Cache
129
130 }; // end namespace Kernel
131
132 }; // end namespace Reasoner
133
134 }; // end namespace Konclude
135
136 #endif // KONCLUDE_REASONER_KERNEL_CACHE_CBACKENDREPRESENTATIVEMEMORYCACHEINDIVIDUALASSOCIATIONCONTEXT_H