/**
 * Represents VT52 command set in terminal.
 * "Singleton" pattern [Gamma94].
 * "State" pattern [Gamma94].
 */
package com.jscape.inet.terminal;

import com.jscape.inet.terminal.commands.*;

public class VT52Set
        extends CommandSet {

    private static final String NAME = "VT52";
    private static final VT52Set INSTANCE = new VT52Set();

    //----------------------------------------------------------------------------

    /**
     * Returns one and only one instance of this type.
     *
     * @return one and only one instance of this type.
     */
    public static VT52Set getInstance() {
        return INSTANCE;
    }

    //----------------------------------------------------------------------------

    /**
     * Private constructor to prevent uncontrolled creation.
     */
    private VT52Set() {
        super(NAME);
        addCommand("\033A", CUUCommand.getInstance());
        addCommand("\033B", CUDCommand.getInstance());
        addCommand("\033C", CUFCommand.getInstance());
        addCommand("\033D", CUBCommand.getInstance());
        addCommand(DECIDCommand.CANONICAL_FORM, DECIDCommand.getInstance());
        addCommand(GMCommand.CANONICAL_FORM, GMCommand.getInstance());
        addCommand(AMCommand.CANONICAL_FORM, AMCommand.getInstance());
        addCommand(CUHCommand.CANONICAL_FORM, CUHCommand.getInstance());
        addCommand("\033I", RICommand.getInstance());
        addCommand(EESCommand.CANONICAL_FORM, EESCommand.getInstance());
        addCommand(EELCommand.CANONICAL_FORM, EELCommand.getInstance());
        addCommand(ANSICommand.CANONICAL_FORM, ANSICommand.getInstance());
    }

}