Debian Codegraph @

Source/Test/CHashModificationThread.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_TEST_CHASHMODIFICATIONTHREAD_H
22 #define KONCLUDE_TEST_CHASHMODIFICATIONTHREAD_H
23
24 // Libraries includes
25 #include <QThread>
26
27
28 // Namespace includes
29
30
31 // Other includes
32 #include "Utilities/Container/CQtHash.h"
33 #include "Utilities/Container/CQtManagedRestrictedModificationHash.h"
34
35 #include "Utilities/Memory/CObjectAllocator.h"
36 #include "Utilities/Memory/CMemoryPoolAllocationManager.h"
37
38 #include "Utilities/UtilitiesSettings.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 using namespace Utilities;
51 using namespace Utilities::Container;
52 using namespace Utilities::Memory;
53
54 namespace Test {
55
56
57 /*!
58 *
59 * \class CHashModificationThread
60 * \author Andreas Steigmiller
61 * \version 0.1
62 * \brief TODO
63 *
64 */
65 class CHashModificationThread : public QThread {
66 // public methods
67 public:
68 //! Constructor
69 CHashModificationThread(CQtHash<cint64,cint64>** qtOriginalHashes, cint64 hashesCount, cint64 modificationCountPerStep, bool extendBaseHashes);
70 CHashModificationThread(CQtManagedRestrictedModificationHash<cint64,cint64>** qtModifiedHashes, cint64 hashesCount, CMemoryPoolProvider* memoryPoolProvider, cint64 modificationCountPerStep, bool extendBaseHashes);
71
72 //! Destructor
73 virtual ~CHashModificationThread();
74
75 virtual void startModifications();
76 virtual void stopModifications();
77
78 cint64 getModificationStepsCount();
79
80
81 // protected methods
82 protected:
83 virtual void run();
84
85 // protected variables
86 protected:
87 cint64 mModificationSteps;
88 CQtHash<cint64,cint64>** mQtOriginalHashes;
89 CQtManagedRestrictedModificationHash<cint64,cint64>** mQtModifiedHashes;
90 CMemoryPoolProvider* mMemoryPoolProvider;
91 bool mUseModifiedHashes;
92 cint64 mHashesCount;
93 CMemoryPoolAllocationManager* mMemoryPoolAllocationMan;
94 CContextBase* mContextBase;
95 bool mCanceled;
96 cint64 mHashModSize;
97 cint64 mModificationCountPerStep;
98 bool mExtendBaseHashes;
99
100 // private methods
101 private:
102
103 // private variables
104 private:
105
106 };
107
108 }; // end namespace Test
109
110 }; // end namespace Konclude
111
112 using namespace Konclude::Test;
113
114 #endif // KONCLUDE_TEST_CHASHMODIFICATIONTHREAD_H