294e37ac3efb3e9405423d7a77c47f0511952335
[gcc.git] /
1
2
3 package gnu.classpath.examples.CORBA.SimpleCommunication.communication;
4
5 import org.omg.CORBA.TypeCode;
6 import org.omg.CORBA.portable.InputStream;
7 import org.omg.CORBA.portable.OutputStream;
8 import org.omg.CORBA.portable.Streamable;
9
10 /**
11 * The holder for the structure, returned from the server.
12 */
13 public final class returnThisHolder
14 implements Streamable
15 {
16 /**
17 * The enclosed structure.
18 */
19 public returnThis value = null;
20
21 /**
22 * Create the empty holder.
23 */
24 public returnThisHolder()
25 {
26 }
27
28 /**
29 * Crate the holder with the defined initial value.
30 */
31 public returnThisHolder(returnThis initialValue)
32 {
33 value = initialValue;
34 }
35
36 /**
37 * Read the value from the CDR stream.
38 */
39 public void _read(InputStream in)
40 {
41 value = returnThisHelper.read(in);
42 }
43
44 /**
45 * Get the typecode of this structure.
46 */
47 public TypeCode _type()
48 {
49 return returnThisHelper.type();
50 }
51
52 /**
53 * Write the value from the CDR stream.
54 * @param out
55 */
56 public void _write(OutputStream out)
57 {
58 returnThisHelper.write(out, value);
59 }
60 }