1 26 27 package org.objectweb.openccm.ir3; 28 29 import org.omg.CORBA.*; 31 32 40 41 public class StructDef_impl 42 extends Container_impl 43 implements StructDefOperations 44 { 45 51 54 public 55 StructDef_impl(IFR ifr, 56 Container_impl container) 57 { 58 super(ifr, container); 60 61 setServant(new StructDefPOATie(this)); 63 64 members_ = new StructMembers(this, this); 66 } 67 68 74 77 protected StructMembers members_; 78 79 85 89 protected TypeCode 90 recursiveType(java.util.List idSeq) 91 { 92 int idx = idSeq.indexOf(id()); 93 if (idx!=-1) 94 return getIFR().getTCF().create_recursive_tc(id()); 95 96 idSeq.add(id()); 97 StructMember[] members = members_.getStructMemberSeq(idSeq); 98 idSeq.remove(id()); 99 100 return getIFR().getTCF().create_struct_tc(id(), name(), members); 102 } 103 104 110 113 public StructDef 114 asStructDef() 115 { 116 return StructDefHelper.narrow(asObject()); 117 } 118 119 125 128 public boolean 129 checkDefinitionKind(DefinitionKind dk) 130 { 131 return (dk == DefinitionKind.dk_Struct) 133 || (dk == DefinitionKind.dk_Union) 134 || (dk == DefinitionKind.dk_Enum); 135 } 136 137 140 public void 141 checkName(String name, 142 boolean exclude_inherited, 143 boolean in_inherited) 144 { 145 super.checkName(name, exclude_inherited, in_inherited); 147 148 members_.checkName(name); 150 } 151 152 158 161 protected void 162 cutDependencies() 163 { 164 members_.cutDependencies(); 166 167 super.cutDependencies(); 169 } 170 171 177 180 public DefinitionKind 181 def_kind() 182 { 183 return DefinitionKind.dk_Struct; 184 } 185 186 192 195 public TypeCode 196 type() 197 { 198 java.util.List idSeq = new java.util.ArrayList (); 200 return recursiveType(idSeq); 201 } 202 203 209 215 218 public StructMember[] 219 members() 220 { 221 return members_.getStructMemberSeq(); 223 } 224 225 228 public void 229 members(StructMember[] val) 230 { 231 members_.setStructMemberSeq(val); 233 } 234 } 235 | Popular Tags |