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,40 @@
|
|
1
|
+
module Atomic {
|
2
|
+
const short SS = 1;
|
3
|
+
const long LL = 1;
|
4
|
+
const unsigned short US = 1;
|
5
|
+
const unsigned long UL = 1;
|
6
|
+
const float FF = 1.1;
|
7
|
+
const double DD = 1.2;
|
8
|
+
const char CC = 'a';
|
9
|
+
const boolean BB = TRUE;
|
10
|
+
|
11
|
+
interface test {
|
12
|
+
short ShortOperation(in short a,
|
13
|
+
inout short b,
|
14
|
+
out short c);
|
15
|
+
long LongOperation(in long a,
|
16
|
+
inout long b,
|
17
|
+
out long c);
|
18
|
+
unsigned short UShortOperation(in unsigned short a,
|
19
|
+
inout unsigned short b,
|
20
|
+
out unsigned short c);
|
21
|
+
unsigned long ULongOperation(in unsigned long a,
|
22
|
+
inout unsigned long b,
|
23
|
+
out unsigned long c);
|
24
|
+
float FloatOperation(in float a,
|
25
|
+
inout float b,
|
26
|
+
out float c);
|
27
|
+
double DoubleOperation(in double a,
|
28
|
+
inout double b,
|
29
|
+
out double c);
|
30
|
+
boolean BooleanOperation(in boolean a,
|
31
|
+
inout boolean b,
|
32
|
+
out boolean c);
|
33
|
+
char CharOperation(in char a,
|
34
|
+
inout char b,
|
35
|
+
out char c);
|
36
|
+
octet OctetOperation(in octet a,
|
37
|
+
inout octet b,
|
38
|
+
out octet c);
|
39
|
+
};
|
40
|
+
};
|
@@ -0,0 +1,48 @@
|
|
1
|
+
/* A test interface for DIF1 */
|
2
|
+
|
3
|
+
interface ex1
|
4
|
+
{
|
5
|
+
void op0();
|
6
|
+
float op1(in float f, out double d, inout long l);
|
7
|
+
double op2(in double d, out long l, inout short s);
|
8
|
+
long op3(in long l, out short s, inout unsigned long ul);
|
9
|
+
short op4(in short s, out unsigned long ul, inout unsigned short us);
|
10
|
+
unsigned long op5(inout unsigned long ul, in unsigned short us, out char c, in boolean b);
|
11
|
+
unsigned short op6(out unsigned short us, inout char c);
|
12
|
+
};
|
13
|
+
|
14
|
+
//interface ex3;
|
15
|
+
|
16
|
+
interface ex2 : ex1
|
17
|
+
{
|
18
|
+
// operations continued from ex1
|
19
|
+
char op7(in char c, out boolean b, inout octet o);
|
20
|
+
boolean op8(out boolean b, in octet o);
|
21
|
+
octet op9(inout octet o, out string s, in string <10> ls, inout long l);
|
22
|
+
string op10(in string s, out string <10> ls);
|
23
|
+
string <10> op11(inout string <10> ls, out long l);
|
24
|
+
long op12(in long l);
|
25
|
+
// ex3 op13(Environment *ev);
|
26
|
+
};
|
27
|
+
|
28
|
+
interface ex3 : ex1
|
29
|
+
{
|
30
|
+
// attributes
|
31
|
+
readonly attribute float float_attribute;
|
32
|
+
attribute double double_attribute;
|
33
|
+
readonly attribute long long_attribute;
|
34
|
+
attribute short short_attribute;
|
35
|
+
readonly attribute unsigned long unsigned_long_attribute;
|
36
|
+
|
37
|
+
};
|
38
|
+
|
39
|
+
interface ex4 : ex2, ex3
|
40
|
+
{
|
41
|
+
attribute unsigned short unsigned_short_attribute;
|
42
|
+
readonly attribute char char_attribute;
|
43
|
+
attribute boolean boolean_attribute;
|
44
|
+
readonly attribute octet octet_attribute;
|
45
|
+
attribute string string_attribute;
|
46
|
+
readonly attribute string <10> limited_string_attribute;
|
47
|
+
// readonly attribute ex4 an_object_attribute;
|
48
|
+
};
|
@@ -0,0 +1,16 @@
|
|
1
|
+
typedef sequence <long, 10> long10;
|
2
|
+
|
3
|
+
interface math {
|
4
|
+
short addshort(in short a, in short b);
|
5
|
+
short subshort(in short a, in short b);
|
6
|
+
short multshort(in short a, in short b);
|
7
|
+
long addlong(in long a, in long b);
|
8
|
+
long sublong(in long a, in long b);
|
9
|
+
long multlong(in long a, in long b);
|
10
|
+
long addlonglist(in long10 a);
|
11
|
+
long multlonglist(in long10 a);
|
12
|
+
};
|
13
|
+
|
14
|
+
interface a {
|
15
|
+
char op(in string <100> s);
|
16
|
+
};
|
@@ -0,0 +1,111 @@
|
|
1
|
+
enum Enumeration {ONE, TWO};
|
2
|
+
|
3
|
+
struct FStruct {
|
4
|
+
short a;
|
5
|
+
};
|
6
|
+
|
7
|
+
struct VStruct {
|
8
|
+
string a;
|
9
|
+
};
|
10
|
+
|
11
|
+
union FUnion switch (long) {
|
12
|
+
case 1: long x;
|
13
|
+
default: char z;
|
14
|
+
};
|
15
|
+
|
16
|
+
union VUnion switch (long) {
|
17
|
+
case 1: string a;
|
18
|
+
default: char z;
|
19
|
+
};
|
20
|
+
|
21
|
+
typedef long FArray[10];
|
22
|
+
typedef string VArray[10];
|
23
|
+
|
24
|
+
typedef sequence<long,10> BFSequence;
|
25
|
+
typedef sequence<long> UFSequence;
|
26
|
+
|
27
|
+
typedef sequence<string,10> BVSequence;
|
28
|
+
typedef sequence<string> UVSequence;
|
29
|
+
|
30
|
+
interface intf {
|
31
|
+
short ShortOperation(in short a,
|
32
|
+
inout short b,
|
33
|
+
out short c);
|
34
|
+
long LongOperation(in long a,
|
35
|
+
inout long b,
|
36
|
+
out long c);
|
37
|
+
long long LongLongOperation(in long long a,
|
38
|
+
inout long long b,
|
39
|
+
out long long c);
|
40
|
+
unsigned short UShortOperation(in unsigned short a,
|
41
|
+
inout unsigned short b,
|
42
|
+
out unsigned short c);
|
43
|
+
unsigned long ULongOperation(in unsigned long a,
|
44
|
+
inout unsigned long b,
|
45
|
+
out unsigned long c);
|
46
|
+
unsigned long long ULongLongOperation(in unsigned long long a,
|
47
|
+
inout unsigned long long b,
|
48
|
+
out unsigned long long c);
|
49
|
+
float FloatOperation(in float a,
|
50
|
+
inout float b,
|
51
|
+
out float c);
|
52
|
+
double DoubleOperation(in double a,
|
53
|
+
inout double b,
|
54
|
+
out double c);
|
55
|
+
boolean BooleanOperation(in boolean a,
|
56
|
+
inout boolean b,
|
57
|
+
out boolean c);
|
58
|
+
char CharOperation(in char a,
|
59
|
+
inout char b,
|
60
|
+
out char c);
|
61
|
+
octet OctetOperation(in octet a,
|
62
|
+
inout octet b,
|
63
|
+
out octet c);
|
64
|
+
Enumeration EnumOperation(in Enumeration a,
|
65
|
+
inout Enumeration b,
|
66
|
+
out Enumeration c);
|
67
|
+
intf ObjectRefOperation(in intf a,
|
68
|
+
inout intf b,
|
69
|
+
out intf c);
|
70
|
+
FStruct FixedStructOperation(in FStruct a,
|
71
|
+
inout FStruct b,
|
72
|
+
out FStruct c);
|
73
|
+
VStruct VarStructOperation(in VStruct a,
|
74
|
+
inout VStruct b,
|
75
|
+
out VStruct c);
|
76
|
+
FUnion FixedUnionOperation(in FUnion a,
|
77
|
+
inout FUnion b,
|
78
|
+
out FUnion c);
|
79
|
+
VUnion VarUnionOperation(in VUnion a,
|
80
|
+
inout VUnion b,
|
81
|
+
out VUnion c);
|
82
|
+
string StringOperation(in string a,
|
83
|
+
inout string b,
|
84
|
+
out string c);
|
85
|
+
string<20> BoundStringOperation(in string<20> a,
|
86
|
+
inout string<20> b,
|
87
|
+
out string<20> c);
|
88
|
+
BFSequence BoundedFixedSequenceOperation(in BFSequence a,
|
89
|
+
inout BFSequence b,
|
90
|
+
out BFSequence c);
|
91
|
+
BVSequence BoundedVarSequenceOperation(in BVSequence a,
|
92
|
+
inout BVSequence b,
|
93
|
+
out BVSequence c);
|
94
|
+
UFSequence FixedSequenceOperation(in UFSequence a,
|
95
|
+
inout UFSequence b,
|
96
|
+
out UFSequence c);
|
97
|
+
UVSequence VarSequenceOperation(in UVSequence a,
|
98
|
+
inout UVSequence b,
|
99
|
+
out UVSequence c);
|
100
|
+
FArray FixedArrayOperation(in FArray a,
|
101
|
+
inout FArray b,
|
102
|
+
out FArray c);
|
103
|
+
VArray VarArrayOperation(in VArray a,
|
104
|
+
inout VArray b,
|
105
|
+
out VArray c);
|
106
|
+
};
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
// Comments : IDLs to do performance testing of oneway and req/reply
|
2
|
+
// interfaces These tests also include arguments of
|
3
|
+
// various types
|
4
|
+
//****************************************************************************
|
5
|
+
|
6
|
+
#ifndef _perf_idl_
|
7
|
+
#define _perf_idl_
|
8
|
+
|
9
|
+
typedef sequence<short> shortSeq;
|
10
|
+
typedef sequence<long> longSeq;
|
11
|
+
typedef sequence<float> floatSeq;
|
12
|
+
typedef sequence<double> doubleSeq;
|
13
|
+
typedef sequence<string> stringSeq;
|
14
|
+
typedef sequence<char> charSeq;
|
15
|
+
|
16
|
+
struct PerfStruct {
|
17
|
+
short shortVal;
|
18
|
+
long longVal;
|
19
|
+
float floatVal;
|
20
|
+
double doubleVal;
|
21
|
+
char charVal;
|
22
|
+
string stringVal;
|
23
|
+
};
|
24
|
+
|
25
|
+
typedef sequence<PerfStruct> structSeq;
|
26
|
+
typedef PerfStruct structArray[100];
|
27
|
+
|
28
|
+
interface TestOneway
|
29
|
+
{
|
30
|
+
oneway void test_no_param();
|
31
|
+
|
32
|
+
oneway void test_prim_args(in short shortVal, in long longVal,
|
33
|
+
in float floatVal, in double doubleVal,
|
34
|
+
in char charVal, in string stringVal);
|
35
|
+
|
36
|
+
oneway void test_struct(in PerfStruct structVal);
|
37
|
+
|
38
|
+
oneway void test_prim_seq(in shortSeq shortVal, in longSeq longVal,
|
39
|
+
in floatSeq floatVal, in doubleSeq doubleVal,
|
40
|
+
in charSeq charVal, in stringSeq stringVal);
|
41
|
+
|
42
|
+
oneway void test_struct_seq(in structSeq structVal);
|
43
|
+
|
44
|
+
oneway void test_struct_array(in structArray arrayVal);
|
45
|
+
};
|
46
|
+
|
47
|
+
interface TestReqReply
|
48
|
+
{
|
49
|
+
long test_prim_args(in short shortVal, in long longVal,
|
50
|
+
in float floatVal, in double doubleVal,
|
51
|
+
in char charVal, in string stringVal,
|
52
|
+
inout short inoutShort, inout long inoutLong,
|
53
|
+
inout float inoutFloat, inout double inoutDouble,
|
54
|
+
inout char inoutChar, inout string inoutString,
|
55
|
+
out short outShort, out long outLong,
|
56
|
+
out float outFloat, out double outDouble,
|
57
|
+
out char outChar, out string outString);
|
58
|
+
|
59
|
+
|
60
|
+
long test_struct_args(in PerfStruct structVal,
|
61
|
+
inout PerfStruct inoutStruct,
|
62
|
+
out PerfStruct outStruct);
|
63
|
+
|
64
|
+
long test_prim_seq(in shortSeq shortVal, in longSeq longVal,
|
65
|
+
in floatSeq floatVal, in doubleSeq doubleVal,
|
66
|
+
in charSeq charVal, in stringSeq stringVal,
|
67
|
+
inout shortSeq inoutShort, inout longSeq inoutLong,
|
68
|
+
inout floatSeq inoutFloat, inout doubleSeq inoutDouble,
|
69
|
+
inout charSeq inoutChar, inout stringSeq inoutString,
|
70
|
+
out shortSeq outShort, out longSeq outLong,
|
71
|
+
out floatSeq outFloat, out doubleSeq outDouble,
|
72
|
+
out charSeq outChar, out stringSeq outString);
|
73
|
+
|
74
|
+
long test_struct_seq(in structSeq structVal,
|
75
|
+
inout structSeq inoutStruct,
|
76
|
+
out structSeq outStruct);
|
77
|
+
|
78
|
+
long test_struct_array(in structArray structVal,
|
79
|
+
inout structArray inoutStruct,
|
80
|
+
out structArray outStruct);
|
81
|
+
};
|
82
|
+
|
83
|
+
|
84
|
+
#endif
|
@@ -0,0 +1,104 @@
|
|
1
|
+
// Description : Orbix's Performance IDL
|
2
|
+
//
|
3
|
+
//
|
4
|
+
// The original form of this timer benchmark came from:
|
5
|
+
//
|
6
|
+
// Prasad Mokkapati
|
7
|
+
// Post Modern Computing
|
8
|
+
// 1897 Landing Drive
|
9
|
+
// Mountain View
|
10
|
+
// Ca - 94043
|
11
|
+
//
|
12
|
+
// email: prasad@promoco.com
|
13
|
+
//
|
14
|
+
//
|
15
|
+
// to whom all credit is ascribed.
|
16
|
+
//
|
17
|
+
// This code is reproduced with permission from Post Modern Computing.
|
18
|
+
//
|
19
|
+
|
20
|
+
|
21
|
+
#ifndef _perf_idl_
|
22
|
+
#define _perf_idl_
|
23
|
+
|
24
|
+
// IDLs to do performance testing of oneway and req/reply interfaces
|
25
|
+
// These tests also include arguments of various types
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
typedef sequence<short> shortSeq;
|
30
|
+
typedef sequence<long> longSeq;
|
31
|
+
typedef sequence<float> floatSeq;
|
32
|
+
typedef sequence<double> doubleSeq;
|
33
|
+
typedef sequence<string> stringSeq;
|
34
|
+
typedef sequence<char> charSeq;
|
35
|
+
|
36
|
+
struct PerfStruct {
|
37
|
+
short shortVal;
|
38
|
+
long longVal;
|
39
|
+
float floatVal;
|
40
|
+
double doubleVal;
|
41
|
+
char charVal;
|
42
|
+
string stringVal;
|
43
|
+
};
|
44
|
+
|
45
|
+
typedef sequence<PerfStruct> structSeq;
|
46
|
+
typedef PerfStruct structArray[100];
|
47
|
+
|
48
|
+
interface TestOneway
|
49
|
+
{
|
50
|
+
oneway void test_no_param();
|
51
|
+
|
52
|
+
oneway void test_prim_args(in short shortVal, in long longVal,
|
53
|
+
in float floatVal, in double doubleVal,
|
54
|
+
in char charVal, in string stringVal);
|
55
|
+
|
56
|
+
oneway void test_struct(in PerfStruct structVal);
|
57
|
+
|
58
|
+
oneway void test_prim_seq(in shortSeq shortVal, in longSeq longVal,
|
59
|
+
in floatSeq floatVal, in doubleSeq doubleVal,
|
60
|
+
in charSeq charVal, in stringSeq stringVal);
|
61
|
+
|
62
|
+
oneway void test_struct_seq(in structSeq structVal);
|
63
|
+
|
64
|
+
oneway void test_struct_array(in structArray arrayVal);
|
65
|
+
};
|
66
|
+
|
67
|
+
interface TestReqReply
|
68
|
+
{
|
69
|
+
long test_prim_args(in short shortVal, in long longVal,
|
70
|
+
in float floatVal, in double doubleVal,
|
71
|
+
in char charVal, in string stringVal,
|
72
|
+
inout short inoutShort, inout long inoutLong,
|
73
|
+
inout float inoutFloat, inout double inoutDouble,
|
74
|
+
inout char inoutChar, inout string inoutString,
|
75
|
+
out short outShort, out long outLong,
|
76
|
+
out float outFloat, out double outDouble,
|
77
|
+
out char outChar, out string outString);
|
78
|
+
|
79
|
+
|
80
|
+
long test_struct_args(in PerfStruct structVal,
|
81
|
+
inout PerfStruct inoutStruct,
|
82
|
+
out PerfStruct outStruct);
|
83
|
+
|
84
|
+
long test_prim_seq(in shortSeq shortVal, in longSeq longVal,
|
85
|
+
in floatSeq floatVal, in doubleSeq doubleVal,
|
86
|
+
in charSeq charVal, in stringSeq stringVal,
|
87
|
+
inout shortSeq inoutShort, inout longSeq inoutLong,
|
88
|
+
inout floatSeq inoutFloat, inout doubleSeq inoutDouble,
|
89
|
+
inout charSeq inoutChar, inout stringSeq inoutString,
|
90
|
+
out shortSeq outShort, out longSeq outLong,
|
91
|
+
out floatSeq outFloat, out doubleSeq outDouble,
|
92
|
+
out charSeq outChar, out stringSeq outString);
|
93
|
+
|
94
|
+
long test_struct_seq(in structSeq structVal,
|
95
|
+
inout structSeq inoutStruct,
|
96
|
+
out structSeq outStruct);
|
97
|
+
|
98
|
+
long test_struct_array(in structArray structVal,
|
99
|
+
inout structArray inoutStruct,
|
100
|
+
out structArray outStruct);
|
101
|
+
};
|
102
|
+
|
103
|
+
|
104
|
+
#endif
|
@@ -0,0 +1,54 @@
|
|
1
|
+
// TEST basic marshaling tests for all IDL primitive types, modes
|
2
|
+
//
|
3
|
+
// This test omits constructed types (struct, union, enum, sequence, and
|
4
|
+
// array types), and only tests very simple user defined exceptions.
|
5
|
+
//
|
6
|
+
// Values returned are well defined functions of the input values:
|
7
|
+
//
|
8
|
+
// * For numeric types (octet, short, long, longlong, float, double,
|
9
|
+
// longdouble, and unsigned variants) the value is cubed.
|
10
|
+
// * For Boolean, it's the negation.
|
11
|
+
// * For Any, TypeCode, Principal, Object, char and wchar,
|
12
|
+
// string and wstring, it's the input value.
|
13
|
+
//
|
14
|
+
// The "return" and "out" parameter is the function of the "in" parameter;
|
15
|
+
// the "inout" parameter is the function of its original value.
|
16
|
+
//
|
17
|
+
|
18
|
+
#define DECL_TEST(type) \
|
19
|
+
type test_ ## type ( in type a1, out type a2, inout type a3)
|
20
|
+
|
21
|
+
#pragma prefix "Eng.SUN.COM" // only for Sun-defined interfaces
|
22
|
+
|
23
|
+
interface test1 {
|
24
|
+
void test_void ();
|
25
|
+
|
26
|
+
typedef unsigned short ushort;
|
27
|
+
typedef unsigned long ulong;
|
28
|
+
|
29
|
+
DECL_TEST (short);
|
30
|
+
DECL_TEST (long);
|
31
|
+
DECL_TEST (ushort);
|
32
|
+
DECL_TEST (ulong);
|
33
|
+
DECL_TEST (float);
|
34
|
+
DECL_TEST (double);
|
35
|
+
DECL_TEST (boolean);
|
36
|
+
DECL_TEST (char);
|
37
|
+
DECL_TEST (octet);
|
38
|
+
DECL_TEST (string); // unbounded string
|
39
|
+
DECL_TEST (Object);
|
40
|
+
// All cases, "case_num" in the exception is the same as the 'in' param
|
41
|
+
// * negative or zero, throws x1
|
42
|
+
// * positive even cases, throws x2 with obj = null objref
|
43
|
+
// * positive odd cases, throws x2 with obj = target objref
|
44
|
+
//
|
45
|
+
exception x1 { long case_num; };
|
46
|
+
exception x2 { Object obj; long value;};
|
47
|
+
void test_throw (in long case_num) raises (x1, x2);
|
48
|
+
|
49
|
+
//
|
50
|
+
// Aid for test cleanup in case server's not told to quit after
|
51
|
+
// being idle for some time period
|
52
|
+
//
|
53
|
+
oneway void please_exit ();
|
54
|
+
};
|