00001 package SctTestApi; 00002 00003 00017 abstract public class HighLevelApiHelper 00018 { 00019 private static String _id = "IDL:SctTestApi/HighLevelApi:1.0"; 00020 00021 public static void insert (org.omg.CORBA.Any a, SctTestApi.HighLevelApi that) 00022 { 00023 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 00024 a.type (type ()); 00025 write (out, that); 00026 a.read_value (out.create_input_stream (), type ()); 00027 } 00028 00029 public static SctTestApi.HighLevelApi extract (org.omg.CORBA.Any a) 00030 { 00031 return read (a.create_input_stream ()); 00032 } 00033 00034 private static org.omg.CORBA.TypeCode __typeCode = null; 00035 synchronized public static org.omg.CORBA.TypeCode type () 00036 { 00037 if (__typeCode == null) 00038 { 00039 __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (SctTestApi.HighLevelApiHelper.id (), "HighLevelApi"); 00040 } 00041 return __typeCode; 00042 } 00043 00044 public static String id () 00045 { 00046 return _id; 00047 } 00048 00049 public static SctTestApi.HighLevelApi read (org.omg.CORBA.portable.InputStream istream) 00050 { 00051 return narrow (istream.read_Object (_HighLevelApiStub.class)); 00052 } 00053 00054 public static void write (org.omg.CORBA.portable.OutputStream ostream, SctTestApi.HighLevelApi value) 00055 { 00056 ostream.write_Object ((org.omg.CORBA.Object) value); 00057 } 00058 00059 public static SctTestApi.HighLevelApi narrow (org.omg.CORBA.Object obj) 00060 { 00061 if (obj == null) 00062 return null; 00063 else if (obj instanceof SctTestApi.HighLevelApi) 00064 return (SctTestApi.HighLevelApi)obj; 00065 else if (!obj._is_a (id ())) 00066 throw new org.omg.CORBA.BAD_PARAM (); 00067 else 00068 { 00069 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate (); 00070 SctTestApi._HighLevelApiStub stub = new SctTestApi._HighLevelApiStub (); 00071 stub._set_delegate(delegate); 00072 return stub; 00073 } 00074 } 00075 00076 }