//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 listeners = 
            new LinkedList();
      
    public void registerListener(SteerChangesListener listener)
    {
        listeners.add(listener);
    }
    
    public void clearListeners()
    {
        listeners.clear();
    }
    
    protected void informPathStepPassedThrough(List steps)
    {
        for(SteerChangesListener listener : listeners)
            listener.onPathStepPassedThrough(steps);
    }    
}