1 7 package org.omg.CORBA; 8 9 10 18 19 abstract public class FieldNameHelper 20 { 21 private static String _id = "IDL:omg.org/CORBA/FieldName:1.0"; 22 23 public static void insert (org.omg.CORBA.Any a, String 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 String 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 synchronized public static org.omg.CORBA.TypeCode type () 38 { 39 if (__typeCode == null) 40 { 41 __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); 42 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.FieldNameHelper.id (), "FieldName", __typeCode); 43 } 44 return __typeCode; 45 } 46 47 public static String id () 48 { 49 return _id; 50 } 51 52 public static String read (org.omg.CORBA.portable.InputStream istream) 53 { 54 String value = null; 55 value = istream.read_string (); 56 return value; 57 } 58 59 public static void write (org.omg.CORBA.portable.OutputStream ostream, String value) 60 { 61 ostream.write_string (value); 62 } 63 64 } 65 | Popular Tags |