Commit 6daa3597 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Update for diss

parent b473db0c
......@@ -52,4 +52,6 @@ public interface VehiclePathTracker {
void disableTracking();
void setPrediction(boolean pPrediction);
}
......@@ -29,6 +29,15 @@ package de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork.pat
public final class VehiclePathTrackerFactory {
private static VehiclePathTracker VEHICLE_PATH_TRACKER;
private static boolean _prediction = true;
public static void setPrediction(boolean pPrediction) {
_prediction = pPrediction;
if (VEHICLE_PATH_TRACKER != null) {
VEHICLE_PATH_TRACKER.setPrediction(pPrediction);
}
}
public static VehiclePathTracker getVehiclePathTracker() {
if (VEHICLE_PATH_TRACKER == null) {
throw new AssertionError(
......@@ -42,5 +51,6 @@ public final class VehiclePathTrackerFactory {
throw new AssertionError("The class " + VehiclePathTracker.class + " has already been registered!");
}
VEHICLE_PATH_TRACKER = pTracker;
VEHICLE_PATH_TRACKER.setPrediction(_prediction);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment