Debian Codegraph @

Source/Reasoner/Kernel/Process/CIndividualProcessingQueue.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_PROCESS_CINDIVIDUALPROCESSINGQUEUE_H
22 #define KONCLUDE_REASONER_KERNEL_PROCESS_CINDIVIDUALPROCESSINGQUEUE_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "ProcessSettings.h"
29 #include "CIndividualProcessNodeDescriptor.h"
30 #include "CIndividualProcessNode.h"
31 #include "CIndividualProcessNodePriority.h"
32
33
34 // Other includes
35
36
37 // Logger includes
38 #include "Logger/CLogger.h"
39
40
41
42 namespace Konclude {
43
44 namespace Reasoner {
45
46 namespace Kernel {
47
48 namespace Process {
49
50 /*!
51 *
52 * \class CIndividualProcessingQueue
53 * \author Andreas Steigmiller
54 * \version 0.1
55 * \brief TODO
56 *
57 */
58 class CIndividualProcessingQueue {
59 // public methods
60 public:
61 //! Constructor
62 CIndividualProcessingQueue(CProcessContext* processContext);
63
64 //! Destructor
65 virtual ~CIndividualProcessingQueue();
66
67 CIndividualProcessingQueue* initProcessingQueue(CIndividualProcessingQueue* processingQueue);
68
69
70 CIndividualProcessNodeDescriptor *takeNextProcessIndividualDescriptor();
71 CIndividualProcessNodeDescriptor *getNextProcessIndividualDescriptor();
72 CIndividualProcessingQueue *insertIndiviudalProcessDescriptor(CIndividualProcessNodeDescriptor *indiProDes);
73
74 bool hasHigherPriorityIndividual(CIndividualProcessNodePriority priority);
75 bool needsIndiviudalInsertion(CIndividualProcessNode *individual, CIndividualProcessNodePriority priority);
76 bool isEmpty();
77 bool hasIndividualProcessDescriptor();
78 bool isIndividualQueued(CIndividualProcessNode *individual);
79
80 CPROCESSMAP<CIndividualProcessNodePriority,CIndividualProcessNodeDescriptor*> mPriorityIndiDesMap;
81 CPROCESSHASH<cint64,CIndividualProcessNodePriority> mIndiDesPriorityHash;
82
83 // protected methods
84 protected:
85
86 // protected variables
87 protected:
88 CProcessContext* mProcessContext;
89
90 cint64 mIndiProDesCount;
91 bool mHasMaxIndiPriority;
92 CIndividualProcessNodePriority mMaxIndiPriority;
93 CIndividualProcessNode* mLastCheckIndi;
94 CIndividualProcessNodePriority mLastCheckIndiPriority;
95
96 // private methods
97 private:
98
99 // private variables
100 private:
101
102 };
103
104 }; // end namespace Process
105
106 }; // end namespace Kernel
107
108 }; // end namespace Reasoner
109
110 }; // end namespace Konclude
111
112 #endif // KONCLUDE_REASONER_KERNEL_PROCESS_CINDIVIDUALPROCESSINGQUEUE_H