1 7 package org.omg.CORBA; 8 9 10 18 19 abstract public class NameValuePairHelper 20 { 21 private static String _id = "IDL:omg.org/CORBA/NameValuePair:1.0"; 22 23 public static void insert (org.omg.CORBA.Any a, org.omg.CORBA.NameValuePair that) 24 { 25 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 26 a.type (type ()); 27 write (out, that); 28 a.read_value (out.create_input_stream (), type ()); 29 } 30 31 public static org.omg.CORBA.NameValuePair extract (org.omg.CORBA.Any a) 32 { 33 return read (a.create_input_stream ()); 34 } 35 36 private static org.omg.CORBA.TypeCode __typeCode = null; 37 private static boolean __active = false; 38 synchronized public static org.omg.CORBA.TypeCode type () 39 { 40 if (__typeCode == null) 41 { 42 synchronized (org.omg.CORBA.TypeCode .class) 43 { 44 if (__typeCode == null) 45 { 46 if (__active) 47 { 48 return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); 49 } 50 __active = true; 51 org.omg.CORBA.StructMember [] _members0 = new org.omg.CORBA.StructMember [2]; 52 org.omg.CORBA.TypeCode _tcOf_members0 = null; 53 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0); 54 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.FieldNameHelper.id (), "FieldName", _tcOf_members0); 55 _members0[0] = new org.omg.CORBA.StructMember ( 56 "id", 57 _tcOf_members0, 58 null); 59 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_any); 60 _members0[1] = new org.omg.CORBA.StructMember ( 61 "value", 62 _tcOf_members0, 63 null); 64 __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.CORBA.NameValuePairHelper.id (), "NameValuePair", _members0); 65 __active = false; 66 } 67 } 68 } 69 return __typeCode; 70 } 71 72 public static String id () 73 { 74 return _id; 75 } 76 77 public static org.omg.CORBA.NameValuePair read (org.omg.CORBA.portable.InputStream istream) 78 { 79 org.omg.CORBA.NameValuePair value = new org.omg.CORBA.NameValuePair (); 80 value.id = istream.read_string (); 81 value.value = istream.read_any (); 82 return value; 83 } 84 85 public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.CORBA.NameValuePair value) 86 { 87 ostream.write_string (value.id); 88 ostream.write_any (value.value); 89 } 90 91 } 92 | Popular Tags |