1 7 package org.omg.CORBA; 8 9 10 31 32 public abstract class FloatSeqHelper 33 { 34 private static String _id = "IDL:omg.org/CORBA/FloatSeq:1.0"; 35 36 public static void insert (org.omg.CORBA.Any a, float[] that) 37 { 38 org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); 39 a.type (type ()); 40 write (out, that); 41 a.read_value (out.create_input_stream (), type ()); 42 } 43 44 public static float[] extract (org.omg.CORBA.Any a) 45 { 46 return read (a.create_input_stream ()); 47 } 48 49 private static org.omg.CORBA.TypeCode __typeCode = null; 50 synchronized public static org.omg.CORBA.TypeCode type () 51 { 52 if (__typeCode == null) 53 { 54 __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_float); 55 __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); 56 __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.FloatSeqHelper.id (), "FloatSeq", __typeCode); 57 } 58 return __typeCode; 59 } 60 61 public static String id () 62 { 63 return _id; 64 } 65 66 public static float[] read (org.omg.CORBA.portable.InputStream istream) 67 { 68 float value[] = null; 69 int _len0 = istream.read_long (); 70 value = new float[_len0]; 71 istream.read_float_array (value, 0, _len0); 72 return value; 73 } 74 75 public static void write (org.omg.CORBA.portable.OutputStream ostream, float[] value) 76 { 77 ostream.write_long (value.length); 78 ostream.write_float_array (value, 0, value.length); 79 } 80 81 } 82 | Popular Tags |