1 26 27 package org.objectweb.openccm.ast.lib; 28 29 30 import org.objectweb.openccm.ast.api.TypeKind; 31 32 33 import org.objectweb.openccm.ast.api.DeclarationKind; 34 35 36 import org.omg.CORBA.NativeDef ; 37 import org.omg.CORBA.NativeDefHelper; 38 39 50 51 public class NativeDeclImpl 52 extends DeclarationImpl 53 implements org.objectweb.openccm.ast.api.NativeDecl, 54 IDLTypeWrapper 55 { 56 62 63 private NativeDef native_def_; 64 65 71 77 protected 78 NativeDeclImpl(Repository rep, 79 ScopeImpl parent) 80 { 81 super(rep, parent); 83 84 native_def_ = null; 86 } 87 88 94 100 105 protected void 106 load(org.omg.CORBA.Contained contained) 107 { 108 native_def_ = NativeDefHelper.narrow(contained); 109 super.load(contained); 110 } 111 112 117 protected void 118 loadAsMapping(org.omg.CORBA.Contained contained) 119 { 120 native_def_ = NativeDefHelper.narrow(contained); 121 super.loadAsMapping(contained); 122 } 123 124 129 protected org.omg.CORBA.Contained 130 getContained() 131 { 132 return native_def_; 133 } 134 135 141 147 153 158 public long 159 getDeclKind() 160 { 161 return DeclarationKind.dk_native; 162 } 163 164 167 public void 168 create() 169 { 170 native_def_ = the_parent_.getContainer(). 172 create_native(getId(), getName(), getVersion()); 173 174 super.create(); 175 } 176 177 183 188 public TypeKind 189 getTypeKind() 190 { 191 return TypeKind.tk_native; 192 } 193 194 200 205 public void 206 setIDLType(NativeDef def) 207 { 208 native_def_ = def; 209 } 210 211 217 222 public org.omg.CORBA.IDLType 223 getIDLType() 224 { 225 return native_def_; 226 } 227 } 228 | Popular Tags |