package ru.ifmo.testlib;

import java.io.*;

/**
 * The interface for a TestLib verifier version, such as IFMO CTD, Kitten Computing or EJUDGE.
 */
public interface ResultAdapter {
    /**
     * Applies the optional command-line arguments to the verifier.
     * @param args
     */
    public void initArgs(String[] args);

    /**
     * Returns the exit code for the specified quit type. It may differ from platform to platform.
     * @param outcome the quit type.
     * @return the exit code.
     */
    public int getExitCodeFor(Outcome outcome);

    /**
     * Prints an outcome message to the specified writer.
     * The behaviour may differ depending on whether console is used, so this is provided as a parameter.
     * @param outcome the outcome.
     * @param result the writer to print to.
     * @param console <tt>true</tt> if the writer prints on console, <tt>false</tt> if to file.
     */
    public void printMessage(Outcome outcome, PrintWriter result, boolean console);
}
