Debian Codegraph @

Source/Reasoner/Kernel/Algorithm/CReuseCompletionGraphCacheHandler.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_ALGORITHM_CREUSECOMPLETIONGRAPHCACHEHANDLER_H
22 #define KONCLUDE_REASONER_KERNEL_ALGORITHM_CREUSECOMPLETIONGRAPHCACHEHANDLER_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "AlgorithmSettings.h"
29 #include "CCalculationAlgorithmContext.h"
30
31 // Other includes
32 #include "Reasoner/Kernel/Process/CIndividualProcessNode.h"
33
34 #include "Reasoner/Kernel/Cache/CReuseCompletionGraphCacheReader.h"
35 #include "Reasoner/Kernel/Cache/CReuseCompletionGraphCacheWriter.h"
36 #include "Reasoner/Kernel/Cache/CReuseCompletionGraphCacheEntry.h"
37 #include "Reasoner/Kernel/Cache/CReuseCompletionGraphCacheEntryWriteData.h"
38 #include "Reasoner/Kernel/Cache/CReuseCompletionGraphCacheEntryExpandWriteData.h"
39
40 #include "Context/CContextBase.h"
41
42 // Logger includes
43 #include "Logger/CLogger.h"
44
45
46
47 namespace Konclude {
48
49 using namespace Context;
50
51 namespace Reasoner {
52
53 namespace Kernel {
54
55 using namespace Process;
56 using namespace Cache;
57
58 namespace Algorithm {
59
60 /*!
61 *
62 * \class CReuseCompletionGraphCacheHandler
63 * \author Andreas Steigmiller
64 * \version 0.1
65 * \brief TODO
66 *
67 */
68 class CReuseCompletionGraphCacheHandler {
69 // public methods
70 public:
71 //! Constructor
72 CReuseCompletionGraphCacheHandler(CReuseCompletionGraphCacheReader* reuseCompGraphCacheReader, CReuseCompletionGraphCacheWriter* reuseCompGraphCacheWriter);
73
74 //! Destructor
75 virtual ~CReuseCompletionGraphCacheHandler();
76
77 CReuseCompletionGraphCacheEntry* getReuseCompletionGraphEntry(CIndividualProcessNode* indiProcNode, bool* minimalCompletionGraph, bool* deterministicConnection, CCalculationAlgorithmContext* calcAlgContext);
78
79 bool commitCacheMessages(CCalculationAlgorithmContext* calcAlgContext);
80
81 // protected methods
82 protected:
83 bool prepareCacheMessages(CCalculationAlgorithmContext* calcAlgContext);
84 bool addCacheMessages(CReuseCompletionGraphCacheEntryWriteData* expandWriteData, CCalculationAlgorithmContext* calcAlgContext);
85
86 // protected variables
87 protected:
88 CReuseCompletionGraphCacheReader* mReuseCompGraphCacheReader;
89 CReuseCompletionGraphCacheWriter* mReuseCompGraphCacheWriter;
90
91
92 CReuseCompletionGraphCacheEntryWriteData* mWriteData;
93 CTaskMemoryPoolAllocationManager* mMemAllocMan;
94 CMemoryPoolContainer mMemPoolCon;
95 CContextBase* mTmpContext;
96
97
98 // private methods
99 private:
100
101 // private variables
102 private:
103
104 };
105
106 }; // end namespace Algorithm
107
108 }; // end namespace Kernel
109
110 }; // end namespace Reasoner
111
112 }; // end namespace Konclude
113
114 #endif // KONCLUDE_REASONER_KERNEL_ALGORITHM_CREUSECOMPLETIONGRAPHCACHEHANDLER_H