Debian Codegraph @

Source/Reasoner/Taxonomy/CParentChildPredecessorHierarchyNode.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_TAXONOMY_CPARENTCHILDPREDECESSORHIERARCHYNODE_H
22 #define KONCLUDE_REASONER_TAXONOMY_CPARENTCHILDPREDECESSORHIERARCHYNODE_H
23
24 // Libraries includes
25 #include <QStringList>
26
27 // Namespace includes
28 #include "TaxonomySettings.h"
29 #include "CHierarchyNodeData.h"
30 #include "CAbstractHierarchyNode.h"
31
32 // Other includes
33 #include "KoncludeSettings.h"
34
35
36 // Logger includes
37 #include "Logger/CLogger.h"
38
39
40 namespace Konclude {
41
42 namespace Reasoner {
43
44 namespace Taxonomy {
45
46
47 /*!
48 *
49 * \class CParentChildPredecessorHierarchyNode
50 * \author Andreas Steigmiller
51 * \version 0.1
52 * \brief TODO
53 *
54 */
55 template<class T, class E>
56 class CParentChildPredecessorHierarchyNode : public CAbstractHierarchyNode<T,E> {
57 // public methods
58 public:
59 //! Constructor
60 CParentChildPredecessorHierarchyNode(const E &representiveElement);
61
62 //! Destructor
63 ~CParentChildPredecessorHierarchyNode();
64
65 T* addParentNode(CParentChildPredecessorHierarchyNode* parentNode);
66 T* addChildNode(CParentChildPredecessorHierarchyNode* childNode);
67
68 T* makeParent(CParentChildPredecessorHierarchyNode* parentNode);
69 T* makeChild(CParentChildPredecessorHierarchyNode* childNode);
70
71 bool hasChildNode(CParentChildPredecessorHierarchyNode* node);
72 bool hasParentNode(CParentChildPredecessorHierarchyNode* node);
73
74 T* addPredecessorNode(CParentChildPredecessorHierarchyNode* preNode);
75 T* makePredecessor(CParentChildPredecessorHierarchyNode* parentNode);
76
77 bool hasPredecessorNode(CParentChildPredecessorHierarchyNode* node);
78
79 T* removeParent(CParentChildPredecessorHierarchyNode* parentNode);
80 T* removeChild(CParentChildPredecessorHierarchyNode* childNode);
81 T* removePredecessor(CParentChildPredecessorHierarchyNode* predNode);
82
83 QSet<T*>* getParentNodeSet();
84 QSet<T*>* getChildNodeSet();
85 QSet<T*>* getPredecessorNodeSet();
86
87 QList<T*> getParentNodeList();
88 QList<T*> getChildNodeList();
89 QList<T*> getPredecessorNodeList();
90
91
92 // protected methods
93 protected:
94 #ifdef DEBUGHIERARCHYNODEELEMENTSTRINGS
95 virtual void generateNodeRelationStrings();
96 #endif
97
98 // protected variables
99 protected:
100 #ifdef DEBUGHIERARCHYNODEELEMENTSTRINGS
101 QStringList parentNodeStrings;
102 QStringList childNodeStrings;
103 QStringList precNodeStrings;
104 #endif
105
106
107 QSet<CParentChildPredecessorHierarchyNode*> parentNodeSet;
108 QSet<CParentChildPredecessorHierarchyNode*> childNodeSet;
109 QSet<CParentChildPredecessorHierarchyNode*> predNodeSet;
110
111
112 // private methods
113 private:
114
115 // private variables
116 private:
117
118 };
119
120 }; // end namespace Taxonomy
121
122 }; // end namespace Reasoner
123
124 }; // end namespace Konclude
125
126 #include "CParentChildPredecessorHierarchyNode.cpp"
127
128 #endif // KONCLUDE_REASONER_TAXONOMY_CPARENTCHILDPREDECESSORHIERARCHYNODE_H