
package polarDust.calculator;

/*
 * Copyright (c) 1996 Sorin Lazareanu, All Rights Reserved.
 *
 * Permission to use, copy, modify, and distribute this software
 * and its documentation for NON-COMMERCIAL purposes and without
 * fee is hereby granted provided that this copyright notice
 * appears in all copies.
 *
 */

/**
 * The interface CalcConstants represents constants defined
 * throughout polarDust.calculator package.<br>
 * To use these constants just add <pre>implements CalcConstants</pre> to the
 * class declaration.
 *
 * <br><br><a href=../source/polarDust/calculator/CalcConstants.java>
 * The source code.</a>
 *
 * @version 0.9, 1996.06.04
 * @author Sorin Lazareanu
 */

public interface CalcConstants {

	/** Helvetica typeface. */
	static final String HELVETICA = "Helvetica";

	/** Courier typeface. */
	static final String COURIER = "Courier";

	/** Unary type operation. */
	static final int UNARY = 1;

	/** Binary type operation. */
	static final int BINARY = 2;

	/** Result operation i.e. =, %, x^y etc. */
	static final int RESULT = 3;

	/** A null (nil) representation. */
	static final int NUL = -1;

	/** The string representation for NULL : "" */
	static final String STR_NUL = "";

	/** Digit zero. */
	static final int ZERO = 0;

	/** Digit zero as a string. */
	static final String STR_0 = "0";

	/** Value (hashCode) for key zero (0). */
	static final int CALC_KEY_0 = new Character('0').hashCode();

	/** Digit one. */
	static final int ONE = 1;

	/** Digit one as a string. */
	static final String STR_1 = "1";

	/** Value (hashCode) for key one (1). */
	static final int CALC_KEY_1 = new Character('1').hashCode();

	/** Digit two. */
	static final int TWO = 2;

	/** Digit two as a string. */
	static final String STR_2 = "2";

	/** Value (hashCode) for key two (2). */
	static final int CALC_KEY_2 = new Character('2').hashCode();

	/** Digit three. */
	static final int THREE = 3;

	/** Digit three as a string. */
	static final String STR_3 = "3";

	/** Value (hashCode) for key three (3). */
	static final int CALC_KEY_3 = new Character('3').hashCode();

	/** Digit four. */
	static final int FOUR = 4;

	/** Digit four as a string. */
	static final String STR_4 = "4";

	/** Value (hashCode) for key four (4). */
	static final int CALC_KEY_4 = new Character('4').hashCode();

	/** Digit five. */
	static final int FIVE = 5;

	/** Digit five as a string. */
	static final String STR_5 = "5";

	/** Value (hashCode) for key five (5). */
	static final int CALC_KEY_5 = new Character('5').hashCode();

	/** Digit six. */
	static final int SIX = 6;

	/** Digit six as a string. */
	static final String STR_6 = "6";

	/** Value (hashCode) for key six (6). */
	static final int CALC_KEY_6 = new Character('6').hashCode();

	/** Digit seven. */
	static final int SEVEN = 7;

	/** Digit seven as a string. */
	static final String STR_7 = "7";

	/** Value (hashCode) for key seven (7). */
	static final int CALC_KEY_7 = new Character('7').hashCode();

	/** Digit eight. */
	static final int EIGHT = 8;

	/** Digit eight as a string. */
	static final String STR_8 = "8";

	/** Value (hashCode) for key eight (8). */
	static final int CALC_KEY_8 = new Character('8').hashCode();

	/** Digit nine. */
	static final int NINE = 9;

	/** Digit nine as a string. */
	static final String STR_9 = "9";

	/** Value (hashCode) for key nine (9). */
	static final int CALC_KEY_9 = new Character('9').hashCode();

	/** Dot code. */
	static final int DOT = 10;

	/** Dot - string representation. */
	static final String STR_DOT = ".";

	/** Value (hashCode) for key dot (.). */
	static final int CALC_KEY_DOT = new Character('.').hashCode();

	/** Add code. */
	static final int ADD = 11;

	/** Add - string representation. */
	static final String STR_ADD = "+";

	static final int CALC_KEY_ADD = new Character('+').hashCode();

	/** Substract code. */
	static final int SUB = 12;

	/** Substract - string representation. */
	static final String STR_SUB = "-";

	static final int CALC_KEY_SUB = new Character('-').hashCode();

	/** Multiply by code. */
	static final int MUL = 13;

	/** Multiply by - string representation. */
	static final String STR_MUL = "*";

	static final int CALC_KEY_MUL = new Character('*').hashCode();

	/** Divided by code. */
	static final int DIV = 14;

	/** Divided by - string representation. */
	static final String STR_DIV = "/";

	static final int CALC_KEY_DIV = new Character('/').hashCode();

	/** Result (equal) code. */
	static final int EQU = 15;

	/** Result (equal) - string representation. */
	static final String STR_EQU = "=";

	static final int CALC_KEY_EQU = new Character('=').hashCode();

	/** Percentage code. */
	static final int PRC = 16;

	/** Percentage - string representation. */
	static final String STR_PRC = "%";

	static final int CALC_KEY_PRC = new Character('%').hashCode();

	/** Clear All (x=0, y=0, m=0, etc.) code. */
	static final int CLR = 17;

	/** Clear All - string representation. */
	static final String STR_CLR = "c";

	static final int CALC_KEY_CLR = new Character('c').hashCode();

	/** Clear Entry (x=0) code. */
	static final int CE = 18;

	/** Clear Entry - string representation. */
	static final String STR_CE = "ce";

	static final int CALC_KEY_CE = new Character('e').hashCode();

	/** Memory read (x=m) code. */
	static final int MR = 19;

	/** Memory Read - string representation. */
	static final String STR_MR = "mr";

	static final int CALC_KEY_MR = new Character('r').hashCode();

	/** Memory clear (m=0) code. */
	static final int MC = 20;

	/** Memory Clear - string representation. */
	static final String STR_MC = "mc";

	static final int CALC_KEY_MC = new Character('m').hashCode();

	/** Add to memory (m+=x) code. */
	static final int MADD = 21;

	/** Add to memory - string representation. */
	static final String STR_MADD = "m+";

	static final int CALC_KEY_MADD = new Character('a').hashCode();

	/** Substract from memory (m-=x) code. */
	static final int MSUB = 22;

	/** Substract from memory - string representation. */
	static final String STR_MSUB = "m-";

	static final int CALC_KEY_MSUB = new Character('s').hashCode();

	/** Swap registers (x->y, y->x) code. */
	static final int SWAP = 23;

	/** Swap registers - string representation. */
	static final String STR_SWAP = "x.y";

	/** At square (x*x) code. */
	static final int SQR = 24;

	/** At square - string representation. */
	static final String STR_SQR = "sqr";

	/** Square root code. */
	static final int SQRT = 25;

	/** Square root - string representation. */
	static final String STR_SQRT = "sqrt";

	/** Value of PI code. */
	static final int VPI = 26;

	/** Value PI - string representation. */
	static final String STR_VPI = "pi";

	/** Natural logarithm code. */
	static final int LN = 27;

	/** Natural logarithm - string representation. */
	static final String STR_LN = "ln";

	/** Decimal logarithm code. */
	static final int LOG = 28;

	/** Decimal logarithm - string representation. */
	static final String STR_LOG = "log";

	/** Exponential function (x=e^x) code. */
	static final int EXP = 29;

	/** Exponential function - string representation. */
	static final String STR_EXP = "exp";

	/** Sinus (x=sin(x)) code. */
	static final int SIN = 30;

	/** Sinus - string representation. */
	static final String STR_SIN = "sin";

	/** Arcsinus (x=arcsin(x)) code. */
	static final int ASIN = 31;

	/** Arcsinus - string representation. */
	static final String STR_ASIN = "asin";

	/** Cosinus (x=cos(x)) code. */
	static final int COS = 32;

	/** Cosinus - string representation. */
	static final String STR_COS = "cos";

	/** Arccosinus (x=arccos(x)) code. */
	static final int ACOS = 33;

	/** Arccosinus - string representation. */
	static final String STR_ACOS = "acos";

	/** Tangent (x=tan(x)) code. */
	static final int TAN = 34;

	/** Tangent - string representation. */
	static final String STR_TAN = "tan";

	/** Arctangent (x=arctan(x)) code. */
	static final int ATAN = 35;

	/** Arctangent - string representation. */
	static final String STR_ATAN = "atan";

	/** At power (x=x^y) code. */
	static final int POW = 36;

	/** At power - string representation. */
	static final String STR_POW = "^";

	/** Inverse (x=1/x) code. */
	static final int INV = 37;

	/** Inverse - string representation. */
	static final String STR_INV = "1/x";

	/** Change sign (x=-x) code. */
	static final int SGN = 38;

	/** Change sign - string representation. */
	static final String STR_SGN = "+/-";

	/** Value of e code. */
	static final int VE = 39;

	/** Value of e - string representation. */
	static final String STR_VE = "e";
}


