aaronp-zomg 1.0.2.20080827232412

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. data/History.txt +25 -0
  2. data/Manifest.txt +238 -0
  3. data/README.txt +59 -0
  4. data/Rakefile +43 -0
  5. data/bin/omfg +56 -0
  6. data/lib/scanner.rex +169 -0
  7. data/lib/yacc.y +861 -0
  8. data/lib/zomg.rb +22 -0
  9. data/lib/zomg/idl.rb +14 -0
  10. data/lib/zomg/idl/nodes/attribute.rb +15 -0
  11. data/lib/zomg/idl/nodes/binary.rb +19 -0
  12. data/lib/zomg/idl/nodes/constant.rb +15 -0
  13. data/lib/zomg/idl/nodes/interface.rb +13 -0
  14. data/lib/zomg/idl/nodes/interface_header.rb +14 -0
  15. data/lib/zomg/idl/nodes/member.rb +14 -0
  16. data/lib/zomg/idl/nodes/node.rb +54 -0
  17. data/lib/zomg/idl/nodes/operation.rb +17 -0
  18. data/lib/zomg/idl/nodes/parameter.rb +18 -0
  19. data/lib/zomg/idl/nodes/typedef.rb +13 -0
  20. data/lib/zomg/idl/nodes/union.rb +14 -0
  21. data/lib/zomg/idl/parser.rb +54 -0
  22. data/lib/zomg/idl/visitable.rb +15 -0
  23. data/lib/zomg/idl/visitors/duhr.rb +24 -0
  24. data/lib/zomg/idl/visitors/ruby_sexp.rb +204 -0
  25. data/lib/zomg/idl/visitors/sexp.rb +274 -0
  26. data/lib/zomg/version.rb +3 -0
  27. data/test/assets/array/array1.idl +60 -0
  28. data/test/assets/array/array2.idl +38 -0
  29. data/test/assets/array/array3.idl +8 -0
  30. data/test/assets/array/array4.idl +7 -0
  31. data/test/assets/array/array5.idl +80 -0
  32. data/test/assets/attribute/grid_0attribs_2methods.idl +16 -0
  33. data/test/assets/attribute/grid_1ROattribs_1attribs_0methods.idl +19 -0
  34. data/test/assets/attribute/grid_1ROattribs_1attribs_1methods.idl +19 -0
  35. data/test/assets/attribute/grid_1ROattribs_1attribs_2methods.idl +17 -0
  36. data/test/assets/attribute/grid_1ROattribs_1methods.idl +16 -0
  37. data/test/assets/attribute/grid_1ROattribs_2methods.idl +16 -0
  38. data/test/assets/attribute/grid_1attribs_1methods.idl +17 -0
  39. data/test/assets/attribute/grid_1attribs_2methods.idl +17 -0
  40. data/test/assets/attribute/grid_2ROattribs_0methods.idl +16 -0
  41. data/test/assets/attribute/grid_2ROattribs_1methods.idl +16 -0
  42. data/test/assets/attribute/grid_2ROattribs_2methods.idl +16 -0
  43. data/test/assets/attribute/grid_2attribs_0methods.idl +19 -0
  44. data/test/assets/attribute/grid_2attribs_1methods.idl +19 -0
  45. data/test/assets/attribute/grid_2attribs_2methods.idl +19 -0
  46. data/test/assets/comment/c_style_comments.idl +63 -0
  47. data/test/assets/comment/comment1.idl +57 -0
  48. data/test/assets/comment/cpp_style_comments.idl +168 -0
  49. data/test/assets/comment/shortform.idl +0 -0
  50. data/test/assets/complex/TestCodeSets.idl +10 -0
  51. data/test/assets/complex/TestIntfContext.idl +13 -0
  52. data/test/assets/complex/TestIntfLongLong.idl +51 -0
  53. data/test/assets/complex/TestIntfWChar.idl +52 -0
  54. data/test/assets/complex/any1.idl +22 -0
  55. data/test/assets/complex/complex1.idl +495 -0
  56. data/test/assets/complex/complex2.idl +730 -0
  57. data/test/assets/complex/complex3.idl +181 -0
  58. data/test/assets/complex/complex4.idl +181 -0
  59. data/test/assets/complex/interop_wchar.idl +60 -0
  60. data/test/assets/constant/constant1.idl +37 -0
  61. data/test/assets/constant/constant2.idl +29 -0
  62. data/test/assets/constant/constant3.idl +50 -0
  63. data/test/assets/constant/constant4.idl +21 -0
  64. data/test/assets/constant/constant5.idl +65 -0
  65. data/test/assets/constant/constant6.idl +144 -0
  66. data/test/assets/constant/constant7.idl +30 -0
  67. data/test/assets/enum/enum1.idl +13 -0
  68. data/test/assets/exception/TestIntfExceptions.idl +69 -0
  69. data/test/assets/exception/TestIntfExceptionsExt_2_0.idl +34 -0
  70. data/test/assets/exception/TestIntfExceptionsExt_2_3.idl +24 -0
  71. data/test/assets/exception/ex1.idl +6 -0
  72. data/test/assets/exception/ex2.idl +18 -0
  73. data/test/assets/exception/ex3.idl +10 -0
  74. data/test/assets/exception/ex4.idl +20 -0
  75. data/test/assets/exception/sc.idl +0 -0
  76. data/test/assets/exception/simple1.idl +18 -0
  77. data/test/assets/exception/simple2.idl +25 -0
  78. data/test/assets/factory/factory1.idl +77 -0
  79. data/test/assets/factory/objref.idl +25 -0
  80. data/test/assets/forward/forward.idl +15 -0
  81. data/test/assets/forward/forward1.idl +13 -0
  82. data/test/assets/forward/fwd_incl1.idl +6 -0
  83. data/test/assets/forward/fwd_incl2.idl +7 -0
  84. data/test/assets/include/a.idl +23 -0
  85. data/test/assets/include/b.idl +16 -0
  86. data/test/assets/include/employee.idl +12 -0
  87. data/test/assets/include/include1.idl +10 -0
  88. data/test/assets/include/include2.idl +5 -0
  89. data/test/assets/include/manager.idl +10 -0
  90. data/test/assets/include/pragma.idl +41 -0
  91. data/test/assets/include/rookie.idl +13 -0
  92. data/test/assets/include/rookiemanager.idl +15 -0
  93. data/test/assets/include/sample.idl +58 -0
  94. data/test/assets/include/sample_incl.idl +406 -0
  95. data/test/assets/inherit/IDL1.idl +18 -0
  96. data/test/assets/inherit/IDL2.idl +18 -0
  97. data/test/assets/inherit/IDL3.idl +18 -0
  98. data/test/assets/inherit/IDL4.idl +17 -0
  99. data/test/assets/inherit/diamond_inheritance.idl +31 -0
  100. data/test/assets/inherit/inherit.idl +27 -0
  101. data/test/assets/limit/longidentifiers.idl +25 -0
  102. data/test/assets/limit/namelens.idl +26 -0
  103. data/test/assets/limit/tpztest.idl +21 -0
  104. data/test/assets/module/module1.idl +29 -0
  105. data/test/assets/module/module2.idl +34 -0
  106. data/test/assets/module/module3.idl +20 -0
  107. data/test/assets/module/module4.idl +15 -0
  108. data/test/assets/nested/nested1.idl +5 -0
  109. data/test/assets/nested/nested2.idl +11 -0
  110. data/test/assets/operations/Benchmark.idl +331 -0
  111. data/test/assets/operations/CCS.idl +82 -0
  112. data/test/assets/operations/TestIntf.idl +40 -0
  113. data/test/assets/operations/TestIntfBasic.idl +653 -0
  114. data/test/assets/operations/atomic.idl +40 -0
  115. data/test/assets/operations/dif2.idl +48 -0
  116. data/test/assets/operations/interface1.idl +16 -0
  117. data/test/assets/operations/parameters.idl +111 -0
  118. data/test/assets/operations/perf.idl +84 -0
  119. data/test/assets/operations/timer.idl +104 -0
  120. data/test/assets/preprocess/base_for_diamond_inheritance_with_macros.idl +17 -0
  121. data/test/assets/preprocess/basic_macro_marshalling.idl +54 -0
  122. data/test/assets/preprocess/diamond_inheritance_with_macros.idl +74 -0
  123. data/test/assets/preprocess/macro1.idl +52 -0
  124. data/test/assets/preprocess/preprocess1.idl +246 -0
  125. data/test/assets/preprocess/preprocess2.idl +3 -0
  126. data/test/assets/recursion/loop.idl +28 -0
  127. data/test/assets/recursion/recursion1.idl +47 -0
  128. data/test/assets/recursion/recursion2.idl +74 -0
  129. data/test/assets/scenarios/filestat.idl +69 -0
  130. data/test/assets/scenarios/gateway.idl +176 -0
  131. data/test/assets/scenarios/library.idl +20 -0
  132. data/test/assets/scenarios/phone.idl +24 -0
  133. data/test/assets/scenarios/ticketservice.idl +118 -0
  134. data/test/assets/scope/scope01.idl +58 -0
  135. data/test/assets/scope/scope02.idl +25 -0
  136. data/test/assets/scope/scope03.idl +22 -0
  137. data/test/assets/scope/scope04.idl +27 -0
  138. data/test/assets/scope/scope05.idl +30 -0
  139. data/test/assets/scope/scope06.idl +51 -0
  140. data/test/assets/scope/scope07.idl +20 -0
  141. data/test/assets/scope/scope08.idl +88 -0
  142. data/test/assets/scope/scope09.idl +21 -0
  143. data/test/assets/scope/scope10.idl +95 -0
  144. data/test/assets/scope/scope11.idl +62 -0
  145. data/test/assets/scope/scope12.idl +117 -0
  146. data/test/assets/scope/scope13.idl +117 -0
  147. data/test/assets/scope/scope14.idl +117 -0
  148. data/test/assets/scope/scope15.idl +117 -0
  149. data/test/assets/scope/scope16.idl +117 -0
  150. data/test/assets/scope/scope17.idl +117 -0
  151. data/test/assets/scope/scope18.idl +117 -0
  152. data/test/assets/scope/scope19.idl +117 -0
  153. data/test/assets/scope/scope20.idl +215 -0
  154. data/test/assets/scope/scope21.idl +215 -0
  155. data/test/assets/scope/scope22.idl +205 -0
  156. data/test/assets/scope/scope23.idl +261 -0
  157. data/test/assets/scope/scope24.idl +376 -0
  158. data/test/assets/scope/scope25.idl +266 -0
  159. data/test/assets/scope/scope26.idl +180 -0
  160. data/test/assets/scope/scope27.idl +184 -0
  161. data/test/assets/scope/scope28.idl +182 -0
  162. data/test/assets/scope/scope29.idl +182 -0
  163. data/test/assets/scope/scope30.idl +40 -0
  164. data/test/assets/scope/scope31.idl +33 -0
  165. data/test/assets/scope/scope32.idl +37 -0
  166. data/test/assets/scope/scope33.idl +50 -0
  167. data/test/assets/scope/scope34.idl +97 -0
  168. data/test/assets/scope/scope35.idl +72 -0
  169. data/test/assets/scope/scope36.idl +167 -0
  170. data/test/assets/scope/scope37.idl +57 -0
  171. data/test/assets/scope/scope38.idl +38 -0
  172. data/test/assets/scope/scope39.idl +38 -0
  173. data/test/assets/scope/scope40.idl +38 -0
  174. data/test/assets/scope/scope41.idl +24 -0
  175. data/test/assets/scope/scope42.idl +64 -0
  176. data/test/assets/scope/scope43.idl +66 -0
  177. data/test/assets/scope/scope44.idl +52 -0
  178. data/test/assets/sequence/sequence1.idl +24 -0
  179. data/test/assets/sequence/sequence2.idl +9 -0
  180. data/test/assets/simple/basictypes1.idl +80 -0
  181. data/test/assets/simple/basictypes2.idl +197 -0
  182. data/test/assets/simple/basictypes3.idl +23 -0
  183. data/test/assets/simple/basictypes4.idl +73 -0
  184. data/test/assets/simple/basictypes5.idl +29 -0
  185. data/test/assets/simple/basictypes6.idl +63 -0
  186. data/test/assets/simple/simple1.idl +45 -0
  187. data/test/assets/simple/simple2.idl +61 -0
  188. data/test/assets/simple/simple3.idl +36 -0
  189. data/test/assets/string/string1.idl +11 -0
  190. data/test/assets/string/string2.idl +29 -0
  191. data/test/assets/struct/struct1.idl +20 -0
  192. data/test/assets/struct/struct2.idl +21 -0
  193. data/test/assets/struct/struct3.idl +42 -0
  194. data/test/assets/struct/struct4.idl +57 -0
  195. data/test/assets/struct/struct5.idl +71 -0
  196. data/test/assets/typecode/orb.idl +0 -0
  197. data/test/assets/typecode/pseudo.idl +25 -0
  198. data/test/assets/typedef/shorthand_typedef_struct_insideIF.idl +17 -0
  199. data/test/assets/typedef/shorthand_typedef_struct_insideIF_noMO.idl +16 -0
  200. data/test/assets/typedef/shorthand_typedef_struct_insideMO.idl +17 -0
  201. data/test/assets/typedef/shorthand_typedef_struct_outsideMO.idl +17 -0
  202. data/test/assets/typedef/typedef1.idl +8 -0
  203. data/test/assets/typedef/typedef2.idl +22 -0
  204. data/test/assets/typedef/typedef_struct_insideIF.idl +18 -0
  205. data/test/assets/typedef/typedef_struct_insideMO.idl +18 -0
  206. data/test/assets/typedef/typedef_struct_outsideMO.idl +18 -0
  207. data/test/assets/union/union1.idl +31 -0
  208. data/test/assets/union/union2.idl +22 -0
  209. data/test/assets/union/union3.idl +26 -0
  210. data/test/conversions/test_attribute.rb +46 -0
  211. data/test/conversions/test_enum.rb +25 -0
  212. data/test/conversions/test_exception.rb +24 -0
  213. data/test/conversions/test_forward_declaration.rb +22 -0
  214. data/test/conversions/test_interface.rb +30 -0
  215. data/test/conversions/test_module.rb +24 -0
  216. data/test/conversions/test_struct.rb +25 -0
  217. data/test/conversions/test_typedef.rb +22 -0
  218. data/test/conversions/test_union.rb +27 -0
  219. data/test/conversions/test_value_box_dcl.rb +22 -0
  220. data/test/helper.rb +23 -0
  221. data/test/simple/test_basictypes1.rb +87 -0
  222. data/test/simple/test_basictypes2.rb +18 -0
  223. data/test/simple/test_basictypes3.rb +32 -0
  224. data/test/simple/test_basictypes4.rb +25 -0
  225. data/test/simple/test_basictypes5.rb +17 -0
  226. data/test/simple/test_basictypes6.rb +19 -0
  227. data/test/simple/test_simple1.rb +40 -0
  228. data/test/simple/test_simple2.rb +48 -0
  229. data/test/simple/test_simple3.rb +20 -0
  230. data/test/test_array.rb +22 -0
  231. data/test/test_assets.rb +33 -0
  232. data/test/test_complex.rb +17 -0
  233. data/test/test_node.rb +16 -0
  234. data/test/test_parser.rb +17 -0
  235. data/test/test_scanner.rb +234 -0
  236. metadata +334 -0
@@ -0,0 +1,23 @@
1
+ interface ex1
2
+ {
3
+ attribute long l1;
4
+ long m1(in long a);
5
+ ex1 mtypes(
6
+ in long a1, inout long a2, out long a3,
7
+ in unsigned long b1, inout unsigned long b2, out unsigned long b3,
8
+ in short c1,inout short c2, out short c3,
9
+ in unsigned short d1, inout unsigned short d2, out unsigned short d3,
10
+ in float e1, inout float e2, out float e3,
11
+ in double f1, inout double f2, out double f3,
12
+ in char g1, inout char g2, out char g3
13
+ );
14
+
15
+ };
16
+
17
+ interface ex2 : ex1
18
+ {
19
+ readonly attribute long l2;
20
+
21
+ long m2(in long a, out long b);
22
+ void mv();
23
+ };
@@ -0,0 +1,73 @@
1
+ module DCOM_Tests // OMG IDL
2
+ {
3
+ interface BasicTypesTest
4
+ {
5
+ typedef string<10> BndString;
6
+
7
+ attribute boolean boolTest;
8
+ attribute char charTest;
9
+ attribute double doubleTest;
10
+ attribute float floatTest;
11
+ attribute long longTest;
12
+ attribute octet octetTest;
13
+ attribute short shortTest;
14
+ attribute string stringTest;
15
+ attribute BndString stringnTest;
16
+ attribute unsigned long ulongTest;
17
+ attribute unsigned short ushortTest;
18
+ readonly attribute short readonlyShortTest;
19
+
20
+ // Sets all the attributes
21
+ boolean setAll (
22
+ in boolean boolTest,
23
+ in char charTest,
24
+ in double doubleTest,
25
+ in float floatTest,
26
+ in long longTest,
27
+ in octet octetTest,
28
+ in short shortTest,
29
+ in string stringTest,
30
+ in BndString stringnTest,
31
+ in unsigned long ulongTest,
32
+ in unsigned short ushortTest);
33
+
34
+ // Gets all the attributes
35
+ boolean getAll (
36
+ out boolean boolTest,
37
+ out char charTest,
38
+ out double doubleTest,
39
+ out float floatTest,
40
+ out long longTest,
41
+ out octet octetTest,
42
+ out short shortTest,
43
+ out string stringTest,
44
+ out BndString stringnTest,
45
+ out unsigned long ulongTest,
46
+ out unsigned short ushortTest);
47
+
48
+ boolean setAndIncrement (
49
+ inout boolean boolTest,
50
+ inout char charTest,
51
+ inout double doubleTest,
52
+ inout float floatTest,
53
+ inout long longTest,
54
+ inout octet octetTest,
55
+ inout short shortTest,
56
+ inout string stringTest,
57
+ inout BndString stringnTest,
58
+ inout unsigned long ulongTest,
59
+ inout unsigned short ushortTest);
60
+
61
+ boolean boolReturn ();
62
+ char charReturn ();
63
+ double doubleReturn();
64
+ float floatReturn();
65
+ long longReturn ();
66
+ octet octetReturn();
67
+ short shortReturn ();
68
+ string stringReturn();
69
+ BndString stringnReturn();
70
+ unsigned long ulongReturn ();
71
+ unsigned short ushortReturn();
72
+ }; // End of Interface TypesTest
73
+ }; // End of Module MyModule
@@ -0,0 +1,29 @@
1
+ exception not_implemented {};
2
+
3
+ interface apiServer {
4
+
5
+ char charOp(in char c1, inout char c2, out char c3);
6
+
7
+ octet octetOp(in octet o1, inout octet o2, out octet o3);
8
+
9
+ boolean booleanOp(in boolean b1, inout boolean b2, out boolean b3);
10
+
11
+ short shortOp(in short s1, inout short s2, out short s3);
12
+
13
+ long longOp(in long l1, inout long l2, out long l3);
14
+
15
+ float floatOp(in float f1, inout float f2, out float f3);
16
+
17
+ double doubleOp(in double d1, inout double d2, out double d3);
18
+
19
+ string stringOp(in string s1, inout string s2, out string s3);
20
+
21
+ unsigned short ushortOp(in unsigned short us1,
22
+ inout unsigned short us2,
23
+ out unsigned short us3);
24
+
25
+ unsigned long ulongOp(in unsigned long ul1, inout unsigned long ul2,
26
+ out unsigned long ul3);
27
+
28
+ long increment(in long num);
29
+ };
@@ -0,0 +1,63 @@
1
+ typedef short shortType;
2
+ struct zahl {
3
+
4
+ short day;
5
+ short hour;
6
+ };
7
+
8
+ union testUnion switch(short)
9
+ {
10
+ case 0: short s;
11
+ case 1: long l;
12
+ default: double d;
13
+ };
14
+
15
+ enum size { SMALL, MEDIUM, LARGE };
16
+
17
+
18
+ interface Hello
19
+ {
20
+ exception NoValid{};
21
+ union U switch (char)
22
+ {
23
+
24
+ case 'L':
25
+ long long_mem;
26
+ case 'c':
27
+ case 'C':
28
+ char char_mem;
29
+ default:
30
+ string string_mem;
31
+ };
32
+
33
+ typedef long LongArray[3];
34
+ typedef sequence<long> longSeq ;
35
+
36
+ void lookForValue() raises(NoValid);
37
+ void say_hello();
38
+ double returnDouble();
39
+ long returnLong();
40
+ unsigned long returnUlong();
41
+ float returnFloat();
42
+ long long returnLonglong();
43
+ unsigned long long returnUlonglong();
44
+ char returnChar();
45
+ boolean returnBoolean();
46
+ shortType returnShort();
47
+ unsigned short returnUshort();
48
+ octet returnOctet();
49
+ zahl returnStruct();
50
+ size returnEnum();
51
+ string returnString();
52
+ wstring returnWstring();
53
+ longSeq returnSequence();
54
+ U returnUnion();
55
+ LongArray returnArray();
56
+ any returnTKWstring();
57
+ any returnTKStruct();
58
+ any returnTKUnion();
59
+ any returnTKEnum();
60
+ any returnTKSequence();
61
+ any returnTKArray();
62
+
63
+ };
@@ -0,0 +1,45 @@
1
+ // Description : CORBA IDL containing an interface that
2
+ // has a one-way method invocation
3
+
4
+ /**
5
+ * Module that contains interfaces for simple tests. IDLs contained in
6
+ * this module includes the following:
7
+ * <UL>
8
+ * <LI>Simple data types including strings, longs, chars, etc.
9
+ * <LI>Interface that contains One-way operations
10
+ * </UL>
11
+ * @author Kunal Ashar
12
+ * @version 1.0
13
+ */
14
+ module OneWaySimpleTest
15
+ {
16
+ /**
17
+ * One-way interface for simple data types. Clients and servers written
18
+ * using this interface can be used with all services.
19
+ * @author Kunal Ashar
20
+ * @version 1.0
21
+ */
22
+ interface sim1wcor
23
+ {
24
+ /**
25
+ * Simple one-way method that tests the adapter's core functionality.
26
+ * It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
27
+ * For CORBA to SDK, the CORBA client will be written with this method.
28
+ * For SDK to CORBA, the CORBA server will be written with this method.
29
+ * @author Kunal Ashar
30
+ * @version 1.0
31
+ * @param String inStr: Pass in a string parameter to the method. The
32
+ * direction is "in" only. Typically, the string literal string
33
+ * "Invoking..." is passed into this parameter.
34
+ * @param Long inLong: Pass a Long parameter to the method. The direction
35
+ * is "in" only. Typically, the value 99999999 is passed into the
36
+ * parameter
37
+ * @return void
38
+ */
39
+ oneway void OneWayMethod
40
+ (
41
+ in string inStr,
42
+ in long inLong
43
+ );
44
+ };
45
+ };
@@ -0,0 +1,61 @@
1
+ // Description : CORBA IDL containing an interface that
2
+ // has a two-way method invocation and a user exception
3
+ //****************************************************************************
4
+
5
+ /**
6
+ * Module that contains interfaces for simple tests. IDLs contained in
7
+ * this module includes the following:
8
+ * <UL>
9
+ * <LI>Simple data types including strings, longs, chars, etc.
10
+ * <LI>Interface that contains Two-way operations
11
+ * </UL>
12
+ * @author Kunal Ashar
13
+ * @version 1.0
14
+ */
15
+ module TwoWaySimpleTest
16
+ {
17
+ /**
18
+ * User exception that can be returned by the CORBA server
19
+ * @author Kunal Ashar
20
+ * @version 1.0
21
+ */
22
+ exception SimpleEx { };
23
+
24
+ /**
25
+ * Two-way interface for simple data types. Clients and servers written
26
+ * using this interface can be used with all services.
27
+ * @author Kunal Ashar
28
+ * @version 1.0
29
+ */
30
+ interface sim2wcor
31
+ {
32
+ /**
33
+ * Simple two-way method that tests the adapter's core functionality.
34
+ * It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
35
+ * For CORBA to SDK, the CORBA client will be written with this method.
36
+ * For SDK to CORBA, the CORBA server will be written with this method.
37
+ * @author Kunal Ashar
38
+ * @version 1.0
39
+ * @param String inStr: Pass in a string parameter to the method. The
40
+ * direction is "in" only. Typically, the string literal string
41
+ * "Invoking..." is passed into this parameter.
42
+ * @param Long inoutLong: Pass and return back a Long parameter to/from
43
+ * the method. The direction is both "in" and "out". Typically, the
44
+ * value 0 is passed into the parameter, and the value 99999999 is
45
+ * returned back.
46
+ * @param uShort outUShort: Return back an unsigned Short parameter from
47
+ * the method. The direction is "out" only . Typically, the value 1 is
48
+ * returned back via the parameter.
49
+ * @return String: Return a String data type via the return type.
50
+ * Typically, the string literal "Returning..." is sent through this
51
+ * parameter.
52
+ */
53
+ string TwoWayMethod
54
+ (
55
+ in string inStr,
56
+ inout long inoutLong,
57
+ out unsigned short outUShort
58
+ )
59
+ raises(SimpleEx);
60
+ };
61
+ };
@@ -0,0 +1,36 @@
1
+ // Description : CORBA IDL containing an attribute that causes the
2
+ // adapter to perform both one & two-way invocations
3
+
4
+ /**
5
+ * Module that contains interfaces for simple tests. IDLs contained in
6
+ * this module includes the following:
7
+ * <UL>
8
+ * <LI>Simple data types including strings, longs, chars, etc.
9
+ * <LI>Interface that contains attributes
10
+ * </UL>
11
+ * @author Kunal Ashar
12
+ * @version 1.0
13
+ */
14
+ module AttributesSimpleTest
15
+ {
16
+ /**
17
+ * Attribute interface for simple data types. Clients and servers written
18
+ * using this interface can be used with all services.
19
+ * @author Kunal Ashar
20
+ * @version 1.0
21
+ */
22
+ interface simattrcor
23
+ {
24
+ /**
25
+ * Simple attribute that tests the adapter's core functionality.
26
+ * It is used in both CORBA to SDK and SDK to CORBA two-way scenarios.
27
+ * For CORBA to SDK, the CORBA client will be written with this method.
28
+ * For SDK to CORBA, the CORBA server will be written with this method.
29
+ * @author Kunal Ashar
30
+ * @version 1.0
31
+ * @param String test: A CORBA attribute that gets mapped to get_test
32
+ * and set_test in the adapter
33
+ */
34
+ attribute string test;
35
+ };
36
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * String - in, inout, out, return
3
+ */
4
+ interface StringTest {
5
+ void m1( in string s );
6
+ void m2( out string s );
7
+
8
+ void m3( in string<5+2> s );
9
+ string m4( inout string s );
10
+ string<3+4-2> m5( out string<3+4-2> s );
11
+ };
@@ -0,0 +1,29 @@
1
+ struct str {
2
+ string<10> s10;
3
+ long a;
4
+ string sx;
5
+ short b;
6
+ };
7
+
8
+ typedef string longstr;
9
+ typedef string<25> shortstr;
10
+
11
+ interface test {
12
+ string StringOperation(in string a,
13
+ inout string b,
14
+ out string c);
15
+ longstr LongStringOperation(in longstr a,
16
+ inout longstr b,
17
+ out longstr c);
18
+ shortstr ShortStringOperation(in shortstr a,
19
+ inout shortstr b,
20
+ out shortstr c);
21
+ str StructOperation(in str a,
22
+ inout str b,
23
+ out str c);
24
+ };
25
+
26
+
27
+
28
+
29
+
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Struct with long, char, struct - in, out, return
3
+ */
4
+ struct S {
5
+ long a, b;
6
+ char c;
7
+ };
8
+
9
+ struct S2 {
10
+ long a;
11
+ S x;
12
+ };
13
+
14
+
15
+ interface foo {
16
+ void bar( in S s1, out S s2 );
17
+ void bar2( in S2 s );
18
+ S2 bar3();
19
+ };
20
+
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Fixed & Variable length structs - in, out, inout, return
3
+ */
4
+ /* Fixed length struct */
5
+ struct S {
6
+ long a, b;
7
+ char c;
8
+ };
9
+
10
+ /* Variable length struct */
11
+ struct S2 {
12
+ string a;
13
+ S x;
14
+ };
15
+
16
+
17
+ interface foo {
18
+ S bar( in S s1, out S s2, inout S s3 );
19
+ S2 bar1( in S2 s1, out S2 s2_obj, inout S2 s3_obj );
20
+ };
21
+
@@ -0,0 +1,42 @@
1
+ struct a {
2
+ struct b {
3
+ short c;
4
+ char d;
5
+ struct q {
6
+ boolean c;
7
+ long d;
8
+ } e;
9
+ short f;
10
+ q g;
11
+ } e;
12
+ struct q {
13
+ short a;
14
+ double b;
15
+ } h;
16
+ struct z {
17
+ struct zz {
18
+ q a;
19
+ } b;
20
+ q m;
21
+ } j;
22
+ float f;
23
+ b g;
24
+ q i;
25
+ };
26
+
27
+ struct b {
28
+ a::b c;
29
+ char d;
30
+ };
31
+
32
+ struct c {
33
+ a::b::q q;
34
+ a::z::zz z;
35
+ string s;
36
+ };
37
+
38
+ interface test {
39
+ a op1(in a s1, inout a s2, out a s3);
40
+ b op2(in b s1, inout b s2, out b s3);
41
+ c op3(in c s1, inout c s2, out c s3);
42
+ };