package file;

/**
 * Class File is derived from Menu expansions in Section 2.10 of the
 * requirements, more specifically the commands on the File menu. In this
 * simple initial model, all of the generic editing functinality is modeled as
 * operations.
 */
abstract class File {

    /**
     * Open opens an existing test from a previously saved file.

       post:
       // The file selected must be in the Test Tool's file format.
       (file.type == TestTool.type)
     */
    abstract void open();

    /**
     * Close closes the currently active test, prompting the user to save it
     * first if changes has been made to it.
     */
    abstract void close();

    /**
     * CloseAll closes all currently open tests, prompting the user to save
     * each test that has changes in them.
     */
    abstract void closeAll();

    /**
     * Save saves any changes made to the currently active test.
     */
    abstract void save();

    /**
     * SaveAs saves any changes made to the currently active test, prompting
     * the user to chose what file to save the changes to.

        pre:
        //If the file name already exists, prompt the user that they
        //will replace the existing file
        if (exists(filename)
           prompt(replace_filename))
     */
    abstract void saveAs();

    /**
     * SaveAll saves all changes made to all currently open files.
     */
    abstract void saveAll();

    /**
     * Print prints out the currently active test to a printer of choice.
     */
    abstract void print();

    /**
     * ExportAs makes it possible for the user to export a test in a file
     * format of choice.
     */
    abstract void exportAs();

    /**
     * Exit exits the program, prompting the user to save any open files that
     * have changes made to them.
     */
    abstract void exit();

}