Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/dll/europa/corba/EuropaAI/EuropaHelper.java
1074 views
1
/*
2
* File: ./EuropaAI/EuropaHelper.java
3
* From: europa.idl
4
* Date: Thu Dec 23 02:08:42 1999
5
* By: idltojava Java IDL 1.2 Aug 11 1998 02:00:18
6
*/
7
8
package EuropaAI;
9
public class EuropaHelper {
10
// It is useless to have instances of this class
11
private EuropaHelper() { }
12
13
public static void write(org.omg.CORBA.portable.OutputStream out, EuropaAI.Europa that) {
14
out.write_Object(that);
15
}
16
public static EuropaAI.Europa read(org.omg.CORBA.portable.InputStream in) {
17
return EuropaAI.EuropaHelper.narrow(in.read_Object());
18
}
19
public static EuropaAI.Europa extract(org.omg.CORBA.Any a) {
20
org.omg.CORBA.portable.InputStream in = a.create_input_stream();
21
return read(in);
22
}
23
public static void insert(org.omg.CORBA.Any a, EuropaAI.Europa that) {
24
org.omg.CORBA.portable.OutputStream out = a.create_output_stream();
25
write(out, that);
26
a.read_value(out.create_input_stream(), type());
27
}
28
private static org.omg.CORBA.TypeCode _tc;
29
synchronized public static org.omg.CORBA.TypeCode type() {
30
if (_tc == null)
31
_tc = org.omg.CORBA.ORB.init().create_interface_tc(id(), "Europa");
32
return _tc;
33
}
34
public static String id() {
35
return "IDL:EuropaAI/Europa:1.0";
36
}
37
public static EuropaAI.Europa narrow(org.omg.CORBA.Object that)
38
throws org.omg.CORBA.BAD_PARAM {
39
if (that == null)
40
return null;
41
if (that instanceof EuropaAI.Europa)
42
return (EuropaAI.Europa) that;
43
if (!that._is_a(id())) {
44
throw new org.omg.CORBA.BAD_PARAM();
45
}
46
org.omg.CORBA.portable.Delegate dup = ((org.omg.CORBA.portable.ObjectImpl)that)._get_delegate();
47
EuropaAI.Europa result = new EuropaAI._EuropaStub(dup);
48
return result;
49
}
50
}
51
52