1 7 package org.omg.CORBA; 8 9 10 20 21 abstract public class RepositoryIdHelper 22 { 23 private static String _id = "IDL:omg.org/CORBA/RepositoryId:1.0"; 24 25 public static void insert (org.omg.CORBA.Any a, String that) 26 { 27 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 28 a.type (type ()); 29 write (out, that); 30 a.read_value (out.create_input_stream (), type ()); 31 } 32 33 public static String extract (org.omg.CORBA.Any a) 34 { 35 return read (a.create_input_stream ()); 36 } 37 38 private static org.omg.CORBA.TypeCode __typeCode = null; 39 synchronized public static org.omg.CORBA.TypeCode type () 40 { 41 if (__typeCode == null) 42 { 43 __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); 44 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.RepositoryIdHelper.id (), "RepositoryId", __typeCode); 45 } 46 return __typeCode; 47 } 48 49 public static String id () 50 { 51 return _id; 52 } 53 54 public static String read (org.omg.CORBA.portable.InputStream istream) 55 { 56 String value = null; 57 value = istream.read_string (); 58 return value; 59 } 60 61 public static void write (org.omg.CORBA.portable.OutputStream ostream, String value) 62 { 63 ostream.write_string (value); 64 } 65 66 } 67 | Popular Tags |