studies/corba/Corba-Code1/client/TimeBase/UtcTHelper.java
⇒
download file
1 package TimeBase;
2
3
4
5
6 abstract public class UtcTHelper
{
7 private static String _id = "IDL:hpi.uni-potsdam.de/TimeBase/UtcT:1.0";
8
9 public static void insert (org.omg.CORBA.Any a, TimeBase.UtcT that)
10 {
11 org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
12 a.type (type ());
13 write (out, that);
14 a.read_value (out.create_input_stream (), type ());
15 }
16
17 public static TimeBase.UtcT extract (org.omg.CORBA.Any a)
18 {
19 return read (a.create_input_stream ());
20 }
21
22 private static org.omg.CORBA.TypeCode __typeCode = null;
23 private static boolean __active = false;
24 synchronized public static org.omg.CORBA.TypeCode type ()
25 {
26 if (__typeCode == null)
27 {
28 synchronized (org.omg.CORBA.TypeCode.class)
29 {
30 if (__typeCode == null)
31 {
32 if (__active)
33 {
34 return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
35 }
36 __active = true;
37 org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember [3];
38 org.omg.CORBA.TypeCode _tcOf_members0 = null;
39 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulonglong);
40 _tcOf_members0 = org.omg.CORBA.ORB.init ().create_alias_tc (TimeBase.TimeTHelper.id (), "TimeT", _tcOf_members0);
41 _members0[0] = new org.omg.CORBA.StructMember (
42 "time",
43 _tcOf_members0,
44 null);
45 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ulong);
46 _members0[1] = new org.omg.CORBA.StructMember (
47 "inacclo",
48 _tcOf_members0,
49 null);
50 _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_ushort);
51 _members0[2] = new org.omg.CORBA.StructMember (
52 "inacchi",
53 _tcOf_members0,
54 null);
55 __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (TimeBase.UtcTHelper.id (), "UtcT", _members0);
56 __active = false;
57 }
58 }
59 }
60 return __typeCode;
61 }
62
63 public static String id ()
64 {
65 return _id;
66 }
67
68 public static TimeBase.UtcT read (org.omg.CORBA.portable.InputStream istream)
69 {
70 TimeBase.UtcT value = new TimeBase.UtcT ();
71 value.time = istream.read_ulonglong ();
72 value.inacclo = istream.read_ulong ();
73 value.inacchi = istream.read_ushort ();
74 return value;
75 }
76
77 public static void write (org.omg.CORBA.portable.OutputStream ostream, TimeBase.UtcT value)
78 {
79 ostream.write_ulonglong (value.time);
80 ostream.write_ulong (value.inacclo);
81 ostream.write_ushort (value.inacchi);
82 }
83
84 }
85
86