Debian Codegraph @

Source/Reasoner/Taxonomy/CAbstractHierarchyNode.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_CABSTRACTHIERARCHYNODE_H
22 #define KONCLUDE_REASONER_TAXONOMY_CABSTRACTHIERARCHYNODE_H
23
24 // Libraries includes
25 #include <QStringList>
26 #include <QList>
27
28 // Namespace includes
29 #include "TaxonomySettings.h"
30 #include "CHierarchyNodeData.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 #ifndef KONCLUDE_FORCE_ALL_DEBUG_DEACTIVATED
47
48 //#define DEBUGHIERARCHYNODEELEMENTSTRINGS
49
50 #endif
51
52 /*!
53 *
54 * \class CAbstractHierarchyNode
55 * \author Andreas Steigmiller
56 * \version 0.1
57 * \brief TODO
58 *
59 */
60 template<class T, class E>
61 class CAbstractHierarchyNode {
62 // public methods
63 public:
64 //! Constructor
65 CAbstractHierarchyNode(const E &representiveElement);
66
67 //! Destructor
68 ~CAbstractHierarchyNode();
69
70 T* addEquivalentElement(const E &element);
71
72 QList<E>* getEquivalentElementList();
73
74 E getOneEquivalentElement(const E &defaultValue);
75 E getOneEquivalentElement();
76 qint64 getEquivalentElementCount();
77
78 bool hasNodeData();
79 CHierarchyNodeData* getNodeData();
80 CHierarchyNodeData* setNodeData(CHierarchyNodeData* nodeData);
81
82 // protected methods
83 protected:
84 #ifdef DEBUGHIERARCHYNODEELEMENTSTRINGS
85 virtual void generateNodeElementStrings();
86 #endif
87
88 // protected variables
89 protected:
90 #ifdef DEBUGHIERARCHYNODEELEMENTSTRINGS
91 QStringList nodeStrings;
92 #endif
93
94 QList<E> eqElementList;
95 qint64 eqElemCount;
96
97 CHierarchyNodeData* mNodeData;
98
99
100 // private methods
101 private:
102
103 // private variables
104 private:
105
106 };
107
108 }; // end namespace Taxonomy
109
110 }; // end namespace Reasoner
111
112 }; // end namespace Konclude
113
114 #include "CAbstractHierarchyNode.cpp"
115
116 #endif // KONCLUDE_REASONER_TAXONOMY_CABSTRACTHIERARCHYNODE_H