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 CompExprWchar extends CompExprOper { 11 public char value; 12 public CompExprWchar(char val) { 13 super(CompExprKind.e_wchar); 14 value = val; 15 } 16 17 public int type() { return CompExprKind.e_wchar; } 18 public boolean isProp() { return false; } 19 public int isPositive() { 20 return -2; 21 } 22 23 public EnumList nameProp(CompRepository rep) throws CDLExceptRemote, CDLExceptLock { 24 EnumList l = new EnumList(); 25 return l; 26 } 27 28 public ExprOperDef toNormal(CDLRepository rep) throws CDLExceptToNormal, CDLExceptRemote, CDLExceptLock { 29 try { 30 return ((Repository) rep.get_containing_repository()).create_exprwchar(value); 31 } catch (RemoteException e) { 32 throw new CDLExceptRemote("Remote exception occured: "+e.getMessage()); 33 } catch (TIRExceptCreate ecr) { 34 throw new CDLExceptToNormal("Can't create expression"); 35 } 36 } 37 } 38 | Popular Tags |