Debian Codegraph @

Source/Control/Interface/JNI/CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback.cpp

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 #include "CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback.h"
22
23
24 namespace Konclude {
25
26 namespace Control {
27
28 namespace Interface {
29
30 namespace JNI {
31
32 #ifdef KONCLUDE_COMPILE_JNI_INTERFACE
33
34 CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback::CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback(CJNIOntologyRevisionData* ontRevData, JNIEnv* jenv, jobject jvisitor, jmethodID jvisitObjectMethod, jmethodID jstartVisit, jmethodID jendVisit) {
35 mJenv = jenv;
36 mJVisitor = jvisitor;
37 mJVisitObjectMethod = jvisitObjectMethod;
38 mOntRevData = ontRevData;
39 mEntityMappingHash = ontRevData->getEntityMappingHash();
40 mJStartVisitingMethod = jstartVisit;
41 mJEndVisitingMethod = jendVisit;
42 }
43
44 CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback::~CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback() {
45 }
46
47
48
49 CEntityExpressionSetResultVisitingCallback* CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback::visitEntityExpression(CBuildExpression* entityExp, CConcreteOntology* ontology) {
50 jobject obj = mEntityMappingHash->getMappedObject(entityExp);
51 if (obj) {
52 mJenv->CallVoidMethod(mJVisitor,mJVisitObjectMethod,obj);
53 }
54 return this;
55 }
56
57
58
59 CSetOfEntityExpressionSetResultVisitingCallback* CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback::startEntityExpressionSet(CConcreteOntology* ontology) {
60 mJenv->CallVoidMethod(mJVisitor,mJStartVisitingMethod);
61 return this;
62 }
63
64 CSetOfEntityExpressionSetResultVisitingCallback* CJNIEntityExpressionMappedObjectSetOfSetVisitingCallback::endEntityExpressionSet(CConcreteOntology* ontology) {
65 mJenv->CallVoidMethod(mJVisitor,mJEndVisitingMethod);
66 return this;
67 }
68
69 #endif
70
71
72 }; // end namespace JNI
73
74 }; // end namespace Interface
75
76 }; // end namespace Control
77
78 }; // end namespace Konclude