aaronp-zomg 1.0.2.20080827232412
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +25 -0
- data/Manifest.txt +238 -0
- data/README.txt +59 -0
- data/Rakefile +43 -0
- data/bin/omfg +56 -0
- data/lib/scanner.rex +169 -0
- data/lib/yacc.y +861 -0
- data/lib/zomg.rb +22 -0
- data/lib/zomg/idl.rb +14 -0
- data/lib/zomg/idl/nodes/attribute.rb +15 -0
- data/lib/zomg/idl/nodes/binary.rb +19 -0
- data/lib/zomg/idl/nodes/constant.rb +15 -0
- data/lib/zomg/idl/nodes/interface.rb +13 -0
- data/lib/zomg/idl/nodes/interface_header.rb +14 -0
- data/lib/zomg/idl/nodes/member.rb +14 -0
- data/lib/zomg/idl/nodes/node.rb +54 -0
- data/lib/zomg/idl/nodes/operation.rb +17 -0
- data/lib/zomg/idl/nodes/parameter.rb +18 -0
- data/lib/zomg/idl/nodes/typedef.rb +13 -0
- data/lib/zomg/idl/nodes/union.rb +14 -0
- data/lib/zomg/idl/parser.rb +54 -0
- data/lib/zomg/idl/visitable.rb +15 -0
- data/lib/zomg/idl/visitors/duhr.rb +24 -0
- data/lib/zomg/idl/visitors/ruby_sexp.rb +204 -0
- data/lib/zomg/idl/visitors/sexp.rb +274 -0
- data/lib/zomg/version.rb +3 -0
- data/test/assets/array/array1.idl +60 -0
- data/test/assets/array/array2.idl +38 -0
- data/test/assets/array/array3.idl +8 -0
- data/test/assets/array/array4.idl +7 -0
- data/test/assets/array/array5.idl +80 -0
- data/test/assets/attribute/grid_0attribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_0methods.idl +19 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_1methods.idl +19 -0
- data/test/assets/attribute/grid_1ROattribs_1attribs_2methods.idl +17 -0
- data/test/assets/attribute/grid_1ROattribs_1methods.idl +16 -0
- data/test/assets/attribute/grid_1ROattribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_1attribs_1methods.idl +17 -0
- data/test/assets/attribute/grid_1attribs_2methods.idl +17 -0
- data/test/assets/attribute/grid_2ROattribs_0methods.idl +16 -0
- data/test/assets/attribute/grid_2ROattribs_1methods.idl +16 -0
- data/test/assets/attribute/grid_2ROattribs_2methods.idl +16 -0
- data/test/assets/attribute/grid_2attribs_0methods.idl +19 -0
- data/test/assets/attribute/grid_2attribs_1methods.idl +19 -0
- data/test/assets/attribute/grid_2attribs_2methods.idl +19 -0
- data/test/assets/comment/c_style_comments.idl +63 -0
- data/test/assets/comment/comment1.idl +57 -0
- data/test/assets/comment/cpp_style_comments.idl +168 -0
- data/test/assets/comment/shortform.idl +0 -0
- data/test/assets/complex/TestCodeSets.idl +10 -0
- data/test/assets/complex/TestIntfContext.idl +13 -0
- data/test/assets/complex/TestIntfLongLong.idl +51 -0
- data/test/assets/complex/TestIntfWChar.idl +52 -0
- data/test/assets/complex/any1.idl +22 -0
- data/test/assets/complex/complex1.idl +495 -0
- data/test/assets/complex/complex2.idl +730 -0
- data/test/assets/complex/complex3.idl +181 -0
- data/test/assets/complex/complex4.idl +181 -0
- data/test/assets/complex/interop_wchar.idl +60 -0
- data/test/assets/constant/constant1.idl +37 -0
- data/test/assets/constant/constant2.idl +29 -0
- data/test/assets/constant/constant3.idl +50 -0
- data/test/assets/constant/constant4.idl +21 -0
- data/test/assets/constant/constant5.idl +65 -0
- data/test/assets/constant/constant6.idl +144 -0
- data/test/assets/constant/constant7.idl +30 -0
- data/test/assets/enum/enum1.idl +13 -0
- data/test/assets/exception/TestIntfExceptions.idl +69 -0
- data/test/assets/exception/TestIntfExceptionsExt_2_0.idl +34 -0
- data/test/assets/exception/TestIntfExceptionsExt_2_3.idl +24 -0
- data/test/assets/exception/ex1.idl +6 -0
- data/test/assets/exception/ex2.idl +18 -0
- data/test/assets/exception/ex3.idl +10 -0
- data/test/assets/exception/ex4.idl +20 -0
- data/test/assets/exception/sc.idl +0 -0
- data/test/assets/exception/simple1.idl +18 -0
- data/test/assets/exception/simple2.idl +25 -0
- data/test/assets/factory/factory1.idl +77 -0
- data/test/assets/factory/objref.idl +25 -0
- data/test/assets/forward/forward.idl +15 -0
- data/test/assets/forward/forward1.idl +13 -0
- data/test/assets/forward/fwd_incl1.idl +6 -0
- data/test/assets/forward/fwd_incl2.idl +7 -0
- data/test/assets/include/a.idl +23 -0
- data/test/assets/include/b.idl +16 -0
- data/test/assets/include/employee.idl +12 -0
- data/test/assets/include/include1.idl +10 -0
- data/test/assets/include/include2.idl +5 -0
- data/test/assets/include/manager.idl +10 -0
- data/test/assets/include/pragma.idl +41 -0
- data/test/assets/include/rookie.idl +13 -0
- data/test/assets/include/rookiemanager.idl +15 -0
- data/test/assets/include/sample.idl +58 -0
- data/test/assets/include/sample_incl.idl +406 -0
- data/test/assets/inherit/IDL1.idl +18 -0
- data/test/assets/inherit/IDL2.idl +18 -0
- data/test/assets/inherit/IDL3.idl +18 -0
- data/test/assets/inherit/IDL4.idl +17 -0
- data/test/assets/inherit/diamond_inheritance.idl +31 -0
- data/test/assets/inherit/inherit.idl +27 -0
- data/test/assets/limit/longidentifiers.idl +25 -0
- data/test/assets/limit/namelens.idl +26 -0
- data/test/assets/limit/tpztest.idl +21 -0
- data/test/assets/module/module1.idl +29 -0
- data/test/assets/module/module2.idl +34 -0
- data/test/assets/module/module3.idl +20 -0
- data/test/assets/module/module4.idl +15 -0
- data/test/assets/nested/nested1.idl +5 -0
- data/test/assets/nested/nested2.idl +11 -0
- data/test/assets/operations/Benchmark.idl +331 -0
- data/test/assets/operations/CCS.idl +82 -0
- data/test/assets/operations/TestIntf.idl +40 -0
- data/test/assets/operations/TestIntfBasic.idl +653 -0
- data/test/assets/operations/atomic.idl +40 -0
- data/test/assets/operations/dif2.idl +48 -0
- data/test/assets/operations/interface1.idl +16 -0
- data/test/assets/operations/parameters.idl +111 -0
- data/test/assets/operations/perf.idl +84 -0
- data/test/assets/operations/timer.idl +104 -0
- data/test/assets/preprocess/base_for_diamond_inheritance_with_macros.idl +17 -0
- data/test/assets/preprocess/basic_macro_marshalling.idl +54 -0
- data/test/assets/preprocess/diamond_inheritance_with_macros.idl +74 -0
- data/test/assets/preprocess/macro1.idl +52 -0
- data/test/assets/preprocess/preprocess1.idl +246 -0
- data/test/assets/preprocess/preprocess2.idl +3 -0
- data/test/assets/recursion/loop.idl +28 -0
- data/test/assets/recursion/recursion1.idl +47 -0
- data/test/assets/recursion/recursion2.idl +74 -0
- data/test/assets/scenarios/filestat.idl +69 -0
- data/test/assets/scenarios/gateway.idl +176 -0
- data/test/assets/scenarios/library.idl +20 -0
- data/test/assets/scenarios/phone.idl +24 -0
- data/test/assets/scenarios/ticketservice.idl +118 -0
- data/test/assets/scope/scope01.idl +58 -0
- data/test/assets/scope/scope02.idl +25 -0
- data/test/assets/scope/scope03.idl +22 -0
- data/test/assets/scope/scope04.idl +27 -0
- data/test/assets/scope/scope05.idl +30 -0
- data/test/assets/scope/scope06.idl +51 -0
- data/test/assets/scope/scope07.idl +20 -0
- data/test/assets/scope/scope08.idl +88 -0
- data/test/assets/scope/scope09.idl +21 -0
- data/test/assets/scope/scope10.idl +95 -0
- data/test/assets/scope/scope11.idl +62 -0
- data/test/assets/scope/scope12.idl +117 -0
- data/test/assets/scope/scope13.idl +117 -0
- data/test/assets/scope/scope14.idl +117 -0
- data/test/assets/scope/scope15.idl +117 -0
- data/test/assets/scope/scope16.idl +117 -0
- data/test/assets/scope/scope17.idl +117 -0
- data/test/assets/scope/scope18.idl +117 -0
- data/test/assets/scope/scope19.idl +117 -0
- data/test/assets/scope/scope20.idl +215 -0
- data/test/assets/scope/scope21.idl +215 -0
- data/test/assets/scope/scope22.idl +205 -0
- data/test/assets/scope/scope23.idl +261 -0
- data/test/assets/scope/scope24.idl +376 -0
- data/test/assets/scope/scope25.idl +266 -0
- data/test/assets/scope/scope26.idl +180 -0
- data/test/assets/scope/scope27.idl +184 -0
- data/test/assets/scope/scope28.idl +182 -0
- data/test/assets/scope/scope29.idl +182 -0
- data/test/assets/scope/scope30.idl +40 -0
- data/test/assets/scope/scope31.idl +33 -0
- data/test/assets/scope/scope32.idl +37 -0
- data/test/assets/scope/scope33.idl +50 -0
- data/test/assets/scope/scope34.idl +97 -0
- data/test/assets/scope/scope35.idl +72 -0
- data/test/assets/scope/scope36.idl +167 -0
- data/test/assets/scope/scope37.idl +57 -0
- data/test/assets/scope/scope38.idl +38 -0
- data/test/assets/scope/scope39.idl +38 -0
- data/test/assets/scope/scope40.idl +38 -0
- data/test/assets/scope/scope41.idl +24 -0
- data/test/assets/scope/scope42.idl +64 -0
- data/test/assets/scope/scope43.idl +66 -0
- data/test/assets/scope/scope44.idl +52 -0
- data/test/assets/sequence/sequence1.idl +24 -0
- data/test/assets/sequence/sequence2.idl +9 -0
- data/test/assets/simple/basictypes1.idl +80 -0
- data/test/assets/simple/basictypes2.idl +197 -0
- data/test/assets/simple/basictypes3.idl +23 -0
- data/test/assets/simple/basictypes4.idl +73 -0
- data/test/assets/simple/basictypes5.idl +29 -0
- data/test/assets/simple/basictypes6.idl +63 -0
- data/test/assets/simple/simple1.idl +45 -0
- data/test/assets/simple/simple2.idl +61 -0
- data/test/assets/simple/simple3.idl +36 -0
- data/test/assets/string/string1.idl +11 -0
- data/test/assets/string/string2.idl +29 -0
- data/test/assets/struct/struct1.idl +20 -0
- data/test/assets/struct/struct2.idl +21 -0
- data/test/assets/struct/struct3.idl +42 -0
- data/test/assets/struct/struct4.idl +57 -0
- data/test/assets/struct/struct5.idl +71 -0
- data/test/assets/typecode/orb.idl +0 -0
- data/test/assets/typecode/pseudo.idl +25 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideIF.idl +17 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideIF_noMO.idl +16 -0
- data/test/assets/typedef/shorthand_typedef_struct_insideMO.idl +17 -0
- data/test/assets/typedef/shorthand_typedef_struct_outsideMO.idl +17 -0
- data/test/assets/typedef/typedef1.idl +8 -0
- data/test/assets/typedef/typedef2.idl +22 -0
- data/test/assets/typedef/typedef_struct_insideIF.idl +18 -0
- data/test/assets/typedef/typedef_struct_insideMO.idl +18 -0
- data/test/assets/typedef/typedef_struct_outsideMO.idl +18 -0
- data/test/assets/union/union1.idl +31 -0
- data/test/assets/union/union2.idl +22 -0
- data/test/assets/union/union3.idl +26 -0
- data/test/conversions/test_attribute.rb +46 -0
- data/test/conversions/test_enum.rb +25 -0
- data/test/conversions/test_exception.rb +24 -0
- data/test/conversions/test_forward_declaration.rb +22 -0
- data/test/conversions/test_interface.rb +30 -0
- data/test/conversions/test_module.rb +24 -0
- data/test/conversions/test_struct.rb +25 -0
- data/test/conversions/test_typedef.rb +22 -0
- data/test/conversions/test_union.rb +27 -0
- data/test/conversions/test_value_box_dcl.rb +22 -0
- data/test/helper.rb +23 -0
- data/test/simple/test_basictypes1.rb +87 -0
- data/test/simple/test_basictypes2.rb +18 -0
- data/test/simple/test_basictypes3.rb +32 -0
- data/test/simple/test_basictypes4.rb +25 -0
- data/test/simple/test_basictypes5.rb +17 -0
- data/test/simple/test_basictypes6.rb +19 -0
- data/test/simple/test_simple1.rb +40 -0
- data/test/simple/test_simple2.rb +48 -0
- data/test/simple/test_simple3.rb +20 -0
- data/test/test_array.rb +22 -0
- data/test/test_assets.rb +33 -0
- data/test/test_complex.rb +17 -0
- data/test/test_node.rb +16 -0
- data/test/test_parser.rb +17 -0
- data/test/test_scanner.rb +234 -0
- metadata +334 -0
@@ -0,0 +1,181 @@
|
|
1
|
+
// Description : CORBA IDL containing attributes that causes the
|
2
|
+
// adapter to perform both one & two-way invocations
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Module that contains interfaces for complex tests. IDLs contained in
|
6
|
+
* this module includes the following:
|
7
|
+
* <UL>
|
8
|
+
* <LI>Complex data types including structures, sequences, unions, etc.
|
9
|
+
* <LI>Interface that contains attributes
|
10
|
+
* </UL>
|
11
|
+
*/
|
12
|
+
module AttributesComplexTest
|
13
|
+
{
|
14
|
+
/**
|
15
|
+
* Complex structure consisting of a string value and a
|
16
|
+
* sequence of floating point values
|
17
|
+
*/
|
18
|
+
struct ComplexStructure
|
19
|
+
{
|
20
|
+
string string_value;
|
21
|
+
sequence<float> sequence_value;
|
22
|
+
};
|
23
|
+
|
24
|
+
/**
|
25
|
+
* A complex array consisting of 2 elements. Each element is a complex
|
26
|
+
* structure type
|
27
|
+
*/
|
28
|
+
typedef ComplexStructure ComplexArray[2];
|
29
|
+
|
30
|
+
/**
|
31
|
+
* A complex unbounded sequence that holds any data types
|
32
|
+
*/
|
33
|
+
typedef sequence<any> ComplexSequence;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* An enumeration consisting of 5 elements, E1 to E5. The enumeration
|
37
|
+
* is used to test Union data types, based on a switch case of enum values
|
38
|
+
*/
|
39
|
+
enum TestEnum { E1, E2, E3, E4, E5 };
|
40
|
+
|
41
|
+
/**
|
42
|
+
* An array consisting of 5 elements. Each element is a short
|
43
|
+
* data type. The array of 5 shorts is typedef-ed into the name
|
44
|
+
* "short"
|
45
|
+
*/
|
46
|
+
typedef short short_array[5];
|
47
|
+
|
48
|
+
/**
|
49
|
+
* An array consisting of 5 elements. Each element is a double
|
50
|
+
* data type. The array of 5 doubled is typedef-ed into the name
|
51
|
+
* "double"
|
52
|
+
*/
|
53
|
+
typedef double double_array[5];
|
54
|
+
|
55
|
+
/**
|
56
|
+
* An array consisting of 5 elements. Each element is a string
|
57
|
+
* data type. The array of 5 strings is typedef-ed into the name
|
58
|
+
* "string"
|
59
|
+
*/
|
60
|
+
typedef string string_array[5];
|
61
|
+
|
62
|
+
/**
|
63
|
+
* A union that discriminates based on an enumeration, <CODE>TestEnum
|
64
|
+
* </CODE>. The discrimination rules are as follows:
|
65
|
+
* <UL>
|
66
|
+
* <LI>If discriminator is TestEnum::E1, return an array of short values
|
67
|
+
* <LI>If discriminator is TestEnum::E2, return an array of double values
|
68
|
+
* <LI>If discriminator is TestEnum::E3, return a long value
|
69
|
+
* <LI>If discriminator is TestEnum::E4, return a complex structure
|
70
|
+
* <LI>If discriminator is TestEnum::E5, return an array of string values
|
71
|
+
* </UL>
|
72
|
+
*/
|
73
|
+
union ComplexUnion switch(TestEnum)
|
74
|
+
{
|
75
|
+
case E1:
|
76
|
+
short_array s;
|
77
|
+
case E2:
|
78
|
+
double_array d;
|
79
|
+
case E3:
|
80
|
+
long l;
|
81
|
+
case E4:
|
82
|
+
ComplexStructure cs;
|
83
|
+
default:
|
84
|
+
string_array str;
|
85
|
+
};
|
86
|
+
|
87
|
+
/**
|
88
|
+
* Attribute interface for complex data types. Clients and servers written
|
89
|
+
* using this interface can be used with all services.
|
90
|
+
*/
|
91
|
+
interface comattrcor
|
92
|
+
{
|
93
|
+
/**
|
94
|
+
* Complex structure attribute that tests the adapter's core
|
95
|
+
* functionality.
|
96
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
97
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
98
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
99
|
+
* The attribute gets mapped to get_test_struct and set_test_struct in
|
100
|
+
* the adapter.
|
101
|
+
*/
|
102
|
+
attribute ComplexStructure test_struct;
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Complex array attribute that tests the adapter's core
|
106
|
+
* functionality.
|
107
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
108
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
109
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
110
|
+
* The attribute gets mapped to get_test_array and set_test_array in
|
111
|
+
* the adapter.
|
112
|
+
*/
|
113
|
+
attribute ComplexArray test_array;
|
114
|
+
|
115
|
+
/**
|
116
|
+
* Complex sequence attribute that tests the adapter's core
|
117
|
+
* functionality.
|
118
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
119
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
120
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
121
|
+
* The attribute gets mapped to get_test_sequence and set_test_sequence
|
122
|
+
* in the adapter.
|
123
|
+
*/
|
124
|
+
attribute ComplexSequence test_sequence;
|
125
|
+
|
126
|
+
/**
|
127
|
+
* Complex union attribute that tests the adapter's core
|
128
|
+
* functionality.
|
129
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
130
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
131
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
132
|
+
* The attribute gets mapped to get_test_union and set_test_union in
|
133
|
+
* the adapter.
|
134
|
+
*/
|
135
|
+
attribute ComplexUnion test_union;
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Complex enumeration attribute that tests the adapter's core
|
139
|
+
* functionality.
|
140
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
141
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
142
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
143
|
+
* The attribute gets mapped to get_test_enum and set_test_enum in
|
144
|
+
* the adapter.
|
145
|
+
*/
|
146
|
+
attribute TestEnum test_enum;
|
147
|
+
|
148
|
+
/**
|
149
|
+
* Complex short attribute that tests the adapter's core
|
150
|
+
* functionality.
|
151
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
152
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
153
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
154
|
+
* The attribute gets mapped to get_test_short and set_test_short in
|
155
|
+
* the adapter.
|
156
|
+
*/
|
157
|
+
attribute short test_short;
|
158
|
+
|
159
|
+
/**
|
160
|
+
* Complex double attribute that tests the adapter's core
|
161
|
+
* functionality.
|
162
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
163
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
164
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
165
|
+
* The attribute gets mapped to get_test_double and set_test_double in
|
166
|
+
* the adapter.
|
167
|
+
*/
|
168
|
+
attribute double test_double;
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Complex string attribute that tests the adapter's core
|
172
|
+
* functionality.
|
173
|
+
* It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
|
174
|
+
* For CORBA to SDK, the CORBA client will be written with this attrib.
|
175
|
+
* For SDK to CORBA, the CORBA server will be written with this attrib.
|
176
|
+
* The attribute gets mapped to get_test_string and set_test_string in
|
177
|
+
* the adapter.
|
178
|
+
*/
|
179
|
+
attribute string test_string;
|
180
|
+
};
|
181
|
+
};
|
@@ -0,0 +1,181 @@
|
|
1
|
+
// Description : Data type tester
|
2
|
+
|
3
|
+
typedef long longT;
|
4
|
+
typedef short shortT;
|
5
|
+
typedef unsigned long ulongT;
|
6
|
+
typedef unsigned short ushortT;
|
7
|
+
typedef octet octetT;
|
8
|
+
typedef char charT;
|
9
|
+
typedef float floatT;
|
10
|
+
typedef double doubleT;
|
11
|
+
typedef boolean boolT;
|
12
|
+
typedef string stringT;
|
13
|
+
|
14
|
+
interface demoInt1 {
|
15
|
+
|
16
|
+
void void_op ();
|
17
|
+
|
18
|
+
longT long_op (in longT i, inout longT io, out longT o);
|
19
|
+
ulongT ulong_op (in ulongT i, inout ulongT io, out ulongT o);
|
20
|
+
shortT short_op (in shortT i, inout shortT io, out shortT o);
|
21
|
+
ushortT ushort_op (in ushortT i, inout ushortT io, out ushortT o);
|
22
|
+
octetT octet_op (in octetT i, inout octetT io, out octetT o);
|
23
|
+
charT char_op (in charT i, inout charT io, out charT o);
|
24
|
+
floatT float_op (in floatT i, inout floatT io, out floatT o);
|
25
|
+
doubleT double_op (in doubleT i, inout doubleT io, out doubleT o);
|
26
|
+
boolT boolean_op (in boolT i, inout boolT io, out boolT o);
|
27
|
+
stringT string_op (in stringT i, inout stringT io, out stringT o);
|
28
|
+
|
29
|
+
};
|
30
|
+
|
31
|
+
//
|
32
|
+
// demoInt2
|
33
|
+
//
|
34
|
+
|
35
|
+
struct pstruct {
|
36
|
+
long long_m;
|
37
|
+
unsigned long ulong_m;
|
38
|
+
short short_m;
|
39
|
+
unsigned short ushort_m;
|
40
|
+
octet octet_m;
|
41
|
+
char char_m;
|
42
|
+
float float_m;
|
43
|
+
double double_m;
|
44
|
+
boolean boolean_m;
|
45
|
+
string string_m;
|
46
|
+
};
|
47
|
+
|
48
|
+
typedef pstruct pstructT;
|
49
|
+
|
50
|
+
typedef sequence<long> long_seq;
|
51
|
+
typedef sequence<unsigned long> ulong_seq;
|
52
|
+
typedef sequence<short> short_seq;
|
53
|
+
typedef sequence<unsigned short> ushort_seq;
|
54
|
+
typedef sequence<octet> octet_seq;
|
55
|
+
typedef sequence<char> char_seq;
|
56
|
+
typedef sequence<float> float_seq;
|
57
|
+
typedef sequence<double> double_seq;
|
58
|
+
typedef sequence<boolean> boolean_seq;
|
59
|
+
typedef sequence<string> string_seq;
|
60
|
+
|
61
|
+
typedef sequence<pstruct> pstruct_seq;
|
62
|
+
|
63
|
+
interface demoInt2 {
|
64
|
+
pstruct pstruct_op(in pstruct i,
|
65
|
+
inout pstruct io,
|
66
|
+
out pstruct o);
|
67
|
+
long_seq long_seq_op(in long_seq i,
|
68
|
+
inout long_seq io,
|
69
|
+
out long_seq o);
|
70
|
+
ulong_seq ulong_seq_op(in ulong_seq i,
|
71
|
+
inout ulong_seq io,
|
72
|
+
out ulong_seq o);
|
73
|
+
short_seq short_seq_op(in short_seq i,
|
74
|
+
inout short_seq io,
|
75
|
+
out short_seq o);
|
76
|
+
ushort_seq ushort_seq_op(in ushort_seq i,
|
77
|
+
inout ushort_seq io,
|
78
|
+
out ushort_seq o);
|
79
|
+
octet_seq octet_seq_op(in octet_seq i,
|
80
|
+
inout octet_seq io,
|
81
|
+
out octet_seq o);
|
82
|
+
char_seq char_seq_op(in char_seq i,
|
83
|
+
inout char_seq io,
|
84
|
+
out char_seq o);
|
85
|
+
float_seq float_seq_op(in float_seq i,
|
86
|
+
inout float_seq io,
|
87
|
+
out float_seq o);
|
88
|
+
double_seq double_seq_op(in double_seq i,
|
89
|
+
inout double_seq io,
|
90
|
+
out double_seq o);
|
91
|
+
boolean_seq boolean_seq_op(in boolean_seq i,
|
92
|
+
inout boolean_seq io,
|
93
|
+
out boolean_seq o);
|
94
|
+
string_seq string_seq_op(in string_seq i,
|
95
|
+
inout string_seq io,
|
96
|
+
out string_seq o);
|
97
|
+
pstruct_seq pstruct_seq_op(in pstruct_seq i,
|
98
|
+
inout pstruct_seq io,
|
99
|
+
out pstruct_seq o);
|
100
|
+
};
|
101
|
+
|
102
|
+
//
|
103
|
+
// demoInt3
|
104
|
+
//
|
105
|
+
|
106
|
+
const longT long_c = 1;
|
107
|
+
const shortT short_c = 2;
|
108
|
+
const ulongT ulong_c = 3;
|
109
|
+
const ushortT ushort_c = 4;
|
110
|
+
const charT char_c = 'X';
|
111
|
+
const floatT float_c = 7.0;
|
112
|
+
const doubleT double_c = 8.0;
|
113
|
+
const boolT bool_c = TRUE;
|
114
|
+
|
115
|
+
enum penum {
|
116
|
+
zero, one, two, three, four, five
|
117
|
+
};
|
118
|
+
|
119
|
+
union punion switch (penum) {
|
120
|
+
case zero:
|
121
|
+
longT long_m;
|
122
|
+
case one:
|
123
|
+
doubleT double_m;
|
124
|
+
case two:
|
125
|
+
stringT string_m;
|
126
|
+
case three:
|
127
|
+
pstruct pstruct_m;
|
128
|
+
case four:
|
129
|
+
penum enum_m;
|
130
|
+
default:
|
131
|
+
string_seq seq_m;
|
132
|
+
};
|
133
|
+
|
134
|
+
typedef longT long_arr[10];
|
135
|
+
typedef doubleT double_arr[10];
|
136
|
+
typedef stringT string_arr[10];
|
137
|
+
typedef pstruct pstruct_arr[10];
|
138
|
+
|
139
|
+
struct long_arr_struct {
|
140
|
+
long_arr val;
|
141
|
+
};
|
142
|
+
|
143
|
+
struct double_arr_struct {
|
144
|
+
double_arr val;
|
145
|
+
};
|
146
|
+
|
147
|
+
struct string_arr_struct {
|
148
|
+
string_arr val;
|
149
|
+
};
|
150
|
+
|
151
|
+
struct pstruct_arr_struct {
|
152
|
+
pstruct_arr val;
|
153
|
+
};
|
154
|
+
|
155
|
+
interface demoInt3 {
|
156
|
+
const longT long_c = 1;
|
157
|
+
const shortT short_c = 2;
|
158
|
+
const ulongT ulong_c = 3;
|
159
|
+
const ushortT ushort_c = 4;
|
160
|
+
const charT char_c = 'X';
|
161
|
+
const floatT float_c = 7.0;
|
162
|
+
const doubleT double_c = 8.0;
|
163
|
+
const boolT bool_c = TRUE;
|
164
|
+
|
165
|
+
penum penum_op(in penum i, inout penum io, out penum o);
|
166
|
+
punion punion_op(in punion i, inout punion io, out punion o);
|
167
|
+
|
168
|
+
long_arr long_arr_op(in long_arr i,
|
169
|
+
inout long_arr io,
|
170
|
+
out long_arr o);
|
171
|
+
double_arr double_arr_op(in double_arr i,
|
172
|
+
inout double_arr io,
|
173
|
+
out double_arr o);
|
174
|
+
string_arr string_arr_op(in string_arr i,
|
175
|
+
inout string_arr io,
|
176
|
+
out string_arr o);
|
177
|
+
pstruct_arr pstruct_arr_op(in pstruct_arr i,
|
178
|
+
inout pstruct_arr io,
|
179
|
+
out pstruct_arr o);
|
180
|
+
};
|
181
|
+
|
@@ -0,0 +1,60 @@
|
|
1
|
+
// Tests for interoperability between ORBs for sending wchar data
|
2
|
+
// The CDR defines separate serialization functions for reading and writing
|
3
|
+
// wchar, wchar[] and wstring data. Encapsulated wchar data is also tested.
|
4
|
+
|
5
|
+
module interop {
|
6
|
+
typedef wchar warray[10];
|
7
|
+
|
8
|
+
struct wstruct {
|
9
|
+
wchar st_char;
|
10
|
+
wstring st_string;
|
11
|
+
warray st_array;
|
12
|
+
any st_any;
|
13
|
+
};
|
14
|
+
|
15
|
+
enum wchar_types {is_wchar, is_wstring, is_warray};
|
16
|
+
|
17
|
+
union wunion switch (wchar_types) {
|
18
|
+
case is_wchar: wchar u_char;
|
19
|
+
case is_wstring: wstring u_string;
|
20
|
+
case is_warray: warray u_array;
|
21
|
+
};
|
22
|
+
|
23
|
+
interface WChar_Passer {
|
24
|
+
// The server and client for this test should both use a well known test
|
25
|
+
// data to allow individual string comparisons against reference strings.
|
26
|
+
// The separate test key value allows the tester to devise several strings,
|
27
|
+
// arrays, or wchar values that may be tested separately.
|
28
|
+
|
29
|
+
readonly attribute string orb_name;
|
30
|
+
|
31
|
+
boolean wchar_to_server (in wchar test, in short key);
|
32
|
+
wchar wchar_from_server (in short key);
|
33
|
+
|
34
|
+
boolean wstring_to_server (in wstring test, in short key);
|
35
|
+
wstring wstring_from_server (in short key);
|
36
|
+
|
37
|
+
boolean warray_to_server (in warray test, in short key);
|
38
|
+
warray warray_from_server (in short key);
|
39
|
+
|
40
|
+
boolean wstruct_to_server (in wstruct test, in short key);
|
41
|
+
wstruct wstruct_from_server (in short key);
|
42
|
+
|
43
|
+
boolean wunion_to_server (in wunion test, in short key);
|
44
|
+
wunion wunion_from_server (in short key, in wchar_types type);
|
45
|
+
|
46
|
+
boolean any_to_server (in any test, in short key);
|
47
|
+
any any_from_server (in short key, in wchar_types type);
|
48
|
+
|
49
|
+
any any_echo (in any test);
|
50
|
+
|
51
|
+
exception WStringException { wstring why; wchar whynot;};
|
52
|
+
void exception_test(in short key) raises (WStringException);
|
53
|
+
|
54
|
+
/// A method to shutdown the ORB
|
55
|
+
/**
|
56
|
+
* This method is used to simplify the test shutdown process
|
57
|
+
*/
|
58
|
+
oneway void shutdown ();
|
59
|
+
};
|
60
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
const unsigned long hex16 = 0x10;
|
2
|
+
const unsigned long oct8 = 010;
|
3
|
+
const unsigned long dec10 = 10;
|
4
|
+
|
5
|
+
const short l = 4;
|
6
|
+
|
7
|
+
enum N { zero, un , deux, trois };
|
8
|
+
|
9
|
+
exception E {
|
10
|
+
short cause ;
|
11
|
+
};
|
12
|
+
|
13
|
+
exception F {
|
14
|
+
long type ;
|
15
|
+
};
|
16
|
+
|
17
|
+
module M {
|
18
|
+
const short l = 4;
|
19
|
+
|
20
|
+
enum N { zero, un , deux, trois };
|
21
|
+
|
22
|
+
exception E {
|
23
|
+
short cause ;
|
24
|
+
};
|
25
|
+
|
26
|
+
interface A {
|
27
|
+
const short l = 4;
|
28
|
+
|
29
|
+
enum N { zero, un , deux, trois };
|
30
|
+
|
31
|
+
exception E {
|
32
|
+
short cause ;
|
33
|
+
};
|
34
|
+
N foo(in N x, out N y, inout N z) raises (E, F) ;
|
35
|
+
};
|
36
|
+
};
|
37
|
+
|