1 2 package SOFA.SOFAnode.Made.CDL; 3 4 class CompConstant extends CompContainedIm { 5 public CompType type; 6 public CompExprOper expr; 7 8 public CompConstant(ID id, CompContainer parent, CompRepository rep, CompType t, CompExprOper o) { 9 super(ObjectsKind.o_Constant, id, parent, rep); 10 type = t; 11 expr = o; 12 } 13 14 public void checkConsist(EnumList props, CompRepository rep) throws CDLExceptCheck, CDLExceptLock, CDLExceptRemote { 15 if (type.objectKind() == ObjectsKind.o_Fixed) { 16 ((CompFixed) type).digits = new CompExprInteger(0); 17 ((CompFixed) type).scale = new CompExprInteger(0); 18 } 19 if (!CompExprOper.testPropInExpr(props, expr.nameProp(rep))) 20 throw new CDLExceptCheck("Unknown property"); 21 type.checkConsist(props,rep); 22 } 23 } 24 | Popular Tags |