OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / lib / classpath / examples / gnu / classpath / examples / CORBA / SimpleCommunication / communication / StructureToReturnHolder.java
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 StructureToReturnHolder
14   implements Streamable
15 {
16   /**
17    * The enclosed structure.
18    */
19   public StructureToReturn value = null;
20
21   /**
22    * Create the empty holder.
23    */
24   public StructureToReturnHolder()
25   {
26   }
27
28   /**
29    * Crate the holder with the defined initial value.
30    */
31   public StructureToReturnHolder(StructureToReturn 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 = StructureToReturnHelper.read(in);
42   }
43
44   /**
45    * Get the typecode of this structure.
46    */
47   public TypeCode _type()
48   {
49     return StructureToReturnHelper.type();
50   }
51
52   /**
53    * Write the value from the CDR stream.
54    * @param out
55    */
56   public void _write(OutputStream out)
57   {
58     StructureToReturnHelper.write(out, value);
59   }
60 }