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