001package jmri.jmrit.logixng;
002
003import java.io.PrintWriter;
004import java.util.*;
005
006/**
007 * Manager for initialization of LogixNG.
008 * This manager has a list of LogixNGs that will be executed before all other
009 * LogixNGs are executed.
010 * 
011 * @author Daniel Bergqvist   Copyright (C) 2021
012 */
013public interface LogixNG_InitializationManager {
014    
015    /**
016     * Adds a LogixNG to the end of list.
017     * @param logixNG the LogixNG
018     */
019    void add(LogixNG logixNG);
020    
021    /**
022     * Deletes a LogixNG from the list.
023     * @param logixNG the LogixNG
024     */
025    void delete(LogixNG logixNG);
026    
027    /**
028     * Deletes a LogixNG from the list.
029     * @param index the index of the LogixNG to delete
030     */
031    void delete(int index);
032    
033    /**
034     * Moves the LogixNG up (higher priority)
035     * @param index the index of the LogixNG to move up
036     */
037    void moveUp(int index);
038    
039    /**
040     * Moves the LogixNG down (lower priority)
041     * @param index the index of the LogixNG to move down
042     */
043    void moveDown(int index);
044    
045    /**
046     * Returns an unmodifiable list of the initialization LogixNGs
047     * @return the list
048     */
049    List<LogixNG> getList();
050    
051    /**
052     * Print the tree to a stream.
053     * 
054     * @param locale The locale to be used
055     * @param writer the stream to print the tree to
056     * @param indent the indentation of each level
057     */
058    public void printTree(Locale locale, PrintWriter writer, String indent);
059    
060}