r2corba 1.5.4 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +3 -2
- data/ext/libr2tao/any.cpp +11 -10
- data/ext/libr2tao/exception.cpp +6 -8
- data/ext/libr2tao/exception.h +1 -1
- data/ext/libr2tao/longdouble.cpp +5 -9
- data/ext/libr2tao/object.cpp +37 -53
- data/ext/libr2tao/orb.cpp +46 -73
- data/ext/libr2tao/r2tao_ext.h +8 -19
- data/ext/libr2tao/required.cpp +3 -8
- data/ext/libr2tao/required.h +18 -34
- data/ext/libr2tao/values.cpp +97 -98
- data/ext/libr2tao/values.h +35 -37
- data/ext/librpoa/iortable.cpp +6 -7
- data/ext/librpoa/poa.cpp +29 -32
- data/ext/librpoa/servant.cpp +39 -113
- data/ext/librpoa/servant.h +18 -40
- data/lib/corba/cbase/ORB.rb +26 -23
- data/lib/corba/cbase/Request.rb +3 -3
- data/lib/corba/cbase/Streams.rb +2 -2
- data/lib/corba/cbase/Typecode.rb +6 -6
- data/lib/corba/cbase/Values.rb +4 -2
- data/lib/corba/cbase/exception.rb +6 -4
- data/lib/corba/cbase/poa.rb +1 -1
- data/lib/corba/cbase/policies.rb +2 -2
- data/lib/corba/cbase/require.rb +8 -1
- data/lib/corba/cmds/base.rb +1 -1
- data/lib/corba/common/Any.rb +3 -2
- data/lib/corba/common/IDL.rb +1 -1
- data/lib/corba/common/ORB.rb +22 -22
- data/lib/corba/common/Object.rb +14 -14
- data/lib/corba/common/Servant.rb +4 -4
- data/lib/corba/common/Stub.rb +6 -6
- data/lib/corba/common/Typecode.rb +69 -42
- data/lib/corba/common/Union.rb +5 -0
- data/lib/corba/common/Values.rb +1 -0
- data/lib/corba/common/const.rb +2 -2
- data/lib/corba/common/exception.rb +2 -1
- data/lib/corba/common/version.rb +2 -2
- data/lib/corba/idl/IDL.rb +1 -1
- data/lib/corba/jbase/Any.rb +28 -26
- data/lib/corba/jbase/ORB.rb +5 -5
- data/lib/corba/jbase/Object.rb +13 -13
- data/lib/corba/jbase/Request.rb +8 -8
- data/lib/corba/jbase/Servant.rb +10 -10
- data/lib/corba/jbase/ServerRequest.rb +7 -7
- data/lib/corba/jbase/Streams.rb +67 -3
- data/lib/corba/jbase/Typecode.rb +17 -16
- data/lib/corba/jbase/Values.rb +2 -0
- data/lib/corba/jbase/exception.rb +2 -1
- data/lib/corba/jbase/poa.rb +20 -20
- data/lib/corba/jbase/policies.rb +32 -32
- data/lib/corba/jbase/require.rb +4 -0
- data/lib/corba/poa.rb +1 -1
- data/lib/corba/policies.rb +1 -1
- data/lib/corba/require.rb +2 -2
- data/lib/corba/svcs/ins/cos_naming.rb +37 -28
- data/lib/corba/svcs/ins/ins.rb +51 -51
- data/lib/corba/svcs/ins/naming_service.rb +8 -8
- data/lib/corba.rb +1 -1
- data/lib/ridlbe/ruby/config.rb +37 -30
- data/lib/ridlbe/ruby/walker.rb +295 -272
- data/mkrf_conf_srcgem.rb +6 -6
- data/rakelib/bin.rake +1 -1
- data/rakelib/bin.rb +3 -3
- data/rakelib/build.rake +16 -16
- data/rakelib/config.rake +1 -1
- data/rakelib/config.rb +22 -22
- data/rakelib/ext.rake +7 -68
- data/rakelib/ext.rb +15 -15
- data/rakelib/ext_r2tao.rb +12 -55
- data/rakelib/gem.rake +25 -25
- data/rakelib/gem.rb +6 -6
- data/rakelib/package.rake +1 -1
- data/test/BiDirectional/client.rb +17 -17
- data/test/BiDirectional/run_test.rb +11 -11
- data/test/BiDirectional/server.rb +24 -25
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -17
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -13
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -19
- data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -15
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -13
- data/test/CORBA_Services/Naming/Corbaname/server.rb +30 -30
- data/test/CORBA_Services/Naming/Simple/client.rb +16 -16
- data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -13
- data/test/CORBA_Services/Naming/Simple/server.rb +19 -19
- data/test/Collocation/run_test.rb +10 -10
- data/test/Collocation/test.rb +27 -20
- data/test/Connect_Timeout/client.rb +16 -17
- data/test/Connect_Timeout/run_test.rb +10 -10
- data/test/DII/client.rb +30 -30
- data/test/DII/run_test.rb +11 -11
- data/test/DII/server.rb +16 -16
- data/test/DSI/client.rb +16 -16
- data/test/DSI/run_test.rb +11 -11
- data/test/DSI/server.rb +17 -17
- data/test/Exceptions/client.rb +21 -21
- data/test/Exceptions/run_test.rb +11 -11
- data/test/Exceptions/server.rb +16 -16
- data/test/Hello/client.rb +16 -16
- data/test/Hello/run_test.rb +11 -11
- data/test/Hello/server.rb +17 -17
- data/test/IDL_Test/client.rb +21 -21
- data/test/IDL_Test/run_test.rb +11 -11
- data/test/IDL_Test/server.rb +19 -19
- data/test/IORMap/client.rb +14 -14
- data/test/IORMap/run_test.rb +11 -11
- data/test/IORMap/server.rb +26 -26
- data/test/IORTable/client.rb +14 -14
- data/test/IORTable/run_test.rb +11 -11
- data/test/IORTable/server.rb +26 -26
- data/test/Implicit_Conversion/client.rb +20 -17
- data/test/Implicit_Conversion/run_test.rb +11 -11
- data/test/Implicit_Conversion/server.rb +16 -16
- data/test/Multi_Threading/Multiple_ORB/client.rb +14 -14
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -12
- data/test/Multi_Threading/Multiple_ORB/server.rb +17 -17
- data/test/Multi_Threading/Simple/client.rb +17 -17
- data/test/Multi_Threading/Simple/run_test.rb +11 -11
- data/test/Multi_Threading/Simple/server.rb +16 -16
- data/test/Multi_Threading/Threads/client.rb +16 -16
- data/test/Multi_Threading/Threads/run_test.rb +11 -11
- data/test/Multi_Threading/Threads/server.rb +22 -22
- data/test/Multi_Threading/Threads/watchdog.rb +16 -16
- data/test/Multiple_Servant_Interfaces/client.rb +14 -14
- data/test/Multiple_Servant_Interfaces/run_test.rb +11 -11
- data/test/Multiple_Servant_Interfaces/server.rb +18 -18
- data/test/Nil/run_test.rb +10 -10
- data/test/Nil/test.rb +14 -15
- data/test/OBV/AbstractInterface/client.rb +14 -14
- data/test/OBV/AbstractInterface/run_test.rb +11 -11
- data/test/OBV/AbstractInterface/server.rb +20 -19
- data/test/OBV/Custom/OBV_impl.rb +2 -0
- data/test/OBV/Custom/client.rb +14 -14
- data/test/OBV/Custom/run_test.rb +11 -11
- data/test/OBV/Custom/server.rb +16 -16
- data/test/OBV/Simple/OBV_impl.rb +1 -0
- data/test/OBV/Simple/client.rb +14 -14
- data/test/OBV/Simple/run_test.rb +11 -11
- data/test/OBV/Simple/server.rb +16 -16
- data/test/OBV/Simple_Event/Event_impl.rb +1 -0
- data/test/OBV/Simple_Event/client.rb +14 -14
- data/test/OBV/Simple_Event/run_test.rb +11 -11
- data/test/OBV/Simple_Event/server.rb +16 -16
- data/test/OBV/Supports/client.rb +19 -19
- data/test/OBV/Supports/run_test.rb +11 -11
- data/test/OBV/Supports/server.rb +15 -15
- data/test/OBV/Supports/supports_impl.rb +3 -0
- data/test/OBV/Tree/client.rb +14 -14
- data/test/OBV/Tree/run_test.rb +11 -11
- data/test/OBV/Tree/server.rb +19 -19
- data/test/OBV/Truncatable/Truncatable_impl.rb +1 -1
- data/test/OBV/Truncatable/client.rb +57 -57
- data/test/OBV/Truncatable/run_test.rb +11 -11
- data/test/OBV/Truncatable/server.rb +15 -15
- data/test/OBV/ValueBox/client.rb +154 -153
- data/test/OBV/ValueBox/run_test.rb +11 -11
- data/test/OBV/ValueBox/server.rb +42 -42
- data/test/Object/client.rb +15 -15
- data/test/Object/run_test.rb +11 -11
- data/test/Object/server.rb +19 -19
- data/test/POA/run_test.rb +10 -10
- data/test/POA/test.rb +16 -16
- data/test/Param_Test/client.rb +51 -51
- data/test/Param_Test/run_test.rb +11 -11
- data/test/Param_Test/server.rb +59 -59
- data/test/Performance/Simple/client.rb +16 -16
- data/test/Performance/Simple/run_test.rb +11 -11
- data/test/Performance/Simple/server.rb +16 -16
- data/test/Policies/run_test.rb +10 -10
- data/test/Policies/test.rb +23 -24
- data/test/Timeout/client.rb +21 -21
- data/test/Timeout/run_test.rb +11 -11
- data/test/Timeout/server.rb +22 -22
- data/test/lib/assert.rb +0 -1
- data/test/lib/test.rb +28 -23
- data/test/test_runner.rb +21 -22
- metadata +6 -9
- data/ext/extload/extload.c +0 -60
- data/ext/librpoa/srvreq_fix.cpp +0 -282
- data/ext/librpoa/srvreq_fix.h +0 -148
data/test/Param_Test/client.rb
CHANGED
@@ -23,22 +23,22 @@ ARGV.options do |opts|
|
|
23
23
|
script_name = File.basename($0)
|
24
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
25
25
|
|
26
|
-
opts.separator
|
26
|
+
opts.separator ''
|
27
27
|
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile]=v }
|
31
|
-
opts.on(
|
32
|
-
|
33
|
-
|
34
|
-
opts.on(
|
35
|
-
|
36
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set IOR.',
|
30
|
+
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
37
37
|
|
38
|
-
opts.separator
|
38
|
+
opts.separator ''
|
39
39
|
|
40
|
-
opts.on(
|
41
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
42
42
|
|
43
43
|
opts.parse!
|
44
44
|
end
|
@@ -50,7 +50,7 @@ else
|
|
50
50
|
require 'TestC.rb'
|
51
51
|
end
|
52
52
|
|
53
|
-
orb = CORBA.ORB_init([
|
53
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
54
54
|
|
55
55
|
begin
|
56
56
|
|
@@ -60,20 +60,20 @@ begin
|
|
60
60
|
|
61
61
|
## integer max/min values test
|
62
62
|
|
63
|
-
[
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
63
|
+
[:max_LongLong,
|
64
|
+
:min_LongLong,
|
65
|
+
:max_ULongLong,
|
66
|
+
:min_ULongLong,
|
67
|
+
:max_Long,
|
68
|
+
:min_Long,
|
69
|
+
:max_ULong,
|
70
|
+
:min_ULong,
|
71
|
+
:max_Short,
|
72
|
+
:min_Short,
|
73
|
+
:max_UShort,
|
74
|
+
:min_UShort,
|
75
|
+
:max_Octet,
|
76
|
+
:min_Octet].each do |att|
|
77
77
|
att_val = hello_obj.send(att)
|
78
78
|
assert "ERROR: value of attribute #{att} (#{att_val}) does not match expected value #{Test.const_get(att.to_s.capitalize)}", Test.const_get(att.to_s.capitalize) == att_val
|
79
79
|
end
|
@@ -86,23 +86,23 @@ begin
|
|
86
86
|
|
87
87
|
hello_obj.message = str
|
88
88
|
|
89
|
-
assert
|
89
|
+
assert 'ERROR setting message attribute', str == hello_obj.message
|
90
90
|
|
91
91
|
## sequence test
|
92
92
|
|
93
93
|
nums = hello_obj.numbers
|
94
94
|
|
95
95
|
begin
|
96
|
-
hello_obj.numbers = (0...11).to_a.collect { |i| i*3 }
|
96
|
+
hello_obj.numbers = (0...11).to_a.collect { |i| i * 3 }
|
97
97
|
rescue CORBA::MARSHAL => ex
|
98
98
|
## expected exception since sequence can hold max. 10 elements
|
99
99
|
end
|
100
100
|
|
101
101
|
assert "ERROR numbers attribute changed while it shouldn't", nums == hello_obj.numbers
|
102
102
|
|
103
|
-
hello_obj.numbers = nums.collect { |i| i*3 }
|
103
|
+
hello_obj.numbers = nums.collect { |i| i * 3 }
|
104
104
|
|
105
|
-
assert_not
|
105
|
+
assert_not 'ERROR numbers attribute did not change while it should have', nums == hello_obj.numbers
|
106
106
|
|
107
107
|
doubles_list = hello_obj.list_of_doubles
|
108
108
|
|
@@ -123,7 +123,7 @@ begin
|
|
123
123
|
hello_obj.structSeq = svseq
|
124
124
|
|
125
125
|
ix = 0
|
126
|
-
assert_not
|
126
|
+
assert_not 'ERROR setting attribute structSeq' do
|
127
127
|
hello_obj.structSeq.any? { |sv|
|
128
128
|
sv2 = svseq[ix]
|
129
129
|
ix += 1
|
@@ -149,7 +149,7 @@ begin
|
|
149
149
|
|
150
150
|
hello_obj.theCube = cube2
|
151
151
|
|
152
|
-
assert_not
|
152
|
+
assert_not 'ERROR setting attribute theCube' do
|
153
153
|
cube2 != hello_obj.theCube || cube == hello_obj.theCube
|
154
154
|
end
|
155
155
|
|
@@ -157,7 +157,7 @@ begin
|
|
157
157
|
|
158
158
|
self_obj = hello_obj.selfref
|
159
159
|
|
160
|
-
assert
|
160
|
+
assert 'ERROR with attribute selfref', self_obj.message == hello_obj.message
|
161
161
|
|
162
162
|
## Any test
|
163
163
|
|
@@ -165,19 +165,19 @@ begin
|
|
165
165
|
|
166
166
|
hello_obj.anyValue = 1
|
167
167
|
|
168
|
-
assert_not
|
168
|
+
assert_not 'ERROR with attribute anyValue' do
|
169
169
|
any == hello_obj.anyValue || 1 == hello_obj.anyValue
|
170
170
|
end
|
171
171
|
|
172
172
|
hello_obj.anyValue = 2
|
173
173
|
|
174
|
-
assert_not
|
174
|
+
assert_not 'ERROR with attribute anyValue' do
|
175
175
|
any == hello_obj.anyValue || 2 == hello_obj.anyValue
|
176
176
|
end
|
177
177
|
|
178
178
|
hello_obj.anyValue = 3
|
179
179
|
|
180
|
-
assert_not
|
180
|
+
assert_not 'ERROR with attribute anyValue' do
|
181
181
|
any == hello_obj.anyValue || 3 == hello_obj.anyValue
|
182
182
|
end
|
183
183
|
|
@@ -190,7 +190,7 @@ begin
|
|
190
190
|
|
191
191
|
hello_obj.unionValue = uv2
|
192
192
|
|
193
|
-
assert_not
|
193
|
+
assert_not 'ERROR with attribute unionValue' do
|
194
194
|
uv1._disc == hello_obj.unionValue._disc || uv1._value == hello_obj.unionValue._value
|
195
195
|
end
|
196
196
|
|
@@ -201,47 +201,47 @@ begin
|
|
201
201
|
|
202
202
|
hello_obj.unionValue2 = uv22
|
203
203
|
|
204
|
-
assert_not
|
204
|
+
assert_not 'ERROR with attribute unionValue2' do
|
205
205
|
uv21._disc == hello_obj.unionValue2._disc || uv21._value == hello_obj.unionValue2._value
|
206
206
|
end
|
207
207
|
|
208
|
-
assert_not
|
208
|
+
assert_not 'ERROR with attribute unionValue2' do
|
209
209
|
uv21._disc == hello_obj.unionValue2._disc || uv21._value == hello_obj.unionValue2._value
|
210
210
|
end
|
211
211
|
|
212
212
|
uv3 = hello_obj.unionValue3
|
213
213
|
|
214
|
-
assert_except
|
214
|
+
assert_except 'ERROR with attribute unionValue3', CORBA::BAD_PARAM do
|
215
215
|
uv3._disc = false
|
216
216
|
end
|
217
217
|
|
218
218
|
uv3._default # set implicit default
|
219
219
|
|
220
|
-
assert
|
220
|
+
assert 'ERROR with implicit default union U3' do
|
221
221
|
uv3._disc == false
|
222
222
|
end
|
223
223
|
|
224
224
|
hello_obj.unionValue3 = uv3
|
225
225
|
|
226
|
-
assert
|
226
|
+
assert 'ERROR with implicit default attribute unionValue3' do
|
227
227
|
hello_obj.unionValue3._disc == false
|
228
228
|
end
|
229
229
|
|
230
230
|
uv4 = hello_obj.unionValue4
|
231
231
|
|
232
|
-
assert_except
|
232
|
+
assert_except 'ERROR with attribute unionValue4', CORBA::BAD_PARAM do
|
233
233
|
uv4._disc = Test::TE_THIRD
|
234
234
|
end
|
235
235
|
|
236
236
|
uv4._default # set implicit default
|
237
237
|
|
238
|
-
assert
|
238
|
+
assert 'ERROR with implicit default union U4' do
|
239
239
|
uv4._disc == Test::TE_THIRD
|
240
240
|
end
|
241
241
|
|
242
242
|
hello_obj.unionValue4 = uv4
|
243
243
|
|
244
|
-
assert
|
244
|
+
assert 'ERROR with implicit default attribute unionValue4' do
|
245
245
|
hello_obj.unionValue4._disc == Test::TE_THIRD
|
246
246
|
end
|
247
247
|
|
@@ -255,16 +255,16 @@ begin
|
|
255
255
|
|
256
256
|
hello_obj.s3Value = s3val
|
257
257
|
|
258
|
-
assert_not
|
258
|
+
assert_not 'ERROR with attribute s3Value' do
|
259
259
|
s3val.m_seq.size != hello_obj.s3Value.m_seq.size || s3val.m_seq.first.m_has_more != hello_obj.s3Value.m_seq.first.m_has_more
|
260
260
|
end
|
261
261
|
|
262
262
|
## in, inout, out test
|
263
263
|
|
264
|
-
reslen, resinoutstr, resoutstr = hello_obj.run_test(instr = Test::TString.new(
|
264
|
+
reslen, resinoutstr, resoutstr = hello_obj.run_test(instr = Test::TString.new('This is instr'), inoutstr = 'This is inoutstr')
|
265
265
|
|
266
|
-
assert_not
|
267
|
-
reslen != resoutstr.size || resinoutstr != instr || resoutstr != (instr+inoutstr)
|
266
|
+
assert_not 'ERROR with run_test' do
|
267
|
+
reslen != resoutstr.size || resinoutstr != instr || resoutstr != (instr + inoutstr)
|
268
268
|
end
|
269
269
|
|
270
270
|
hello_obj.shutdown()
|
data/test/Param_Test/run_test.rb
CHANGED
@@ -20,19 +20,19 @@ ARGV.options do |opts|
|
|
20
20
|
script_name = File.basename($0)
|
21
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
22
22
|
|
23
|
-
opts.separator
|
23
|
+
opts.separator ''
|
24
24
|
|
25
|
-
opts.on(
|
26
|
-
|
27
|
-
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
31
31
|
|
32
|
-
opts.separator
|
32
|
+
opts.separator ''
|
33
33
|
|
34
|
-
opts.on(
|
35
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
36
36
|
|
37
37
|
opts.parse!
|
38
38
|
end
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
|
60
60
|
exrc = clt.wait(400)
|
61
61
|
|
62
|
-
if exrc ==0
|
62
|
+
if exrc == 0
|
63
63
|
srv.wait(400)
|
64
64
|
else
|
65
65
|
srv.wait_term(400)
|
data/test/Param_Test/server.rb
CHANGED
@@ -21,22 +21,22 @@ ARGV.options do |opts|
|
|
21
21
|
script_name = File.basename($0)
|
22
22
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
23
23
|
|
24
|
-
opts.separator
|
24
|
+
opts.separator ''
|
25
25
|
|
26
|
-
opts.on(
|
27
|
-
|
28
|
-
"Default: 'server.ior'") { |v| OPTIONS[:iorfile]=v }
|
29
|
-
opts.on(
|
30
|
-
|
31
|
-
|
32
|
-
opts.on(
|
33
|
-
|
34
|
-
|
26
|
+
opts.on('--o IORFILE',
|
27
|
+
'Set IOR filename.',
|
28
|
+
"Default: 'server.ior'") { |v| OPTIONS[:iorfile] = v }
|
29
|
+
opts.on('--d LVL',
|
30
|
+
'Set ORBDebugLevel value.',
|
31
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
32
|
+
opts.on('--use-implement',
|
33
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
34
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
35
35
|
|
36
|
-
opts.separator
|
36
|
+
opts.separator ''
|
37
37
|
|
38
|
-
opts.on(
|
39
|
-
|
38
|
+
opts.on('-h', '--help',
|
39
|
+
'Show this help message.') { puts opts; exit }
|
40
40
|
|
41
41
|
opts.parse!
|
42
42
|
end
|
@@ -53,18 +53,18 @@ class MyHello < POA::Test::Hello
|
|
53
53
|
def initialize(orb)
|
54
54
|
@orb = orb
|
55
55
|
@msg = 'message'
|
56
|
-
@nums = Test::TShortSeq.new((0...10).collect { |i| i*2 })
|
56
|
+
@nums = Test::TShortSeq.new((0...10).collect { |i| i * 2 })
|
57
57
|
s1 = Test::S1.new
|
58
58
|
s1.m_one = 123
|
59
59
|
s1.m_two = 2.54
|
60
|
-
s1.m_three =
|
60
|
+
s1.m_three = 'field three'
|
61
61
|
s1.m_four = Test::S1::S2.new
|
62
62
|
s1.m_four.m_b = false
|
63
63
|
s1.m_five = ::Test::TE_ZEROTH
|
64
64
|
@s1seq = Test::S1Seq.new << s1
|
65
65
|
@cube = Test::TLongCube.new((0...3).collect {|x|
|
66
66
|
(0...3).collect {|y|
|
67
|
-
(0...4).collect {|z| x+(y*10)+(z*100) }
|
67
|
+
(0...4).collect {|z| x + (y * 10) + (z * 100) }
|
68
68
|
}
|
69
69
|
})
|
70
70
|
@anysel = 0
|
@@ -79,7 +79,7 @@ class MyHello < POA::Test::Hello
|
|
79
79
|
@s3.m_seq << s3_
|
80
80
|
@u1 = Test::U1.new
|
81
81
|
@u1._disc = Test::TE_FIRST
|
82
|
-
@u1.m_str =
|
82
|
+
@u1.m_str = 'Hello world!'
|
83
83
|
@u2 = Test::U2.new
|
84
84
|
@u2._disc = Test::U2::ONE
|
85
85
|
@u2.l_ = 12345
|
@@ -88,105 +88,105 @@ class MyHello < POA::Test::Hello
|
|
88
88
|
@u3.lval = 123456
|
89
89
|
@u4 = Test::U4.new
|
90
90
|
@u4._disc = Test::TE_FIRST
|
91
|
-
@u4.m_str =
|
91
|
+
@u4.m_str = 'Hello world!'
|
92
92
|
@nex = 0
|
93
93
|
end
|
94
94
|
|
95
95
|
def max_LongLong()
|
96
96
|
Test::Max_longlong
|
97
|
-
end #of attribute get_Max_LongLong
|
97
|
+
end # of attribute get_Max_LongLong
|
98
98
|
|
99
99
|
def min_LongLong()
|
100
100
|
Test::Min_longlong
|
101
|
-
end #of attribute get_Min_LongLong
|
101
|
+
end # of attribute get_Min_LongLong
|
102
102
|
|
103
103
|
def max_ULongLong()
|
104
104
|
Test::Max_ulonglong
|
105
|
-
end #of attribute get_Max_ULongLong
|
105
|
+
end # of attribute get_Max_ULongLong
|
106
106
|
|
107
107
|
def min_ULongLong()
|
108
108
|
Test::Min_ulonglong
|
109
|
-
end #of attribute get_Min_ULongLong
|
109
|
+
end # of attribute get_Min_ULongLong
|
110
110
|
|
111
111
|
def max_Long()
|
112
112
|
Test::Max_long
|
113
|
-
end #of attribute get_Max_Long
|
113
|
+
end # of attribute get_Max_Long
|
114
114
|
|
115
115
|
def min_Long()
|
116
116
|
Test::Min_long
|
117
|
-
end #of attribute get_Min_Long
|
117
|
+
end # of attribute get_Min_Long
|
118
118
|
|
119
119
|
def max_ULong()
|
120
120
|
Test::Max_ulong
|
121
|
-
end #of attribute get_Max_ULong
|
121
|
+
end # of attribute get_Max_ULong
|
122
122
|
|
123
123
|
def min_ULong()
|
124
124
|
Test::Min_ulong
|
125
|
-
end #of attribute get_Min_ULong
|
125
|
+
end # of attribute get_Min_ULong
|
126
126
|
|
127
127
|
def max_Short()
|
128
128
|
Test::Max_short
|
129
|
-
end #of attribute get_Max_Short
|
129
|
+
end # of attribute get_Max_Short
|
130
130
|
|
131
131
|
def min_Short()
|
132
132
|
Test::Min_short
|
133
|
-
end #of attribute get_Min_Short
|
133
|
+
end # of attribute get_Min_Short
|
134
134
|
|
135
135
|
def max_UShort()
|
136
136
|
Test::Max_ushort
|
137
|
-
end #of attribute get_Max_UShort
|
137
|
+
end # of attribute get_Max_UShort
|
138
138
|
|
139
139
|
def min_UShort()
|
140
140
|
Test::Min_ushort
|
141
|
-
end #of attribute get_Min_UShort
|
141
|
+
end # of attribute get_Min_UShort
|
142
142
|
|
143
143
|
def max_Octet()
|
144
144
|
Test::Max_octet
|
145
|
-
end #of attribute get_Max_Octet
|
145
|
+
end # of attribute get_Max_Octet
|
146
146
|
|
147
147
|
def min_Octet()
|
148
148
|
Test::Min_octet
|
149
|
-
end #of attribute get_Min_Octet
|
149
|
+
end # of attribute get_Min_Octet
|
150
150
|
|
151
151
|
def get_string()
|
152
|
-
|
152
|
+
'Hello there!'
|
153
153
|
end
|
154
154
|
|
155
155
|
def message()
|
156
156
|
@msg
|
157
|
-
end #of attribute get_message
|
157
|
+
end # of attribute get_message
|
158
158
|
|
159
159
|
def message=(val)
|
160
160
|
@msg = val.to_s
|
161
|
-
end #of attribute set_message
|
161
|
+
end # of attribute set_message
|
162
162
|
|
163
163
|
def numbers()
|
164
164
|
@nums
|
165
|
-
end #of attribute get_numbers
|
165
|
+
end # of attribute get_numbers
|
166
166
|
|
167
167
|
def numbers=(val)
|
168
168
|
@nums = val
|
169
|
-
end #of attribute set_numbers
|
169
|
+
end # of attribute set_numbers
|
170
170
|
|
171
171
|
def list_of_doubles()
|
172
172
|
[1.0, 1.1, 1.2, 1.3]
|
173
|
-
end #of attribute get_numbers
|
173
|
+
end # of attribute get_numbers
|
174
174
|
|
175
175
|
def structSeq()
|
176
176
|
@s1seq
|
177
|
-
end #of attribute get_structSeq
|
177
|
+
end # of attribute get_structSeq
|
178
178
|
|
179
179
|
def structSeq=(val)
|
180
180
|
@s1seq = val
|
181
|
-
end #of attribute set_structSeq
|
181
|
+
end # of attribute set_structSeq
|
182
182
|
|
183
183
|
def theCube()
|
184
184
|
@cube
|
185
|
-
end #of attribute get_theCube
|
185
|
+
end # of attribute get_theCube
|
186
186
|
|
187
187
|
def theCube=(val)
|
188
188
|
@cube = val
|
189
|
-
end #of attribute set_theCube
|
189
|
+
end # of attribute set_theCube
|
190
190
|
|
191
191
|
def anyValue()
|
192
192
|
case @anysel
|
@@ -195,59 +195,59 @@ class MyHello < POA::Test::Hello
|
|
195
195
|
when 2
|
196
196
|
@s1seq
|
197
197
|
when 3
|
198
|
-
CORBA::Any.to_any([1,2,3,4,5], CORBA::TypeCode::Sequence.new(CORBA._tc_long))
|
198
|
+
CORBA::Any.to_any([1, 2, 3, 4, 5], CORBA::TypeCode::Sequence.new(CORBA._tc_long))
|
199
199
|
else
|
200
200
|
@anysel
|
201
201
|
end
|
202
|
-
end #of attribute get_anyValue
|
202
|
+
end # of attribute get_anyValue
|
203
203
|
|
204
204
|
def anyValue=(val)
|
205
205
|
@anysel = val.to_i
|
206
|
-
end #of attribute set_anyValue
|
206
|
+
end # of attribute set_anyValue
|
207
207
|
|
208
208
|
def selfref()
|
209
209
|
self._this
|
210
|
-
end #of attribute get_selfref
|
210
|
+
end # of attribute get_selfref
|
211
211
|
|
212
212
|
def s3Value()
|
213
213
|
@s3
|
214
|
-
end #of attribute get_s3Value
|
214
|
+
end # of attribute get_s3Value
|
215
215
|
|
216
216
|
def s3Value=(val)
|
217
217
|
@s3 = val
|
218
|
-
end #of attribute set_s3Value
|
218
|
+
end # of attribute set_s3Value
|
219
219
|
|
220
220
|
def unionValue()
|
221
221
|
@u1
|
222
|
-
end #of attribute get_unionValue
|
222
|
+
end # of attribute get_unionValue
|
223
223
|
|
224
224
|
def unionValue=(val)
|
225
225
|
@u1 = val
|
226
|
-
end #of attribute set_unionValue
|
226
|
+
end # of attribute set_unionValue
|
227
227
|
|
228
228
|
def unionValue2()
|
229
229
|
@u2
|
230
|
-
end #of attribute get_unionValue2
|
230
|
+
end # of attribute get_unionValue2
|
231
231
|
|
232
232
|
def unionValue2=(val)
|
233
233
|
@u2 = val
|
234
|
-
end #of attribute set_unionValue2
|
234
|
+
end # of attribute set_unionValue2
|
235
235
|
|
236
236
|
def unionValue3()
|
237
237
|
@u3
|
238
|
-
end #of attribute get_unionValue3
|
238
|
+
end # of attribute get_unionValue3
|
239
239
|
|
240
240
|
def unionValue3=(val)
|
241
241
|
@u3 = val
|
242
|
-
end #of attribute set_unionValue3
|
242
|
+
end # of attribute set_unionValue3
|
243
243
|
|
244
244
|
def unionValue4()
|
245
245
|
@u4
|
246
|
-
end #of attribute get_unionValue4
|
246
|
+
end # of attribute get_unionValue4
|
247
247
|
|
248
248
|
def unionValue4=(val)
|
249
249
|
@u4 = val
|
250
|
-
end #of attribute set_unionValue4
|
250
|
+
end # of attribute set_unionValue4
|
251
251
|
|
252
252
|
def run_test(instr, inoutstr)
|
253
253
|
outstr = instr + inoutstr
|
@@ -258,10 +258,10 @@ class MyHello < POA::Test::Hello
|
|
258
258
|
def shutdown()
|
259
259
|
@orb.shutdown()
|
260
260
|
end
|
261
|
-
end #of servant Hello
|
261
|
+
end # of servant Hello
|
262
262
|
|
263
263
|
|
264
|
-
orb = CORBA.ORB_init([
|
264
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
265
265
|
|
266
266
|
obj = orb.resolve_initial_references('RootPOA')
|
267
267
|
|
@@ -284,7 +284,7 @@ open(OPTIONS[:iorfile], 'w') { |io|
|
|
284
284
|
}
|
285
285
|
|
286
286
|
Signal.trap('INT') do
|
287
|
-
puts
|
287
|
+
puts 'SIGINT - shutting down ORB...'
|
288
288
|
orb.shutdown()
|
289
289
|
end
|
290
290
|
|
@@ -23,22 +23,22 @@ ARGV.options do |opts|
|
|
23
23
|
script_name = File.basename($0)
|
24
24
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
25
25
|
|
26
|
-
opts.separator
|
26
|
+
opts.separator ''
|
27
27
|
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile]=v }
|
31
|
-
opts.on(
|
32
|
-
|
33
|
-
|
34
|
-
opts.on(
|
35
|
-
|
36
|
-
|
28
|
+
opts.on('--k IORFILE',
|
29
|
+
'Set IOR.',
|
30
|
+
"Default: 'file://server.ior'") { |v| OPTIONS[:iorfile] = v }
|
31
|
+
opts.on('--d LVL',
|
32
|
+
'Set ORBDebugLevel value.',
|
33
|
+
'Default: 0') { |v| OPTIONS[:orb_debuglevel] = v }
|
34
|
+
opts.on('--use-implement',
|
35
|
+
'Load IDL through CORBA.implement() instead of precompiled code.',
|
36
|
+
'Default: off') { |v| OPTIONS[:use_implement] = v }
|
37
37
|
|
38
|
-
opts.separator
|
38
|
+
opts.separator ''
|
39
39
|
|
40
|
-
opts.on(
|
41
|
-
|
40
|
+
opts.on('-h', '--help',
|
41
|
+
'Show this help message.') { puts opts; exit }
|
42
42
|
|
43
43
|
opts.parse!
|
44
44
|
end
|
@@ -50,7 +50,7 @@ else
|
|
50
50
|
require 'TestC.rb'
|
51
51
|
end
|
52
52
|
|
53
|
-
orb = CORBA.ORB_init([
|
53
|
+
orb = CORBA.ORB_init(['-ORBDebugLevel', OPTIONS[:orb_debuglevel]], 'myORB')
|
54
54
|
|
55
55
|
DATA = 'Hello world! 0123456789012345678901234567890123456789012345678901234567890123456789'
|
56
56
|
|
@@ -76,11 +76,11 @@ begin
|
|
76
76
|
|
77
77
|
hello_obj.shutdown()
|
78
78
|
|
79
|
-
assert_not
|
79
|
+
assert_not 'ERROR: Object is reported nil!', CORBA::is_nil(hello_obj)
|
80
80
|
|
81
81
|
hello_obj._free_ref()
|
82
82
|
|
83
|
-
assert
|
83
|
+
assert 'ERROR: Object is reported non-nil!', CORBA::is_nil(hello_obj)
|
84
84
|
|
85
85
|
ensure
|
86
86
|
|
@@ -20,19 +20,19 @@ ARGV.options do |opts|
|
|
20
20
|
script_name = File.basename($0)
|
21
21
|
opts.banner = "Usage: ruby #{script_name} [options]"
|
22
22
|
|
23
|
-
opts.separator
|
23
|
+
opts.separator ''
|
24
24
|
|
25
|
-
opts.on(
|
26
|
-
|
27
|
-
|
28
|
-
opts.on(
|
29
|
-
|
30
|
-
|
25
|
+
opts.on('-d',
|
26
|
+
'Run with debugging output.',
|
27
|
+
'Default: false') { OPTIONS[:debug_opt] = '--d 10' }
|
28
|
+
opts.on('--use-stubs',
|
29
|
+
'Use stubs generated by RIDL.',
|
30
|
+
'Default: false (uses embedded IDL)') { OPTIONS[:use_implement] = '' }
|
31
31
|
|
32
|
-
opts.separator
|
32
|
+
opts.separator ''
|
33
33
|
|
34
|
-
opts.on(
|
35
|
-
|
34
|
+
opts.on('-h', '--help',
|
35
|
+
'Show this help message.') { puts opts; exit }
|
36
36
|
|
37
37
|
opts.parse!
|
38
38
|
end
|
@@ -59,7 +59,7 @@ end
|
|
59
59
|
|
60
60
|
exrc = clt.wait(400)
|
61
61
|
|
62
|
-
if exrc ==0
|
62
|
+
if exrc == 0
|
63
63
|
srv.wait(400)
|
64
64
|
else
|
65
65
|
srv.wait_term(400)
|