| 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 "CConceptProcessData.h" |
| 22 |
|
| 23 |
|
| 24 |
namespace Konclude { |
| 25 |
|
| 26 |
namespace Reasoner { |
| 27 |
|
| 28 |
namespace Ontology { |
| 29 |
|
| 30 |
CConceptProcessData::CConceptProcessData() { |
| 31 |
mConceptRoleBranchTrigger = nullptr; |
| 32 |
mReplacementData = nullptr; |
| 33 |
mRefLinking = nullptr; |
| 34 |
mUnsatCachingTags[0] = nullptr; |
| 35 |
mUnsatCachingTags[1] = nullptr; |
| 36 |
mInvalidatedRefLinking = false; |
| 37 |
mCoreConceptFlags[0] = false; |
| 38 |
mCoreConceptFlags[1] = false; |
| 39 |
mPropagationIntoCreationDirection = false; |
| 40 |
mInferRelevantFlag = false; |
| 41 |
mBranchingStatistics = nullptr; |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
CConceptProcessData* CConceptProcessData::initConceptProcessExtensionData(CConceptRoleBranchingTrigger* conceptRoleBranchTrigger, CReplacementData* replacementData) { |
| 46 |
mConceptRoleBranchTrigger = conceptRoleBranchTrigger; |
| 47 |
mReplacementData = replacementData; |
| 48 |
return this; |
| 49 |
} |
| 50 |
|
| 51 |
CConceptRoleBranchingTrigger* CConceptProcessData::getConceptRoleBranchTrigger() { |
| 52 |
return mConceptRoleBranchTrigger; |
| 53 |
} |
| 54 |
|
| 55 |
bool CConceptProcessData::hasConceptRoleBranchTrigger() { |
| 56 |
return mConceptRoleBranchTrigger != nullptr; |
| 57 |
} |
| 58 |
|
| 59 |
CConceptProcessData* CConceptProcessData::setConceptRoleBranchTrigger(CConceptRoleBranchingTrigger* conceptRoleBranchTrigger) { |
| 60 |
mConceptRoleBranchTrigger = conceptRoleBranchTrigger; |
| 61 |
return this; |
| 62 |
} |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
CUnsatisfiableCachingTags* CConceptProcessData::getUnsatisfiableCachingTags(bool conceptNegation) { |
| 68 |
return mUnsatCachingTags[conceptNegation]; |
| 69 |
} |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
CConceptProcessData* CConceptProcessData::setUnsatisfiableCachingTags(bool conceptNegation, CUnsatisfiableCachingTags* tags) { |
| 74 |
mUnsatCachingTags[conceptNegation] = tags; |
| 75 |
return this; |
| 76 |
} |
| 77 |
|
| 78 |
bool CConceptProcessData::hasUnsatisfiableCachingTags(bool conceptNegation) { |
| 79 |
return mUnsatCachingTags[conceptNegation] != nullptr; |
| 80 |
} |
| 81 |
|
| 82 |
|
| 83 |
CReplacementData* CConceptProcessData::getReplacementData() { |
| 84 |
return mReplacementData; |
| 85 |
} |
| 86 |
|
| 87 |
CConceptProcessData* CConceptProcessData::setReplacementData(CReplacementData* replacementData) { |
| 88 |
mReplacementData = replacementData; |
| 89 |
return this; |
| 90 |
} |
| 91 |
|
| 92 |
CConceptReferenceLinking* CConceptProcessData::getConceptReferenceLinking() { |
| 93 |
return mRefLinking; |
| 94 |
} |
| 95 |
|
| 96 |
CConceptProcessData* CConceptProcessData::setConceptReferenceLinking(CConceptReferenceLinking* refLinking) { |
| 97 |
mRefLinking = refLinking; |
| 98 |
return this; |
| 99 |
} |
| 100 |
|
| 101 |
bool CConceptProcessData::isInvalidatedReferenceLinking() { |
| 102 |
return mInvalidatedRefLinking; |
| 103 |
} |
| 104 |
|
| 105 |
CConceptProcessData* CConceptProcessData::setInvalidatedReferenceLinking(bool invalidatedReferenceLinking) { |
| 106 |
mInvalidatedRefLinking = invalidatedReferenceLinking; |
| 107 |
return this; |
| 108 |
} |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
bool CConceptProcessData::isCoreBlockingConcept(bool negated) { |
| 113 |
return mCoreConceptFlags[negated]; |
| 114 |
} |
| 115 |
|
| 116 |
CConceptProcessData* CConceptProcessData::setCoreBlockingConcept(bool negated, bool coreBlockingConcept) { |
| 117 |
mCoreConceptFlags[negated] = coreBlockingConcept; |
| 118 |
return this; |
| 119 |
} |
| 120 |
|
| 121 |
bool CConceptProcessData::hasPropagationIntoCreationDirection() { |
| 122 |
return mPropagationIntoCreationDirection; |
| 123 |
} |
| 124 |
|
| 125 |
CConceptProcessData* CConceptProcessData::setPropagationIntoCreationDirection(bool propagationIntoCreationDirection) { |
| 126 |
mPropagationIntoCreationDirection = propagationIntoCreationDirection; |
| 127 |
return this; |
| 128 |
} |
| 129 |
|
| 130 |
bool CConceptProcessData::hasInferRelevantFlag() { |
| 131 |
return mInferRelevantFlag; |
| 132 |
} |
| 133 |
|
| 134 |
CConceptProcessData* CConceptProcessData::setInferRelevantFlag(bool flag) { |
| 135 |
mInferRelevantFlag = flag; |
| 136 |
return this; |
| 137 |
} |
| 138 |
|
| 139 |
|
| 140 |
CBranchingStatistics* CConceptProcessData::getBranchingStatistics() { |
| 141 |
return mBranchingStatistics; |
| 142 |
} |
| 143 |
|
| 144 |
CConceptProcessData* CConceptProcessData::setBranchingStatistics(CBranchingStatistics* branchingStatistics) { |
| 145 |
mBranchingStatistics = branchingStatistics; |
| 146 |
return this; |
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
}; // end namespace Ontology |
| 151 |
|
| 152 |
}; // end namespace Reasoner |
| 153 |
|
| 154 |
}; // end namespace Konclude |