KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > omg > mof > Model > MultiplicityTypeHelper


1 package org.omg.mof.Model;
2
3
4 /**
5 * org/omg/mof/Model/MultiplicityTypeHelper.java .
6 * Generated by the IDL-to-Java compiler (portable), version "3.1"
7 * from mof1.idl
8 * lundi 17 mars 2003 15 h 01 CET
9 */

10
11
12 //
13
abstract public class MultiplicityTypeHelper
14 {
15   private static String JavaDoc _id = "IDL:org/omg/mof/Model/MultiplicityType:1.0";
16
17   public static void insert (org.omg.CORBA.Any JavaDoc a, org.omg.mof.Model.MultiplicityType that)
18   {
19     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
20     a.type (type ());
21     write (out, that);
22     a.read_value (out.create_input_stream (), type ());
23   }
24
25   public static org.omg.mof.Model.MultiplicityType extract (org.omg.CORBA.Any JavaDoc a)
26   {
27     return read (a.create_input_stream ());
28   }
29
30   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
31   private static boolean __active = false;
32   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
33   {
34     if (__typeCode == null)
35     {
36       synchronized (org.omg.CORBA.TypeCode JavaDoc.class)
37       {
38         if (__typeCode == null)
39         {
40           if (__active)
41           {
42             return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
43           }
44           __active = true;
45           org.omg.CORBA.StructMember JavaDoc[] _members0 = new org.omg.CORBA.StructMember JavaDoc [4];
46           org.omg.CORBA.TypeCode JavaDoc _tcOf_members0 = null;
47           _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
48           _members0[0] = new org.omg.CORBA.StructMember JavaDoc (
49             "lower",
50             _tcOf_members0,
51             null);
52           _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
53           _members0[1] = new org.omg.CORBA.StructMember JavaDoc (
54             "upper",
55             _tcOf_members0,
56             null);
57           _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
58           _members0[2] = new org.omg.CORBA.StructMember JavaDoc (
59             "isOrdered",
60             _tcOf_members0,
61             null);
62           _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
63           _members0[3] = new org.omg.CORBA.StructMember JavaDoc (
64             "isUnique",
65             _tcOf_members0,
66             null);
67           __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (org.omg.mof.Model.MultiplicityTypeHelper.id (), "MultiplicityType", _members0);
68           __active = false;
69         }
70       }
71     }
72     return __typeCode;
73   }
74
75   public static String JavaDoc id ()
76   {
77     return _id;
78   }
79
80   public static org.omg.mof.Model.MultiplicityType read (org.omg.CORBA.portable.InputStream JavaDoc istream)
81   {
82     org.omg.mof.Model.MultiplicityType value = new org.omg.mof.Model.MultiplicityType ();
83     value.lower = istream.read_long ();
84     value.upper = istream.read_long ();
85     value.isOrdered = istream.read_boolean ();
86     value.isUnique = istream.read_boolean ();
87     return value;
88   }
89
90   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, org.omg.mof.Model.MultiplicityType value)
91   {
92     ostream.write_long (value.lower);
93     ostream.write_long (value.upper);
94     ostream.write_boolean (value.isOrdered);
95     ostream.write_boolean (value.isUnique);
96   }
97
98 }
99
Popular Tags