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.CDLType; 7 import SOFA.SOFAnode.Made.TIR.TIRExceptCreate; 8 9 class CompString extends CompObjectIm implements CompType { 10 public CompExprOper bound; 11 12 public CompString(CompExprOper e) { 13 super(ObjectsKind.o_String); 14 bound = e; 15 } 16 17 public void checkConsist(EnumList props, CompRepository rep) throws CDLExceptCheck, CDLExceptLock, CDLExceptRemote { 18 if (!CompExprOper.testPropInExpr(props, bound.nameProp(rep))) 19 throw new CDLExceptCheck("Unknown property"); 20 } 21 22 public CDLType toNormal(CDLRepository newRep) throws CDLExceptRemote, CDLExceptToNormal, CDLExceptLock { 23 try { 24 return newRep.create_string(bound.toNormal(newRep)); 25 } catch (RemoteException e) { 26 throw new CDLExceptRemote("Remote exception occured: "+e.getMessage()); 27 } catch (TIRExceptCreate e) { 28 throw new CDLExceptToNormal("Can't get primitve type\n"+e.getMessage()); 29 } 30 } 31 } 32 | Popular Tags |