Debian Codegraph @

Source/Reasoner/Ontology/CRBox.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_ONTOLOGY_CRBOX_H
22 #define KONCLUDE_REASONER_ONTOLOGY_CRBOX_H
23
24 // Libraries includes
25
26
27 // Namespace includes
28 #include "OntologySettings.h"
29 #include "CRole.h"
30 #include "CRoleChain.h"
31 #include "CBoxContext.h"
32 #include "CConcreteOntologyContextBase.h"
33 #include "CRoleVector.h"
34 #include "CDataBox.h"
35 #include "CRoleChainVector.h"
36
37
38 // Other includes
39 #include "Utilities/CSortedNegLinker.hpp"
40
41
42 // Logger includes
43 #include "Logger/CLogger.h"
44
45
46
47 namespace Konclude {
48
49 using namespace Utilities;
50
51 namespace Reasoner {
52
53 namespace Ontology {
54
55 /*!
56 *
57 * \class CRBox
58 * \author Andreas Steigmiller
59 * \version 0.1
60 * \brief TODO
61 *
62 */
63 class CRBox : public CDataBox {
64 // public methods
65 public:
66 //! Constructor
67 CRBox(CBoxContext* boxContext = nullptr);
68
69 //! Destructor
70 virtual ~CRBox();
71
72
73 CRBox *setRoleVector(CRoleVector* roleVec);
74 CRoleVector* getRoleVector(bool create = true);
75
76 CRBox *setRoleChainVector(CRoleChainVector* roleChainVec);
77 CRoleChainVector* getRoleChainVector(bool create = true);
78
79 qint64 getRoleCount();
80 qint64 getRoleChainCount();
81
82 virtual CRBox *referenceRBox(CRBox *rBox);
83 virtual CRBox *getRBoxReferenceCopy(CBoxContext *boxContext);
84
85 virtual CBoxContext *getBoxContext(bool create = true);
86
87
88 CRole* getTopObjectRole();
89 CRBox* setTopObjectRole(CRole* role);
90
91 CRole* getBottomObjectRole();
92 CRBox* setBottomObjectRole(CRole* role);
93
94 cint64 getTopObjectRoleIndex();
95 cint64 getBottomObjectRoleIndex();
96
97
98
99 CRole* getTopDataRole();
100 CRBox* setTopDataRole(CRole* role);
101
102 CRole* getBottomDataRole();
103 CRBox* setBottomDataRole(CRole* role);
104
105 cint64 getTopDataRoleIndex();
106 cint64 getBottomDataRoleIndex();
107
108 CBOXSET<CRole*>* getActivePropertyRoleSet(bool create = true);
109 CRBox* setActivePropertyRoleSet(CBOXSET<CRole*>* takeActiveRoleSet);
110
111
112 // protected methods
113 protected:
114
115 // protected variables
116 protected:
117 CRoleVector* roles;
118 CRoleChainVector* mRoleChainVec;
119
120 CBoxContext* mBoxContext;
121 CBoxContext* mDeleteBoxContext;
122 CMemoryAllocationManager* mMemMan;
123
124 cint64 mTopObjectRoleTag;
125 cint64 mBottomObjectRoleTag;
126
127 cint64 mTopDataRoleTag;
128 cint64 mBottomDataRoleTag;
129
130 CBOXSET<CRole*>* mActiveRoleSet;
131
132 // private methods
133 private:
134
135 // private variables
136 private:
137
138 };
139
140 }; // end namespace Ontology
141
142 }; // end namespace Reasoner
143
144 }; // end namespace Konclude
145
146 #endif // KONCLUDE_REASONER_ONTOLOGY_CRBOX_H