[BACK]Return to SM.java CVS log [TXT][DIR] Up to [local] / OpenXM / src / OpenMath / ORG / openxm / tam

Annotation of OpenXM/src/OpenMath/ORG/openxm/tam/SM.java, Revision 1.2

1.1       tam         1: /*
1.2     ! tam         2:  * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/SM.java,v 1.1 2000/09/09 11:54:08 tam Exp $
1.1       tam         3:  */
                      4: package ORG.openxm.tam;
                      5:
                      6: /**
                      7:  * OpenXM $B%a%C%;!<%8$N%*%V%8%'%/%H(B Stack Machine $B%3%^%s%I$rI=$7$^$9(B.
                      8:  */
                      9: final public class SM extends OXbody{
                     10:   private int SMcode;
                     11:
                     12:   // SMobject/Basic 0 or 1
                     13:   final public static int SM_popSerializedLocalObject   = 258;
                     14:   final public static int SM_popCMO                     = 262;
                     15:   final public static int SM_popString                  = 263;
                     16:
                     17:   final public static int SM_mathcap                    = 264;
                     18:   final public static int SM_pops                       = 265;
                     19:   final public static int SM_setName                    = 266;
                     20:   final public static int SM_evalName                   = 267;
                     21:   final public static int SM_executeStringByLocalParser = 268;
                     22:   final public static int SM_executeFunction            = 269;
                     23:   final public static int SM_beginBlock                 = 270;
                     24:   final public static int SM_endBlock                   = 271;
                     25:   final public static int SM_shutdown                   = 272;
                     26:   final public static int SM_setMathCap                 = 273;
                     27:   final public static int SM_executeStringByLocalParserInBatchMode = 274;
                     28:
                     29:   final public static int SM_control_kill               = 1024;
                     30:   final public static int SM_control_reset_connection   = 1030;
                     31:
                     32:   final public static int SM_PRIVATE                    = 0x7fff0000;
                     33:
                     34:   public SM(int code){
                     35:     SMcode = code;
                     36:   }
                     37:
1.2     ! tam        38:   public SM(OpenXMstream is) throws java.io.IOException{
1.1       tam        39:     SMcode = is.readInt();
                     40:   }
                     41:
                     42:   public int getCode(){
                     43:        return SMcode;
                     44:   }
                     45:
1.2     ! tam        46:   public void write(OpenXMstream os) throws java.io.IOException{
1.1       tam        47:     os.writeInt(SMcode);
                     48:   }
                     49:
1.2     ! tam        50:   public static OXbody receive(OpenXMstream is) throws java.io.IOException{
1.1       tam        51:     return new SM(is);
                     52:   }
                     53:
                     54:   public String toString(){
                     55:     String val;
                     56:
                     57:     switch(SMcode){
                     58:     case 258:
                     59:       val = "SM_popSerializedLocalObject";
                     60:       break;
                     61:
                     62:     case 262:
                     63:       val = "SM_popCMO";
                     64:       break;
                     65:
                     66:     case 263:
                     67:       val = "SM_popString";
                     68:       break;
                     69:
                     70:     case 264:
                     71:       val = "SM_mathcap";
                     72:       break;
                     73:
                     74:     case 265:
                     75:       val = "SM_pops";
                     76:       break;
                     77:
                     78:     case 266:
                     79:       val = "SM_setName";
                     80:       break;
                     81:
                     82:     case 267:
                     83:       val = "SM_evalName";
                     84:       break;
                     85:
                     86:     case 268:
                     87:       val = "SM_executeStringByLocalParser";
                     88:       break;
                     89:
                     90:     case 269:
                     91:       val = "SM_executeFunction";
                     92:       break;
                     93:
                     94:     case 270:
                     95:       val = "SM_beginBlock";
                     96:       break;
                     97:
                     98:     case 271:
                     99:       val = "SM_endBlock";
                    100:       break;
                    101:
                    102:     case 272:
                    103:       val = "SM_shutdown";
                    104:       break;
                    105:
                    106:     case 273:
                    107:       val = "SM_setMathCap";
                    108:       break;
                    109:
                    110:     case 274:
                    111:       val = "SM_executeStringByLocalParserInBatchMode";
                    112:       break;
                    113:
                    114:     case 1024:
                    115:       val = "SM_control_kill";
                    116:       break;
                    117:
                    118:     case 1030:
                    119:       val = "SM_control_reset_connection";
                    120:       break;
                    121:
                    122:     default:
                    123:       val = "";
                    124:     }
                    125:     return val;
                    126:   }
                    127:
                    128:   public String toOXexpression(){
                    129:     return "";
                    130:   }
                    131: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>