1 26 27 package org.objectweb.corba.generator.cif_idl.lib; 28 29 import org.objectweb.openccm.ast.api.ProxyHomeDecl; 31 import org.objectweb.openccm.ast.api.ModuleDecl; 32 import org.objectweb.openccm.ast.api.InterfaceDecl; 33 import org.objectweb.openccm.ast.utils.api.CompositionInfo; 34 35 42 43 public class ProxyHomeMapping 44 implements org.objectweb.corba.generator.cif_idl.api.ProxyHomeMapping 45 { 46 52 53 private ProxyHomeDecl proxy_home_; 54 55 61 66 public ProxyHomeMapping(ProxyHomeDecl proxy_home) 67 { 68 proxy_home_ = proxy_home; 70 } 71 72 78 84 91 public void 92 declareCIF( ModuleDecl module, 93 CompositionInfo comp, 94 InterfaceDecl he_mapping) 95 { 96 org.objectweb.openccm.ast.api.InterfaceList list = null; 97 org.objectweb.openccm.ast.api.OperationDecl op = null; 98 org.objectweb.openccm.ast.api.InterfaceDecl itf = null; 99 100 101 itf = module.declareLocalInterface("CIF_" + proxy_home_.getName()); 102 list = itf.getInheritedInterfaceList(); 104 list.add(he_mapping); 105 itf.create(); 106 107 108 op = itf.startOperation("get_home"); 109 op.setType(he_mapping); 110 op.create(); 111 } 112 113 119 } 120 | Popular Tags |