1 26 27 package org.objectweb.openccm.ir3; 28 29 import org.omg.CORBA.*; 31 32 40 41 public class StructMembers 42 extends Members 43 { 44 50 56 57 public 58 StructMembers(Contained_impl contained, 59 Container_impl container) 60 { 61 super(contained, container); 62 } 63 64 70 73 public StructMember[] 74 getStructMemberSeq(java.util.List idSeq) 75 { 76 StructMember[] result = new StructMember[names_.length]; 77 78 for(int i=0; i<result.length; i++) 79 { 80 result[i] = new StructMember(); 81 result[i].name = names_[i]; 82 result[i].type = types_[i].recursiveType(idSeq); 84 result[i].type_def = types_[i].asIDLType(); 85 } 86 87 return result; 88 } 89 90 93 public StructMember[] 94 getStructMemberSeq() 95 { 96 StructMember[] result = new StructMember[names_.length]; 97 java.util.List idSeq = new java.util.ArrayList (); 98 99 for(int i=0; i<result.length; i++) 100 { 101 idSeq.clear(); 102 result[i] = new StructMember(); 103 result[i].name = names_[i]; 104 result[i].type = types_[i].recursiveType(idSeq); 106 result[i].type_def = types_[i].asIDLType(); 107 } 108 109 return result; 110 } 111 112 115 public void 116 setStructMemberSeq(StructMember[] val) 117 { 118 String [] names = new String [val.length]; 120 for (int i=0; i<val.length; i++) 121 names[i] = val[i].name; 122 123 checkNames(names); 124 125 IRObject_impl[] types = new IRObject_impl[val.length]; 126 for (int i=0; i<val.length; i++) 127 types[i] = contained_.castToLocal(val[i].type_def); 128 129 IDLType_ref[] refs = new IDLType_ref[val.length]; 130 for (int i=0; i<val.length; i++) 131 refs[i] = new IDLType_ref( container_, types[i] ); 132 133 super.setNamesTypes(names, refs); 134 } 135 } 136 | Popular Tags |