//Copyright (c) 2016, jMonkeyEngine. All rights reserved. 
//Distributed under the BSD licence. 
//Read "rottShortcut/graphical/steer/license.txt".

package rottShortcut.graphical.steer;

import java.util.LinkedList;
import java.util.List;
import rottShortcut.data.stops.PathStep;

/**
 * @author Jesús Martín Berlanga
 */
public class SteerChangesInformer 
{
    private List<SteerChangesListener> listeners = 
            new LinkedList<SteerChangesListener>();
      
    public void registerListener(SteerChangesListener listener)
    {
        listeners.add(listener);
    }
    
    public void clearListeners()
    {
        listeners.clear();
    }
    
    protected void informPathStepPassedThrough(List<PathStep> steps)
    {
        for(SteerChangesListener listener : listeners)
            listener.onPathStepPassedThrough(steps);
    }    
}