// FILE. . . . . /home/hak/hlt/src/hlt/osfv2/base/OsfExpression.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Mon Sep 02 09:15:53 2013

/**
 * This is the mother class of all OSF expressions to be interpreted in
 * a given context of a sort ordering. It is instantiated by specific
 * classes corresponding to specific expressions.
 *
 * @version     Last modified on Tue Jan 21 08:05:54 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/">by the author</a>
 */

package hlt.osf.base;

import hlt.osf.exec.Context;
import hlt.osf.exec.Contextable;

/**
 * This is the class of OSF expressions.
 */
abstract public class OsfExpression implements Contextable
  {
    /**
     * This is evaluation context of the expression.
     */
    protected Context _context;

    /**
     * Return this expression evaluation context.
     */
    public Context context ()
    {
      return _context;
    }
 
    /**
     * Sets this expression evaluation context to the one specified.
     */
    public OsfExpression setContext (Context context)
    {
      _context = context;
      return this;
    }
    
    /**
     * Returns the string form of this OSF expression according the
     * display manager of its context.
     */
    public abstract String displayForm ();

  }
