Debian Codegraph @

Source/Reasoner/Kernel/Cache/CSignatureSatisfiableExpanderCacheSlotItem.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_CSIGNATURESATISFIABLEEXPANDERCACHESLOTITEM_H
22 #define KONCLUDE_REASONER_KERNEL_CACHE_CSIGNATURESATISFIABLEEXPANDERCACHESLOTITEM_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "CacheSettings.h"
29 #include "CSignatureSatisfiableExpanderCacheRedirectionItem.h"
30 #include "CSignatureSatisfiableExpanderCacheHasher.h"
31 #include "CSignatureSatisfiableExpanderCacheEntry.h"
32
33
34 // Other includes
35 #include "Utilities/Memory/CMemoryPoolContainer.h"
36
37 #include "Utilities/Container/CLinker.h"
38
39 // Logger includes
40 #include "Logger/CLogger.h"
41
42
43 namespace Konclude {
44
45 using namespace Utilities::Memory;
46 using namespace Utilities::Container;
47
48 namespace Reasoner {
49
50 namespace Kernel {
51
52 namespace Cache {
53
54 /*!
55 *
56 * \class CSignatureSatisfiableExpanderCacheSlotItem
57 * \author Andreas Steigmiller
58 * \version 0.1
59 * \brief TODO
60 *
61 */
62 class CSignatureSatisfiableExpanderCacheSlotItem : public CMemoryPoolContainer, public CLinkerBase<CSignatureSatisfiableExpanderCacheSlotItem*,CSignatureSatisfiableExpanderCacheSlotItem> {
63 // public methods
64 public:
65 //! Constructor
66 CSignatureSatisfiableExpanderCacheSlotItem(CMemoryPool* memoryPool = nullptr);
67
68 bool incReader();
69 bool incReader(cint64 incCount);
70 bool decReader();
71
72
73 CSignatureSatisfiableExpanderCacheSlotItem* setSignatureItemHash(CCACHINGHASH<cint64,CSignatureSatisfiableExpanderCacheRedirectionItem*>* sigItemHash);
74 CSignatureSatisfiableExpanderCacheSlotItem* setHasherItemHash(CCACHINGHASH<CSignatureSatisfiableExpanderCacheHasher,CSignatureSatisfiableExpanderCacheRedirectionItem*>* hasherItemHash);
75
76 bool hasCacheReaders();
77
78
79 CCACHINGHASH<cint64,CSignatureSatisfiableExpanderCacheRedirectionItem*>* getSignatureItemHash();
80 CCACHINGHASH<CSignatureSatisfiableExpanderCacheHasher,CSignatureSatisfiableExpanderCacheRedirectionItem*>* getHasherItemHash();
81
82
83
84 // protected methods
85 protected:
86
87 // protected variables
88 protected:
89 CCACHINGHASH<cint64,CSignatureSatisfiableExpanderCacheRedirectionItem*>* mSigItemHash;
90 CCACHINGHASH<CSignatureSatisfiableExpanderCacheHasher,CSignatureSatisfiableExpanderCacheRedirectionItem*>* mHasherItemHash;
91
92 QAtomicInt mReaderSharingCount;
93 bool mReaderUsing;
94
95
96 // private methods
97 private:
98
99 // private variables
100 private:
101
102 };
103
104 }; // end namespace Cache
105
106 }; // end namespace Kernel
107
108 }; // end namespace Reasoner
109
110 }; // end namespace Konclude
111
112 #endif // KONCLUDE_REASONER_KERNEL_CACHE_CSIGNATURESATISFIABLEEXPANDERCACHESLOTITEM_H