1 26 27 package org.objectweb.corba.generator.cif_idl.lib; 28 29 import org.objectweb.openccm.ast.utils.api.CompositionInfo; 31 import org.objectweb.openccm.ast.api.CompositionDecl; 32 import org.objectweb.openccm.ast.api.ModuleDecl; 33 import org.objectweb.openccm.ast.api.Declaration; 34 import org.objectweb.corba.generator.cif_idl.api.ProxyHomeMapping; 35 import org.objectweb.corba.generator.cif_idl.api.HomeExecutorMapping; 36 37 44 45 public class CompositionMapping 46 implements org.objectweb.corba.generator.cif_idl.api.CompositionMapping 47 { 48 54 55 private CompositionInfo comp_; 56 57 63 68 public CompositionMapping(CompositionDecl composition) 69 { 70 comp_ = new org.objectweb.openccm.ast.utils.lib.CompositionInfo(composition); 72 } 73 74 80 81 87 92 public ModuleDecl 93 declareCIF() 94 { 95 ModuleDecl parent, module; 96 Declaration[] decls = null; 97 ProxyHomeMapping ph_mapping = null; 98 HomeExecutorMapping he_mapping = null; 99 100 parent = (org.objectweb.openccm.ast.api.ModuleDecl) 102 comp_.getComposition().getParent(); 103 104 module = parent.declareModule( comp_.getComposition().getName() ); 106 module.create(); 107 108 he_mapping = new org.objectweb.corba.generator.cif_idl.lib.HomeExecutorMapping( comp_.getHomeExecutor() ); 110 he_mapping.declareCIF(module, comp_); 111 112 if (comp_.getProxyHome() != null) 114 { 115 ph_mapping = new org.objectweb.corba.generator.cif_idl.lib.ProxyHomeMapping( comp_.getProxyHome() ); 116 ph_mapping.declareCIF( module, 117 comp_, 118 he_mapping.getCIFMapping() ); 119 } 120 121 return module; 122 } 123 124 130 } 131 | Popular Tags |