| 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 "CApproximatedSaturationCalculationJob.h" |
| 22 |
|
| 23 |
|
| 24 |
namespace Konclude { |
| 25 |
|
| 26 |
namespace Reasoner { |
| 27 |
|
| 28 |
namespace Query { |
| 29 |
|
| 30 |
|
| 31 |
CApproximatedSaturationCalculationJob::CApproximatedSaturationCalculationJob() { |
| 32 |
mQueryData = nullptr; |
| 33 |
mSatCalcConstructionConstructLinker = nullptr; |
| 34 |
mSatCalcProcessingConstructLinker = nullptr; |
| 35 |
mCalculationConfiguration = nullptr; |
| 36 |
mCalclulationStatisticsCollector = nullptr; |
| 37 |
mPreyingAdapter = nullptr; |
| 38 |
mContinueSaturationData = nullptr; |
| 39 |
mSeparateSaturation = false; |
| 40 |
mIndiAnalAdapter = nullptr; |
| 41 |
mOccurrenceStatisticsCollectingAdapter = nullptr; |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
CApproximatedSaturationCalculationJob::~CApproximatedSaturationCalculationJob() { |
| 46 |
delete mQueryData; |
| 47 |
CApproximatedSaturationCalculationConstructionConstruct* satCalcConstConstructLinkerIt = mSatCalcConstructionConstructLinker; |
| 48 |
while (satCalcConstConstructLinkerIt) { |
| 49 |
CApproximatedSaturationCalculationConstructionConstruct* tmpLinker = satCalcConstConstructLinkerIt; |
| 50 |
satCalcConstConstructLinkerIt = satCalcConstConstructLinkerIt->getNext(); |
| 51 |
delete tmpLinker; |
| 52 |
} |
| 53 |
CApproximatedSaturationCalculationProcessingConstruct* satCalcProcConstructLinkerIt = mSatCalcProcessingConstructLinker; |
| 54 |
while (satCalcProcConstructLinkerIt) { |
| 55 |
CApproximatedSaturationCalculationProcessingConstruct* tmpLinker = satCalcProcConstructLinkerIt; |
| 56 |
satCalcProcConstructLinkerIt = satCalcProcConstructLinkerIt->getNext(); |
| 57 |
delete tmpLinker; |
| 58 |
} |
| 59 |
} |
| 60 |
|
| 61 |
CCalculationJobQueryData* CApproximatedSaturationCalculationJob::getQueryData() { |
| 62 |
return mQueryData; |
| 63 |
} |
| 64 |
|
| 65 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setQueryData(CCalculationJobQueryData* takeQueryData) { |
| 66 |
delete mQueryData; |
| 67 |
mQueryData = takeQueryData; |
| 68 |
return this; |
| 69 |
} |
| 70 |
|
| 71 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::addSatisfiableCalculationConstructionConstruct(CApproximatedSaturationCalculationConstructionConstruct* takeSatCalcConstruct) { |
| 72 |
if (takeSatCalcConstruct) { |
| 73 |
mSatCalcConstructionConstructLinker = takeSatCalcConstruct->append(mSatCalcConstructionConstructLinker); |
| 74 |
} |
| 75 |
return this; |
| 76 |
} |
| 77 |
|
| 78 |
CApproximatedSaturationCalculationConstructionConstruct* CApproximatedSaturationCalculationJob::getSatisfiableCalculationConstructionConstructs() { |
| 79 |
return mSatCalcConstructionConstructLinker; |
| 80 |
} |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::addSatisfiableCalculationProcessingConstruct(CApproximatedSaturationCalculationProcessingConstruct* takeSatCalcConstruct) { |
| 85 |
if (takeSatCalcConstruct) { |
| 86 |
mSatCalcProcessingConstructLinker = takeSatCalcConstruct->append(mSatCalcProcessingConstructLinker); |
| 87 |
} |
| 88 |
return this; |
| 89 |
} |
| 90 |
|
| 91 |
CApproximatedSaturationCalculationProcessingConstruct* CApproximatedSaturationCalculationJob::getSatisfiableCalculationProcessingConstructs() { |
| 92 |
return mSatCalcProcessingConstructLinker; |
| 93 |
} |
| 94 |
|
| 95 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setCalculationConfiguration(CCalculationConfigurationExtension *calculationConfiguration) { |
| 96 |
mCalculationConfiguration = calculationConfiguration; |
| 97 |
return this; |
| 98 |
} |
| 99 |
|
| 100 |
CCalculationConfigurationExtension* CApproximatedSaturationCalculationJob::getCalculationConfiguration() { |
| 101 |
return mCalculationConfiguration; |
| 102 |
} |
| 103 |
|
| 104 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setCalclulationStatisticsCollector(CCalculationStatisticsCollector* calclulationStatisticsCollector) { |
| 105 |
mCalclulationStatisticsCollector = calclulationStatisticsCollector; |
| 106 |
return this; |
| 107 |
} |
| 108 |
|
| 109 |
CCalculationStatisticsCollector* CApproximatedSaturationCalculationJob::getCalclulationStatisticsCollector() { |
| 110 |
return mCalclulationStatisticsCollector; |
| 111 |
} |
| 112 |
|
| 113 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setSaturationTaskPreyingAdapter(CTaskPreyingAdapter* preyingAdapter) { |
| 114 |
mPreyingAdapter = preyingAdapter; |
| 115 |
return this; |
| 116 |
} |
| 117 |
|
| 118 |
CTaskPreyingAdapter* CApproximatedSaturationCalculationJob::getSaturationTaskPreyingAdapter() { |
| 119 |
return mPreyingAdapter; |
| 120 |
} |
| 121 |
|
| 122 |
|
| 123 |
CSaturationData* CApproximatedSaturationCalculationJob::getContinueSaturationData() { |
| 124 |
return mContinueSaturationData; |
| 125 |
} |
| 126 |
|
| 127 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setContinueSaturationData(CSaturationData* saturationData) { |
| 128 |
mContinueSaturationData = saturationData; |
| 129 |
return this; |
| 130 |
} |
| 131 |
|
| 132 |
bool CApproximatedSaturationCalculationJob::isSeparateSaturation() { |
| 133 |
return mSeparateSaturation; |
| 134 |
} |
| 135 |
|
| 136 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setSeparateSaturation(bool separateSaturation) { |
| 137 |
mSeparateSaturation = separateSaturation; |
| 138 |
return this; |
| 139 |
} |
| 140 |
|
| 141 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setSaturationIndividualsAnalysationObserver(CSaturationIndividualsAnalysingAdapter* indiAnalAdapter) { |
| 142 |
mIndiAnalAdapter = indiAnalAdapter; |
| 143 |
return this; |
| 144 |
} |
| 145 |
|
| 146 |
CSaturationIndividualsAnalysingAdapter* CApproximatedSaturationCalculationJob::getSaturationIndividualsAnalysationObserver() { |
| 147 |
return mIndiAnalAdapter; |
| 148 |
} |
| 149 |
|
| 150 |
|
| 151 |
CApproximatedSaturationCalculationJob* CApproximatedSaturationCalculationJob::setOccurrenceStatisticsCollectingAdapter(CSaturationOccurrenceStatisticsCollectingAdapter* collAdapter) { |
| 152 |
mOccurrenceStatisticsCollectingAdapter = collAdapter; |
| 153 |
return this; |
| 154 |
} |
| 155 |
|
| 156 |
CSaturationOccurrenceStatisticsCollectingAdapter* CApproximatedSaturationCalculationJob::getOccurrenceStatisticsCollectingAdapter() { |
| 157 |
return mOccurrenceStatisticsCollectingAdapter; |
| 158 |
} |
| 159 |
|
| 160 |
}; // end namespace Query |
| 161 |
|
| 162 |
}; // end namespace Reasoner |
| 163 |
|
| 164 |
}; // end namespace Konclude |