KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnode > Made > CDL > CompConstant


1 /* $Id: CompConstant.java,v 1.1.1.1 2003/02/11 16:19:40 bures Exp $ */
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