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,18 @@
|
|
1
|
+
// Description : Tests includes
|
2
|
+
// Comments : Top level IDL that includes IDL2.idl
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
#include <IDL2.idl>
|
6
|
+
module M1
|
7
|
+
{
|
8
|
+
interface I1
|
9
|
+
{
|
10
|
+
struct S1
|
11
|
+
{
|
12
|
+
short H1;
|
13
|
+
string R1;
|
14
|
+
};
|
15
|
+
|
16
|
+
M2::I2::S2 M1(in long L1, inout S1 s_obj1);
|
17
|
+
};
|
18
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// Description : Tests includes
|
2
|
+
// Comments : 2nd most nested IDL in include hierarchy
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
#include <IDL3.idl>
|
6
|
+
module M2
|
7
|
+
{
|
8
|
+
interface I2
|
9
|
+
{
|
10
|
+
struct S2
|
11
|
+
{
|
12
|
+
short H2;
|
13
|
+
string R2;
|
14
|
+
};
|
15
|
+
|
16
|
+
M3::I3::S3 M2(in long L2, out S2 s_obj2);
|
17
|
+
};
|
18
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// Description : Tests includes
|
2
|
+
// Comments : 3rd most nested IDL in includes hierarchy
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
#include <IDL4.idl>
|
6
|
+
module M3
|
7
|
+
{
|
8
|
+
interface I3
|
9
|
+
{
|
10
|
+
struct S3
|
11
|
+
{
|
12
|
+
short H3;
|
13
|
+
string R3;
|
14
|
+
};
|
15
|
+
|
16
|
+
M4::I4::S4 M3(in long L3, out S3 s_obj3);
|
17
|
+
};
|
18
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// Description : Tests includes
|
2
|
+
// Comments : Most nested IDL in includes hierarchy
|
3
|
+
//****************************************************************************
|
4
|
+
|
5
|
+
module M4
|
6
|
+
{
|
7
|
+
interface I4
|
8
|
+
{
|
9
|
+
struct S4
|
10
|
+
{
|
11
|
+
short H4;
|
12
|
+
string R4;
|
13
|
+
};
|
14
|
+
|
15
|
+
S4 M4(inout long L4, out S4 s_obj4);
|
16
|
+
};
|
17
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
interface MainGrid {
|
2
|
+
void getofMainGrid(in short n);
|
3
|
+
long setofMainGrid(in short n);
|
4
|
+
|
5
|
+
readonly attribute short length; // length of the gridmain
|
6
|
+
readonly attribute short breadth; // breadth of the gridmain
|
7
|
+
};
|
8
|
+
|
9
|
+
|
10
|
+
interface BaseGrid : MainGrid {
|
11
|
+
void getofBaseGrid(in short n);
|
12
|
+
long setofBaseGrid(in short n);
|
13
|
+
};
|
14
|
+
|
15
|
+
|
16
|
+
interface GridBase : MainGrid {
|
17
|
+
readonly attribute short base;
|
18
|
+
};
|
19
|
+
|
20
|
+
interface Grid : BaseGrid, GridBase {
|
21
|
+
readonly attribute short height; // height of the grid
|
22
|
+
readonly attribute short width; // width of the grid
|
23
|
+
|
24
|
+
// IDL operations
|
25
|
+
|
26
|
+
// set the element [n,m] of the grid, to value:
|
27
|
+
void set(in short n, in short m, in long value);
|
28
|
+
|
29
|
+
// return element [n,m] of the grid:
|
30
|
+
long get(in short n, in short m);
|
31
|
+
};
|
@@ -0,0 +1,27 @@
|
|
1
|
+
interface one {
|
2
|
+
void op_one();
|
3
|
+
};
|
4
|
+
|
5
|
+
interface two : one {
|
6
|
+
void op_two();
|
7
|
+
};
|
8
|
+
|
9
|
+
interface three : one {
|
10
|
+
void op_three();
|
11
|
+
};
|
12
|
+
|
13
|
+
interface four : two, three {
|
14
|
+
void op_four();
|
15
|
+
};
|
16
|
+
|
17
|
+
interface five : four, three, two {
|
18
|
+
void op_five();
|
19
|
+
};
|
20
|
+
|
21
|
+
interface factory_interface {
|
22
|
+
one get_one();
|
23
|
+
two get_two();
|
24
|
+
three get_three();
|
25
|
+
four get_four();
|
26
|
+
five get_five();
|
27
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
// Check all alphanumeric Characters
|
4
|
+
|
5
|
+
typedef float abcdefghijklmnopqrstuvwxyz_12343567890;
|
6
|
+
typedef long ABCDEFGHIJKLMNOPQRSTUVWXYZ;
|
7
|
+
|
8
|
+
//Check long identifiers
|
9
|
+
|
10
|
+
typedef short xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1;
|
11
|
+
typedef long xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2;
|
12
|
+
typedef double xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3;
|
13
|
+
typedef char xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4;
|
14
|
+
|
15
|
+
|
16
|
+
interface idlServer {
|
17
|
+
|
18
|
+
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4
|
19
|
+
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
|
20
|
+
in xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx4 p1,
|
21
|
+
out xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2 p2,
|
22
|
+
inout xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3 p3
|
23
|
+
);
|
24
|
+
};
|
25
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
interface onewaytest {
|
2
|
+
void n0 ();
|
3
|
+
void n01 ();
|
4
|
+
void n012 ();
|
5
|
+
void n0123 ();
|
6
|
+
void n01234 ();
|
7
|
+
void n012345 ();
|
8
|
+
void n0123456 ();
|
9
|
+
void n01234567 ();
|
10
|
+
void n012345678 ();
|
11
|
+
void n0123456789 ();
|
12
|
+
void n01234567890 ();
|
13
|
+
void n012345678901 ();
|
14
|
+
void n0123456789012 ();
|
15
|
+
void n01234567890123 ();
|
16
|
+
void n012345678901234 ();
|
17
|
+
void n0123456789012345 ();
|
18
|
+
void n01234567890123456 ();
|
19
|
+
void n012345678901234567 ();
|
20
|
+
void n0123456789012345678 ();
|
21
|
+
void n01234567890123456789 ();
|
22
|
+
void n012345678901234567890 ();
|
23
|
+
};
|
24
|
+
|
25
|
+
/* End of file. */
|
26
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
interface tpztest {
|
2
|
+
typedef octet flypayload[8192];
|
3
|
+
typedef octet lightpayload[16384];
|
4
|
+
typedef octet welterpayload[32768];
|
5
|
+
typedef octet mediumpayload[65536];
|
6
|
+
typedef octet heavypayload[131072];
|
7
|
+
typedef octet superheavypayload[262144];
|
8
|
+
|
9
|
+
flypayload rqst_rspn1();
|
10
|
+
lightpayload rqst_rspn2();
|
11
|
+
welterpayload rqst_rspn3();
|
12
|
+
mediumpayload rqst_rspn4();
|
13
|
+
heavypayload rqst_rspn5();
|
14
|
+
superheavypayload rqst_rspn6();
|
15
|
+
|
16
|
+
oneway void bandwidth(in flypayload pld);
|
17
|
+
superheavypayload bandwidth_pingback(in mediumpayload pld);
|
18
|
+
};
|
19
|
+
|
20
|
+
/* End of file. */
|
21
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
/**
|
2
|
+
* Scope resolution
|
3
|
+
*/
|
4
|
+
module M {
|
5
|
+
|
6
|
+
interface foo {
|
7
|
+
|
8
|
+
enum E {
|
9
|
+
A,
|
10
|
+
B,
|
11
|
+
C
|
12
|
+
};
|
13
|
+
|
14
|
+
void bar( in E e_obj );
|
15
|
+
};
|
16
|
+
|
17
|
+
};
|
18
|
+
|
19
|
+
|
20
|
+
module M2
|
21
|
+
{
|
22
|
+
|
23
|
+
interface foo
|
24
|
+
{
|
25
|
+
void bar( in M::foo::E e_obj );
|
26
|
+
};
|
27
|
+
|
28
|
+
};
|
29
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* Scope resolution with forward declarations
|
3
|
+
*/
|
4
|
+
module M1 {
|
5
|
+
typedef char A1;
|
6
|
+
};
|
7
|
+
|
8
|
+
module M2 {
|
9
|
+
typedef M1::A1 A2;
|
10
|
+
};
|
11
|
+
|
12
|
+
module M1 {
|
13
|
+
typedef M2::A2 A3;
|
14
|
+
};
|
15
|
+
|
16
|
+
// Here comes a nasty test with forward declarations
|
17
|
+
|
18
|
+
module M3 {
|
19
|
+
interface A;
|
20
|
+
};
|
21
|
+
|
22
|
+
module M4 {
|
23
|
+
struct S {
|
24
|
+
M3::A a;
|
25
|
+
};
|
26
|
+
//typedef M3::A X;
|
27
|
+
};
|
28
|
+
|
29
|
+
module M3 {
|
30
|
+
interface A {
|
31
|
+
attribute M4::S s;
|
32
|
+
};
|
33
|
+
};
|
34
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module mod1
|
2
|
+
{
|
3
|
+
module mod2
|
4
|
+
{
|
5
|
+
interface ex1
|
6
|
+
{
|
7
|
+
attribute long l1;
|
8
|
+
readonly attribute long l2;
|
9
|
+
|
10
|
+
long m1(in long a);
|
11
|
+
};
|
12
|
+
|
13
|
+
interface ex2 : ex1
|
14
|
+
{
|
15
|
+
attribute long l3;
|
16
|
+
|
17
|
+
long m2(in long a, out long b);
|
18
|
+
};
|
19
|
+
};
|
20
|
+
};
|
@@ -0,0 +1,331 @@
|
|
1
|
+
//
|
2
|
+
// User defined types
|
3
|
+
//
|
4
|
+
|
5
|
+
module UserTypes
|
6
|
+
{
|
7
|
+
|
8
|
+
enum discrim1 { e1, e2, e3 };
|
9
|
+
enum discrim2 { e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15 };
|
10
|
+
|
11
|
+
//
|
12
|
+
// Unions
|
13
|
+
//
|
14
|
+
union u1
|
15
|
+
switch (discrim1)
|
16
|
+
{
|
17
|
+
case e1: short s;
|
18
|
+
case e2: long l;
|
19
|
+
case e3: char c;
|
20
|
+
};
|
21
|
+
|
22
|
+
union u2
|
23
|
+
switch (discrim2)
|
24
|
+
{
|
25
|
+
case e4: long long ll;
|
26
|
+
case e5: unsigned short us;
|
27
|
+
case e6: unsigned long ul;
|
28
|
+
case e7: unsigned long long ull;
|
29
|
+
case e8: double d;
|
30
|
+
case e10: wchar wc;
|
31
|
+
case e11: string s;
|
32
|
+
case e13: boolean b;
|
33
|
+
case e14: octet o;
|
34
|
+
case e15: any a;
|
35
|
+
default: float f;
|
36
|
+
};
|
37
|
+
|
38
|
+
struct s1
|
39
|
+
{
|
40
|
+
short s;
|
41
|
+
};
|
42
|
+
|
43
|
+
struct s2
|
44
|
+
{
|
45
|
+
short s;
|
46
|
+
long l;
|
47
|
+
long long ll;
|
48
|
+
unsigned short us;
|
49
|
+
unsigned long ul;
|
50
|
+
float f;
|
51
|
+
double d;
|
52
|
+
char c;
|
53
|
+
wchar wc;
|
54
|
+
string st;
|
55
|
+
wstring ws;
|
56
|
+
boolean b;
|
57
|
+
octet o;
|
58
|
+
any a;
|
59
|
+
};
|
60
|
+
|
61
|
+
|
62
|
+
//
|
63
|
+
// User defined interface will test exchange of object references.
|
64
|
+
//
|
65
|
+
interface I
|
66
|
+
{
|
67
|
+
void foo();
|
68
|
+
short bar (in short s);
|
69
|
+
double d ();
|
70
|
+
};
|
71
|
+
|
72
|
+
}; // End module UserTypes
|
73
|
+
|
74
|
+
|
75
|
+
module Benchmark
|
76
|
+
{
|
77
|
+
|
78
|
+
|
79
|
+
//
|
80
|
+
// CORBA IDL Basic Types
|
81
|
+
//
|
82
|
+
interface BasicTester
|
83
|
+
{
|
84
|
+
void ping ();
|
85
|
+
|
86
|
+
void short_in_t (in short s);
|
87
|
+
void short_out_t (out short s);
|
88
|
+
void short_inout_t (inout short s);
|
89
|
+
short short_ret_t ();
|
90
|
+
|
91
|
+
void long_in_t (in long l);
|
92
|
+
void long_out_t (out long l);
|
93
|
+
void long_inout_t (inout long l);
|
94
|
+
long long_ret_t ();
|
95
|
+
|
96
|
+
void longlong_in_t (in long long ll);
|
97
|
+
void longlong_out_t (out long long ll);
|
98
|
+
void longlong_inout_t (inout long long ll);
|
99
|
+
long long longlong_ret_t ();
|
100
|
+
|
101
|
+
void ushort_in_t (in unsigned short us);
|
102
|
+
void ushort_out_t (out unsigned short us);
|
103
|
+
void ushort_inout_t (inout unsigned short us);
|
104
|
+
unsigned short ushort_ret_t ();
|
105
|
+
|
106
|
+
void ulong_in_t (in unsigned long ul);
|
107
|
+
void ulong_out_t (out unsigned long ul);
|
108
|
+
void ulong_inout_t (inout unsigned long ul);
|
109
|
+
unsigned long ulong_ret_t ();
|
110
|
+
|
111
|
+
void ulonglong_in_t (in unsigned long long ull);
|
112
|
+
void ulonglong_out_t (out unsigned long long ull);
|
113
|
+
void ulonglong_inout_t (inout unsigned long long ull);
|
114
|
+
unsigned long long ulonglong_ret_t ();
|
115
|
+
|
116
|
+
void float_in_t (in float f);
|
117
|
+
void float_out_t (out float f);
|
118
|
+
void float_inout_t (inout float f);
|
119
|
+
float float_ret_t ();
|
120
|
+
|
121
|
+
void double_in_t (in double d);
|
122
|
+
void double_out_t (out double d);
|
123
|
+
void double_inout_t (inout double d);
|
124
|
+
double double_ret_t ();
|
125
|
+
|
126
|
+
/*
|
127
|
+
void longdouble_in_t (in long double d);
|
128
|
+
void longdouble_out_t (out long double d);
|
129
|
+
void longdouble_inout_t (inout long double d);
|
130
|
+
long double longdouble_ret_t ();
|
131
|
+
*/
|
132
|
+
|
133
|
+
void char_in_t (in char c);
|
134
|
+
void char_out_t (out char c);
|
135
|
+
void char_inout_t (inout char c);
|
136
|
+
char char_ret_t ();
|
137
|
+
|
138
|
+
void wchar_in_t (in wchar wc);
|
139
|
+
void wchar_out_t (out wchar wc);
|
140
|
+
void wchar_inout_t (inout wchar wc);
|
141
|
+
wchar wchar_ret_t ();
|
142
|
+
|
143
|
+
void string_in_t (in string s);
|
144
|
+
void string_out_t (out string s);
|
145
|
+
void string_inout_t (inout string s);
|
146
|
+
string string_ret_t ();
|
147
|
+
|
148
|
+
void wstring_in_t (in wstring s);
|
149
|
+
void wstring_out_t (out wstring s);
|
150
|
+
void wstring_inout_t (inout wstring s);
|
151
|
+
wstring wstring_ret_t ();
|
152
|
+
|
153
|
+
void boolean_in_t (in boolean b);
|
154
|
+
void boolean_out_t (out boolean b);
|
155
|
+
void boolean_inout_t (inout boolean b);
|
156
|
+
boolean boolean_ret_t ();
|
157
|
+
|
158
|
+
void octet_in_t (in octet o);
|
159
|
+
void octet_out_t (out octet o);
|
160
|
+
void octet_inout_t (inout octet o);
|
161
|
+
octet octet_ret_t ();
|
162
|
+
|
163
|
+
void any_in_t (in any a);
|
164
|
+
void any_out_t (out any a);
|
165
|
+
void any_inout_t (inout any a);
|
166
|
+
any any_ret_t ();
|
167
|
+
};
|
168
|
+
|
169
|
+
|
170
|
+
interface UserTypeTester
|
171
|
+
{
|
172
|
+
void u1_in_t (in UserTypes::u1 u);
|
173
|
+
void u1_out_t (out UserTypes::u1 u);
|
174
|
+
void u1_inout_t (inout UserTypes::u1 u);
|
175
|
+
UserTypes::u1 u1_ret_t ();
|
176
|
+
|
177
|
+
void u2_in_t (in UserTypes::u2 u);
|
178
|
+
void u2_out_t (out UserTypes::u2 u);
|
179
|
+
void u2_inout_t (inout UserTypes::u2 u);
|
180
|
+
UserTypes::u2 u2_ret_t ();
|
181
|
+
|
182
|
+
void s1_in_t (in UserTypes::s1 s);
|
183
|
+
void s1_out_t (out UserTypes::s1 s);
|
184
|
+
void s1_inout_t (inout UserTypes::s1 s);
|
185
|
+
UserTypes::s1 s1_ret_t ();
|
186
|
+
|
187
|
+
void s2_in_t (in UserTypes::s2 s);
|
188
|
+
void s2_out_t (out UserTypes::s2 s);
|
189
|
+
void s2_inout_t (inout UserTypes::s2 s);
|
190
|
+
UserTypes::s2 s2_ret_t ();
|
191
|
+
|
192
|
+
void interface_in_t (in UserTypes::I interf);
|
193
|
+
void interface_out_t (out UserTypes::I interf);
|
194
|
+
void interface_inout_t (inout UserTypes::I interf);
|
195
|
+
UserTypes::I interface_ret_t ();
|
196
|
+
};
|
197
|
+
|
198
|
+
|
199
|
+
interface SequenceTester
|
200
|
+
{
|
201
|
+
//
|
202
|
+
// Note of course that bounded sequences can be of any length up to
|
203
|
+
// their bound. In the benchmark code bounded sequences will be
|
204
|
+
// populated to their maximum length.
|
205
|
+
//
|
206
|
+
|
207
|
+
//
|
208
|
+
// typedefs : standard types
|
209
|
+
//
|
210
|
+
typedef sequence<short> ShortSeq_UB;
|
211
|
+
typedef sequence<short, 4> ShortSeq_4;
|
212
|
+
typedef sequence<short, 65536> ShortSeq_64K;
|
213
|
+
|
214
|
+
typedef sequence<long> LongSeq_UB;
|
215
|
+
typedef sequence<long, 4> LongSeq_4;
|
216
|
+
typedef sequence<long, 65536> LongSeq_64K;
|
217
|
+
|
218
|
+
typedef sequence<long long> LongLongSeq_UB;
|
219
|
+
typedef sequence<long long, 4> LongLongSeq_4;
|
220
|
+
typedef sequence<long long, 65536> LongLongSeq_64K;
|
221
|
+
|
222
|
+
typedef sequence<unsigned short> UShortSeq_UB;
|
223
|
+
typedef sequence<unsigned short, 4> UShortSeq_4;
|
224
|
+
typedef sequence<unsigned short, 65536> UShortSeq_64K;
|
225
|
+
|
226
|
+
typedef sequence<unsigned long> ULongSeq_UB;
|
227
|
+
typedef sequence<unsigned long, 4> ULongSeq_4;
|
228
|
+
typedef sequence<unsigned long, 65536> ULongSeq_64K;
|
229
|
+
|
230
|
+
typedef sequence<unsigned long long> ULongLongSeq_UB;
|
231
|
+
typedef sequence<unsigned long long, 4> ULongLongSeq_4;
|
232
|
+
typedef sequence<unsigned long long, 65536> ULongLongSeq_64K;
|
233
|
+
|
234
|
+
typedef sequence<float> FloatSeq_UB;
|
235
|
+
typedef sequence<float, 4> FloatSeq_4;
|
236
|
+
typedef sequence<float, 65536> FloatSeq_64K;
|
237
|
+
|
238
|
+
typedef sequence<double> DoubleSeq_UB;
|
239
|
+
typedef sequence<double, 4> DoubleSeq_4;
|
240
|
+
typedef sequence<double, 65536> DoubleSeq_64K;
|
241
|
+
|
242
|
+
typedef sequence<char> CharSeq_UB;
|
243
|
+
typedef sequence<char, 4> CharSeq_4;
|
244
|
+
typedef sequence<char, 65536> CharSeq_64K;
|
245
|
+
|
246
|
+
typedef sequence<wchar> WCharSeq_UB;
|
247
|
+
typedef sequence<wchar, 4> WCharSeq_4;
|
248
|
+
typedef sequence<wchar, 65536> WCharSeq_64K;
|
249
|
+
|
250
|
+
typedef sequence<string> StringSeq_UB;
|
251
|
+
typedef sequence<string, 4> StringSeq_4;
|
252
|
+
typedef sequence<string, 65536> StringSeq_64K;
|
253
|
+
|
254
|
+
typedef sequence<boolean> BooleanSeq_UB;
|
255
|
+
typedef sequence<boolean, 4> BooleanSeq_4;
|
256
|
+
typedef sequence<boolean, 65536> BooleanSeq_64K;
|
257
|
+
|
258
|
+
typedef sequence<octet> OctetSeq_UB;
|
259
|
+
typedef sequence<octet, 4> OctetSeq_4;
|
260
|
+
typedef sequence<octet, 65536> OctetSeq_64K;
|
261
|
+
typedef sequence<octet, 1048576> OctetSeq_1M;
|
262
|
+
|
263
|
+
typedef sequence<any> AnySeq_UB;
|
264
|
+
typedef sequence<any, 4> AnySeq_4;
|
265
|
+
typedef sequence<any, 65536> AnySeq_64K;
|
266
|
+
|
267
|
+
//
|
268
|
+
// typedefs: user-defined types (just unbounded for now, phew!)
|
269
|
+
//
|
270
|
+
typedef sequence<UserTypes::u1> U1Seq_UB;
|
271
|
+
typedef sequence<UserTypes::u2> U2Seq_UB;
|
272
|
+
|
273
|
+
typedef sequence<UserTypes::s1> S1Seq_UB;
|
274
|
+
typedef sequence<UserTypes::s2> S2Seq_UB;
|
275
|
+
|
276
|
+
typedef sequence<UserTypes::I> InterfaceSeq;
|
277
|
+
|
278
|
+
//
|
279
|
+
// Sequences of basic types
|
280
|
+
//
|
281
|
+
void ShortSeq_UB_in_t (in ShortSeq_UB s_seq);
|
282
|
+
void ShortSeq_UB_out_t (out ShortSeq_UB s_seq);
|
283
|
+
void ShortSeq_UB_inout_t (inout ShortSeq_UB s_seq);
|
284
|
+
ShortSeq_UB ShortSeq_UB_ret_t ();
|
285
|
+
|
286
|
+
void FloatSeq_64K_in_t (in FloatSeq_64K f_seq);
|
287
|
+
void FloatSeq_64K_out_t (out FloatSeq_64K f_seq);
|
288
|
+
void FloatSeq_64K_inout_t (inout FloatSeq_64K f_seq);
|
289
|
+
FloatSeq_64K FloatSeq_64K_ret_t ();
|
290
|
+
|
291
|
+
void StringSeq_UB_in_t (in StringSeq_UB s_seq);
|
292
|
+
void StringSeq_UB_out_t (out StringSeq_UB s_seq);
|
293
|
+
void StringSeq_UB_inout_t (inout StringSeq_UB s_seq);
|
294
|
+
StringSeq_UB StringSeq_UB_ret_t ();
|
295
|
+
|
296
|
+
void OctetSeq_1M_in_t (in OctetSeq_1M o_seq);
|
297
|
+
void OctetSeq_1M_out_t (out OctetSeq_1M o_seq);
|
298
|
+
void OctetSeq_1M_inout_t (inout OctetSeq_1M o_seq);
|
299
|
+
OctetSeq_1M OctetSeq_1M_ret_t ();
|
300
|
+
|
301
|
+
void AnySeq_UB_in_t (in AnySeq_UB a_seq);
|
302
|
+
void AnySeq_UB_out_t (out AnySeq_UB a_seq);
|
303
|
+
void AnySeq_UB_inout_t (inout AnySeq_UB a_seq);
|
304
|
+
AnySeq_UB AnySeq_UB_ret_t ();
|
305
|
+
|
306
|
+
//
|
307
|
+
// Sequences of user-defined types
|
308
|
+
//
|
309
|
+
void U2Seq_UB_in_t (in U2Seq_UB u2_seq);
|
310
|
+
void U2Seq_UB_out_t (out U2Seq_UB u2_seq);
|
311
|
+
void U2Seq_UB_inout_t (inout U2Seq_UB u2_seq);
|
312
|
+
U2Seq_UB U2Seq_UB_ret_t ();
|
313
|
+
|
314
|
+
void S2Seq_UB_in_t (in S2Seq_UB s2_seq);
|
315
|
+
void S2Seq_UB_out_t (out S2Seq_UB s2_seq);
|
316
|
+
void S2Seq_UB_inout_t (inout S2Seq_UB s2_seq);
|
317
|
+
S2Seq_UB S2Seq_UB_ret_t ();
|
318
|
+
|
319
|
+
//
|
320
|
+
// Sequence of interfaces (passing object references...)
|
321
|
+
//
|
322
|
+
void InterfaceSeq_in_t (in InterfaceSeq i_seq);
|
323
|
+
void InterfaceSeq_out_t (out InterfaceSeq i_seq);
|
324
|
+
void InterfaceSeq_inout_t (inout InterfaceSeq i_seq);
|
325
|
+
InterfaceSeq InterfaceSeq_ret_t ();
|
326
|
+
|
327
|
+
};
|
328
|
+
|
329
|
+
}; // End module Benchmark
|
330
|
+
|
331
|
+
|