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