/*-
 *  Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
 * 
 *  This file is part of CityDoctor2.
 *
 *  CityDoctor2 is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  CityDoctor2 is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with CityDoctor2.  If not, see <https://www.gnu.org/licenses/>.
 */
package de.hft.stuttgart.citydoctor2.check;

import de.hft.stuttgart.citydoctor2.check.error.AllPolygonsWrongOrientationError;
import de.hft.stuttgart.citydoctor2.check.error.ConsecutivePointSameError;
import de.hft.stuttgart.citydoctor2.check.error.DependenciesNotMetError;
import de.hft.stuttgart.citydoctor2.check.error.MultipleConnectedComponentsError;
import de.hft.stuttgart.citydoctor2.check.error.NestedRingError;
import de.hft.stuttgart.citydoctor2.check.error.NonManifoldEdgeError;
import de.hft.stuttgart.citydoctor2.check.error.NonManifoldVertexError;
import de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonDistancePlaneError;
import de.hft.stuttgart.citydoctor2.check.error.NonPlanarPolygonNormalsDeviation;
import de.hft.stuttgart.citydoctor2.check.error.NotCeilingError;
import de.hft.stuttgart.citydoctor2.check.error.NotFloorError;
import de.hft.stuttgart.citydoctor2.check.error.NotGroundError;
import de.hft.stuttgart.citydoctor2.check.error.NotWallError;
import de.hft.stuttgart.citydoctor2.check.error.NullAreaError;
import de.hft.stuttgart.citydoctor2.check.error.PointTouchesEdgeError;
import de.hft.stuttgart.citydoctor2.check.error.PolygonHoleOutsideError;
import de.hft.stuttgart.citydoctor2.check.error.PolygonInteriorDisconnectedError;
import de.hft.stuttgart.citydoctor2.check.error.PolygonIntersectingRingsError;
import de.hft.stuttgart.citydoctor2.check.error.PolygonSameOrientationError;
import de.hft.stuttgart.citydoctor2.check.error.PolygonWrongOrientationError;
import de.hft.stuttgart.citydoctor2.check.error.RingDuplicatePointError;
import de.hft.stuttgart.citydoctor2.check.error.RingEdgeIntersectionError;
import de.hft.stuttgart.citydoctor2.check.error.RingNotClosedError;
import de.hft.stuttgart.citydoctor2.check.error.RingTooFewPointsError;
import de.hft.stuttgart.citydoctor2.check.error.SchematronError;
import de.hft.stuttgart.citydoctor2.check.error.SolidNotClosedError;
import de.hft.stuttgart.citydoctor2.check.error.SolidSelfIntError;
import de.hft.stuttgart.citydoctor2.check.error.SurfaceUnfragmentedError;
import de.hft.stuttgart.citydoctor2.check.error.TinyEdgeError;
import de.hft.stuttgart.citydoctor2.check.error.TooFewPolygonsError;
import de.hft.stuttgart.citydoctor2.check.error.UnknownCheckError;

/**
 * Visitor pattern interface used in the healing procedures. The modification
 * listener is to report changed polygons and the returned boolean indicates
 * that changes have happened.
 * 
 * @author Matthias Betz
 *
 */
public interface HealingMethod {

	default boolean visit(CheckError e, ModificationListener l) {
		return false;
	}
	
	default boolean visit(TinyEdgeError e, ModificationListener l) {
		return false;
	}

	default boolean visit(RingEdgeIntersectionError edgeIntersectionError, ModificationListener l) {
		return false;
	}

	default boolean visit(RingDuplicatePointError duplicatePointError, ModificationListener l) {
		return false;
	}

	default boolean visit(AllPolygonsWrongOrientationError err, ModificationListener l) {
		return false;
	}

	default boolean visit(DependenciesNotMetError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NonPlanarPolygonDistancePlaneError err, ModificationListener l) {
		return false;
	}

	default boolean visit(ConsecutivePointSameError err, ModificationListener l) {
		return false;
	}

	default boolean visit(PolygonHoleOutsideError err, ModificationListener l) {
		return false;
	}

	default boolean visit(PolygonInteriorDisconnectedError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NonManifoldEdgeError err, ModificationListener l) {
		return false;
	}

	default boolean visit(MultipleConnectedComponentsError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NestedRingError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NonManifoldVertexError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NonPlanarPolygonNormalsDeviation err, ModificationListener l) {
		return false;
	}

	default boolean visit(NullAreaError err, ModificationListener l) {
		return false;
	}

	default boolean visit(PolygonIntersectingRingsError err, ModificationListener l) {
		return false;
	}

	default boolean visit(PolygonWrongOrientationError err, ModificationListener l) {
		return false;
	}

	default boolean visit(RingNotClosedError err, ModificationListener l) {
		return false;
	}

	default boolean visit(PolygonSameOrientationError err, ModificationListener l) {
		return false;
	}

	default boolean visit(SolidNotClosedError err, ModificationListener l) {
		return false;
	}

	default boolean visit(SolidSelfIntError err, ModificationListener l) {
		return false;
	}

	default boolean visit(RingTooFewPointsError err, ModificationListener l) {
		return false;
	}

	default boolean visit(TooFewPolygonsError err, ModificationListener l) {
		return false;
	}

	default boolean visit(UnknownCheckError err, ModificationListener l) {
		return false;
	}

	default boolean visit(PointTouchesEdgeError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NotCeilingError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NotFloorError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NotWallError err, ModificationListener l) {
		return false;
	}

	default boolean visit(NotGroundError err, ModificationListener l) {
		return false;
	}
	
	default boolean visit(SchematronError err, ModificationListener l) {
		return false;
	}
	
	default boolean visit(SurfaceUnfragmentedError err, ModificationListener l) {
		return false;
	}

	public HealingMethod createNew();

}
