// FILE. . . . . /home/hak/hlt/src/hlt/osfv2/util/ErrorLogger.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Mon Sep 02 15:38:42 2013

/**
 * This class offers basic error/warning logging.
 *
 * @version	Last modified on Tue Jan 21 08:08:34 2014 by hak
 * @author      <a href="mailto:hak@acm.org">Hassan A&iuml;t-Kaci</a>
 * @copyright	&copy; <a href="http://www.hassan-ait-kaci.net/">Hassan A&iuml;t-Kaci</a>
 */

package hlt.osf.util;

import hlt.language.util.Error;
import hlt.language.util.ArrayList;

public class ErrorLogger
{
  /**
   * This is a table for tallying errors to report.
   */
  private ArrayList _errorLog = new ArrayList();

  public ArrayList errorLog ()
  {
    return _errorLog;
  }

  public int size ()
  {
    return _errorLog.size();
  }

  public void recordError (Error error)
  {
    _errorLog.add(error);
  }

  public Error getError (int i)
  {
    return (Error)_errorLog.get(i);
  }

  public void clearErrors ()
  {
    _errorLog.clear();
  }

}