package vermilion;

import JSSPF.PluginClassBase;

/**
 * The abstract type which all plugins must extend.
 */
public abstract class PluginClassVermilion extends PluginClassBase
{
    /**
     * The constructor for a plugin should do nothing.
     */
    public PluginClassVermilion()
    {}

    /**
     * Allows a plugin to perform one-time initialisation tasks. For startup
     * plugins, this is where the interface is added to the main window.
     */
    public abstract void initialise();

    /**
     * Allows a plugin to clean up after we are finished with it. When we reload
     * the framework, plugins must deregister themselves and their GUIs.
     */
    public abstract void deinitialise();

    /**
     * Called so plugins may reinitialise after a new document has been loaded.
     */
    public abstract void documentLoaded();

    /**
     * Called so plugins may write data to the document before it is saved.
     */
    public abstract void documentSaving();

    /**
     * This allows plugins to send messages to each other via some hub that
     * keeps track of the recipients, e.g. Main.plugins.system.
     */
    public abstract void processMessage(String message, Object msgVal);
}