/// Evolver Copyright 2000, Morgan McGuire
/// matrix@alum.mit.edu   http://graphics3d.com/matrix
import java.awt.*;

/**
 * An operator.  Operators should not have any externally visible
 * state; they are shared between expressions and are dynamically
 * loaded.
 * <P>
 *
 * Operators that have slow intializations should perform
 * initialization on a separate thread so as to not block a loading
 * application.
 *
 * <P>
 * All subclasses must have a constructor that takes no arguments.  
 */
public interface ELOperator
{
  public static final int LARGE_NUMER_OF_ARGUMENTS = 100000;

  /**
   * Returns the maxiumum number of arguments this operator accepts.
   * Note: All operators that accept an argument accept an ELMatrix
   * argument.  
   */
  public int getMaxNumArguments();

  /**
   * Returns the minimum number of arguments this operator accepts.  
   */
  public int getMinNumArguments();

  /**
   * Returns true if the output is influenced by the environment.
   */
  public boolean hasExternalInfluences();

  /**
   * Applies this operator.
   */
  public void apply(ELMatrix argument[], ELMatrix out, ELEnvironment environment);

  /**
   * How this operator should appear in EL code.
   */
  public String unparse();
  
  /**
   * Name of this operator (usually the same as unparse()).
   */
  public String name();

  /**
   * An english language description of what this operator does.
   */
  public String description();

  /**
   * Draw an icon for this operator
   */
  public void paintIcon(Graphics2D graphics, int x, int y, int width, int height);
}






