1 7 package org.omg.CORBA; 8 9 10 19 20 abstract public class ValueMemberHelper 21 { 22 private static String _id = "IDL:omg.org/CORBA/ValueMember:1.0"; 23 24 public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.ValueMember that) 25 { 26 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 27 a.type (type ()); 28 write (out, that); 29 a.read_value (out.create_input_stream (), type ()); 30 } 31 32 public static org.omg.CORBA.ValueMember extract (org.omg.CORBA.Any a) 33 { 34 return read (a.create_input_stream ()); 35 } 36 37 private static org.omg.CORBA.TypeCode __typeCode = null; 38 private static boolean __active = false; 39 synchronized public static org.omg.CORBA.TypeCode type () 40 { 41 if (__typeCode == null) 42 { 43 synchronized (org.omg.CORBA.TypeCode .class) 44 { 45 if (__typeCode == null) 46 { 47 if (__active) 48 { 49 return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); 50 } 51 __active = true; 52 org.omg.CORBA.StructMember [] _members0 = new org.omg.CORBA.StructMember [7]; 53 org.omg.CORBA.TypeCode _tcOf_members0 = null; 54 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 55 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.IdentifierHelper.id (), "Identifier", _tcOf_members0); 56 _members0[0] = new org.omg.CORBA.StructMember ( 57 "name", 58 _tcOf_members0, 59 null); 60 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 61 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0); 62 _members0[1] = new org.omg.CORBA.StructMember ( 63 "id", 64 _tcOf_members0, 65 null); 66 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 67 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", _tcOf_members0); 68 _members0[2] = new org.omg.CORBA.StructMember ( 69 "defined_in", 70 _tcOf_members0, 71 null); 72 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 73 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.VersionSpecHelper.id (), "VersionSpec", _tcOf_members0); 74 _members0[3] = new org.omg.CORBA.StructMember ( 75 "version", 76 _tcOf_members0, 77 null); 78 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_TypeCode); 79 _members0[4] = new org.omg.CORBA.StructMember ( 80 "type", 81 _tcOf_members0, 82 null); 83 _tcOf_members0 = org.omg.CORBA.IDLTypeHelper.type (); 84 _members0[5] = new org.omg.CORBA.StructMember ( 85 "type_def", 86 _tcOf_members0, 87 null); 88 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short); 89 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.VisibilityHelper.id (), "Visibility", _tcOf_members0); 90 _members0[6] = new org.omg.CORBA.StructMember ( 91 "access", 92 _tcOf_members0, 93 null); 94 __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.CORBA.ValueMemberHelper.id (), "ValueMember", _members0); 95 __active = false; 96 } 97 } 98 } 99 return __typeCode; 100 } 101 102 public static String id () 103 { 104 return _id; 105 } 106 107 public static org.omg.CORBA.ValueMember read (org.omg.CORBA.portable.InputStream istream) 108 { 109 org.omg.CORBA.ValueMember value = new org.omg.CORBA.ValueMember (); 110 value.name = istream.read_string (); 111 value.id = istream.read_string (); 112 value.defined_in = istream.read_string (); 113 value.version = istream.read_string (); 114 value.type = istream.read_TypeCode (); 115 value.type_def = org.omg.CORBA.IDLTypeHelper.read (istream); 116 value.access = istream.read_short (); 117 return value; 118 } 119 120 public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.ValueMember value) 121 { 122 ostream.write_string (value.name); 123 ostream.write_string (value.id); 124 ostream.write_string (value.defined_in); 125 ostream.write_string (value.version); 126 ostream.write_TypeCode (value.type); 127 org.omg.CORBA.IDLTypeHelper.write (ostream, value.type_def); 128 ostream.write_short (value.access); 129 } 130 131 } 132 | Popular Tags |