1 2 package SOFA.SOFAnode.Made.CDL; 3 import java.rmi.RemoteException ; 4 5 import SOFA.SOFAnode.Made.TIR.CDLRepository; 6 import SOFA.SOFAnode.Made.TIR.ExprOperDef; 7 import SOFA.SOFAnode.Made.TIR.Repository; 8 import SOFA.SOFAnode.Made.TIR.TIRExceptCreate; 9 10 class CompExprInteger extends CompExprOper { 11 public long value; 12 public CompExprInteger(long val) { 13 super(CompExprKind.e_int); 14 value = val; 15 } 16 17 public int type() { return CompExprKind.e_int; } 18 19 public boolean isProp() { return false; } 20 21 public EnumList nameProp(CompRepository rep) throws CDLExceptRemote, CDLExceptLock { 22 EnumList l = new EnumList(); 23 return l; 24 } 25 26 public ExprOperDef toNormal(CDLRepository rep) throws CDLExceptToNormal, CDLExceptRemote, CDLExceptLock { 27 try { 28 return ((Repository) rep.get_containing_repository()).create_exprlonglong(value); 29 } catch (RemoteException e) { 30 throw new CDLExceptRemote("Remote exception occured: "+e.getMessage()); 31 } catch (TIRExceptCreate ecr) { 32 throw new CDLExceptToNormal("Can't create expression"); 33 } 34 } 35 36 40 41 public String toString() { 42 return Long.toString(value); 43 } 44 45 } 46 | Popular Tags |