1 package org.omg.CORBA; 2 3 4 10 11 12 17 abstract public class PolicyErrorCodeHelper 18 { 19 private static String _id = "IDL:omg.org/CORBA/PolicyErrorCode:1.0"; 20 21 public static void insert (org.omg.CORBA.Any a, short that) 22 { 23 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 24 a.type (type ()); 25 write (out, that); 26 a.read_value (out.create_input_stream (), type ()); 27 } 28 29 public static short extract (org.omg.CORBA.Any a) 30 { 31 return read (a.create_input_stream ()); 32 } 33 34 private static org.omg.CORBA.TypeCode __typeCode = null; 35 synchronized public static org.omg.CORBA.TypeCode type () 36 { 37 if (__typeCode == null) 38 { 39 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short); 40 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.PolicyErrorCodeHelper.id (), "PolicyErrorCode", __typeCode); 41 } 42 return __typeCode; 43 } 44 45 public static String id () 46 { 47 return _id; 48 } 49 50 public static short read (org.omg.CORBA.portable.InputStream istream) 51 { 52 short value = (short)0; 53 value = istream.read_short (); 54 return value; 55 } 56 57 public static void write (org.omg.CORBA.portable.OutputStream ostream, short value) 58 { 59 ostream.write_short (value); 60 } 61 62 } 63 | Popular Tags |