1 26 27 package org.objectweb.openccm.generator.cidl.lib; 28 29 import org.objectweb.openccm.ast.api.Declaration; 31 import org.objectweb.openccm.ast.api.DeclarationKind; 32 33 36 37 public class CIDLGenerator 38 extends org.objectweb.openccm.generator.psdl.lib.PSDLGenerator 39 implements org.objectweb.openccm.generator.cidl.api.CIDLGenerator 40 { 41 42 48 53 54 public CIDLGenerator(org.objectweb.openccm.ast.api.AST ast) 55 { 56 super(ast); 58 59 translator_ = new org.objectweb.openccm.generator.translator.ast2idl.lib.AST_CIDLTranslator(); 61 } 62 63 69 72 public void 73 initialize(String outputfile, String app_name) 74 { 75 java.util.List list = new java.util.ArrayList (); 76 77 78 79 list.clear(); 81 list.add("org/objectweb/openccm/generator/common/common.vm"); 82 list.add("org/objectweb/openccm/generator/idl/idl3.vm"); 83 list.add("org/objectweb/openccm/generator/psdl/psdl.vm"); 84 list.add("org/objectweb/openccm/generator/cidl/cidl.vm"); 85 setLibrary(list); 86 87 open(outputfile, "out"); 89 90 super.init(); 92 93 94 put("which", app_name); 95 put("gen", this); 96 put("translator", translator_); 97 put("declarator", ""); 98 put("limited_types" , new Long (org.objectweb.openccm.ast.api.DeclarationKind.dk_cidl)); 99 } 100 101 107 112 public long 113 forward_check() 114 { 115 return ( DeclarationKind.dk_null ); 116 } 117 118 124 131 public int 132 getContainedDeclsNumber(org.objectweb.openccm.ast.api.Scope scope) 133 { 134 Declaration[] objs = null; 135 objs = scope.getContents(true, DeclarationKind.dk_all); 136 137 return objs.length; 138 } 139 140 } 141 | Popular Tags |