r2corba 1.5.1-x64-mingw32 → 1.6.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +5 -5
- data/README.rdoc +62 -0
- data/THANKS +4 -4
- data/lib/corba/cbase/IORMap.rb +0 -1
- data/lib/corba/cbase/ORB.rb +26 -24
- data/lib/corba/cbase/Request.rb +4 -5
- data/lib/corba/cbase/Streams.rb +2 -3
- data/lib/corba/cbase/Stub.rb +0 -1
- data/lib/corba/cbase/Typecode.rb +6 -7
- data/lib/corba/cbase/Values.rb +4 -3
- data/lib/corba/cbase/exception.rb +6 -5
- data/lib/corba/cbase/poa.rb +1 -2
- data/lib/corba/cbase/policies.rb +3 -4
- data/lib/corba/cbase/post_require.rb +1 -2
- data/lib/corba/cbase/require.rb +10 -2
- data/lib/corba/cmds/base.rb +1 -2
- data/lib/corba/cmds/test.rb +0 -1
- data/lib/corba/common/Any.rb +3 -3
- data/lib/corba/common/IDL.rb +6 -10
- data/lib/corba/common/ORB.rb +22 -23
- data/lib/corba/common/Object.rb +18 -15
- data/lib/corba/common/Request.rb +1 -2
- data/lib/corba/common/Servant.rb +4 -5
- data/lib/corba/common/Struct.rb +1 -2
- data/lib/corba/common/Stub.rb +6 -7
- data/lib/corba/common/Typecode.rb +91 -65
- data/lib/corba/common/Union.rb +6 -2
- data/lib/corba/common/Values.rb +2 -2
- data/lib/corba/common/const.rb +2 -3
- data/lib/corba/common/exception.rb +2 -2
- data/lib/corba/common/require.rb +8 -1
- data/lib/corba/common/version.rb +3 -4
- data/lib/corba/idl/BiDirPolicyC.rb +2 -3
- data/lib/corba/idl/CosNamingC.rb +4 -5
- data/lib/corba/idl/CosNamingS.rb +2 -3
- data/lib/corba/idl/IDL.rb +1 -2
- data/lib/corba/idl/IORTable.pidl +0 -1
- data/lib/corba/idl/IORTableC.rb +2 -3
- data/lib/corba/idl/MessagingC.rb +2 -3
- data/lib/corba/idl/POAC.rb +10 -11
- data/lib/corba/idl/TAO_Ext.pidl +0 -1
- data/lib/corba/idl/TAO_ExtC.rb +2 -3
- data/lib/corba/idl/r2c_orb.rb +5 -6
- data/lib/corba/idl/require.rb +0 -1
- data/lib/corba/jbase/Any.rb +29 -28
- data/lib/corba/jbase/IORMap.rb +1 -2
- data/lib/corba/jbase/ORB.rb +5 -6
- data/lib/corba/jbase/Object.rb +13 -14
- data/lib/corba/jbase/Request.rb +9 -10
- data/lib/corba/jbase/Servant.rb +11 -12
- data/lib/corba/jbase/ServerRequest.rb +8 -9
- data/lib/corba/jbase/Streams.rb +68 -5
- data/lib/corba/jbase/Stub.rb +0 -1
- data/lib/corba/jbase/Typecode.rb +17 -17
- data/lib/corba/jbase/Values.rb +2 -1
- data/lib/corba/jbase/exception.rb +2 -2
- data/lib/corba/jbase/poa.rb +21 -22
- data/lib/corba/jbase/policies.rb +33 -34
- data/lib/corba/jbase/post_require.rb +0 -1
- data/lib/corba/jbase/require.rb +5 -2
- data/lib/corba/naming.rb +0 -1
- data/lib/corba/naming_service.rb +0 -1
- data/lib/corba/poa.rb +1 -2
- data/lib/corba/policies.rb +1 -2
- data/lib/corba/require.rb +2 -3
- data/lib/corba/svcs/ins/cos_naming.rb +74 -68
- data/lib/corba/svcs/ins/ins.rb +58 -59
- data/lib/corba/svcs/ins/naming_service.rb +9 -10
- data/lib/corba.rb +1 -2
- data/lib/ridlbe/ruby/config.rb +78 -74
- data/lib/ridlbe/ruby/require.rb +0 -1
- data/lib/ridlbe/ruby/walker.rb +311 -288
- data/mkrf_conf_bingem.rb +4 -6
- data/rakelib/bin.rake +2 -3
- data/rakelib/bin.rb +4 -5
- data/rakelib/build.rake +22 -22
- data/rakelib/config.rake +2 -3
- data/rakelib/config.rb +32 -34
- data/rakelib/ext.rake +18 -77
- data/rakelib/ext.rb +19 -58
- data/rakelib/ext_r2tao.rb +33 -60
- data/rakelib/gem.rake +53 -38
- data/rakelib/gem.rb +9 -10
- data/rakelib/package.rake +2 -3
- data/rakelib/test.rake +0 -1
- data/test/BiDirectional/Test.idl +0 -1
- data/test/BiDirectional/client.rb +18 -19
- data/test/BiDirectional/run_test.rb +11 -12
- data/test/BiDirectional/server.rb +21 -23
- data/test/CORBA_Services/Naming/BindingIterator/Test.idl +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -18
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -20
- data/test/CORBA_Services/Naming/Corbaname/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -16
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Corbaname/server.rb +27 -28
- data/test/CORBA_Services/Naming/Simple/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Simple/client.rb +16 -17
- data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Simple/server.rb +19 -20
- data/test/Collocation/Diamond.idl +0 -1
- data/test/Collocation/run_test.rb +10 -11
- data/test/Collocation/test.rb +27 -21
- data/test/Connect_Timeout/Test.idl +0 -1
- data/test/Connect_Timeout/client.rb +16 -18
- data/test/Connect_Timeout/run_test.rb +10 -11
- data/test/DII/Test.idl +0 -1
- data/test/DII/client.rb +30 -31
- data/test/DII/run_test.rb +11 -12
- data/test/DII/server.rb +16 -17
- data/test/DSI/Test.idl +0 -1
- data/test/DSI/client.rb +16 -17
- data/test/DSI/run_test.rb +11 -12
- data/test/DSI/server.rb +17 -18
- data/test/Exceptions/Test.idl +0 -1
- data/test/Exceptions/client.rb +22 -23
- data/test/Exceptions/run_test.rb +11 -12
- data/test/Exceptions/server.rb +16 -17
- data/test/Hello/Test.idl +0 -1
- data/test/Hello/client.rb +16 -17
- data/test/Hello/run_test.rb +11 -12
- data/test/Hello/server.rb +17 -18
- data/test/IDL_Test/Test.idl +4 -1
- data/test/IDL_Test/client.rb +24 -23
- data/test/IDL_Test/run_test.rb +11 -12
- data/test/IDL_Test/server.rb +23 -19
- data/test/IORMap/Test.idl +0 -1
- data/test/IORMap/client.rb +14 -15
- data/test/IORMap/run_test.rb +11 -12
- data/test/IORMap/server.rb +23 -24
- data/test/IORTable/Test.idl +0 -1
- data/test/IORTable/client.rb +14 -15
- data/test/IORTable/run_test.rb +11 -12
- data/test/IORTable/server.rb +23 -24
- data/test/Implicit_Conversion/Test.idl +0 -1
- data/test/Implicit_Conversion/client.rb +20 -18
- data/test/Implicit_Conversion/run_test.rb +11 -12
- data/test/Implicit_Conversion/server.rb +16 -17
- data/test/Multi_Threading/Multiple_ORB/Test.idl +0 -1
- data/test/Multi_Threading/Multiple_ORB/client.rb +14 -15
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -13
- data/test/Multi_Threading/Multiple_ORB/server.rb +17 -18
- data/test/Multi_Threading/Simple/Test.idl +0 -1
- data/test/Multi_Threading/Simple/client.rb +17 -18
- data/test/Multi_Threading/Simple/run_test.rb +11 -12
- data/test/Multi_Threading/Simple/server.rb +17 -18
- data/test/Multi_Threading/Threads/Test.idl +0 -4
- data/test/Multi_Threading/Threads/client.rb +23 -26
- data/test/Multi_Threading/Threads/run_test.rb +11 -12
- data/test/Multi_Threading/Threads/server.rb +19 -22
- data/test/Multi_Threading/Threads/watchdog.rb +16 -16
- data/test/Multiple_Servant_Interfaces/Test.idl +0 -1
- data/test/Multiple_Servant_Interfaces/client.rb +14 -15
- data/test/Multiple_Servant_Interfaces/run_test.rb +11 -12
- data/test/Multiple_Servant_Interfaces/server.rb +18 -19
- data/test/Nil/Test.idl +0 -1
- data/test/Nil/run_test.rb +10 -11
- data/test/Nil/test.rb +22 -20
- data/test/OBV/AbstractInterface/client.rb +14 -15
- data/test/OBV/AbstractInterface/run_test.rb +11 -12
- data/test/OBV/AbstractInterface/server.rb +20 -20
- data/test/OBV/AbstractInterface/test.idl +0 -1
- data/test/OBV/Custom/OBV_impl.rb +2 -1
- data/test/OBV/Custom/client.rb +14 -15
- data/test/OBV/Custom/run_test.rb +11 -12
- data/test/OBV/Custom/server.rb +16 -17
- data/test/OBV/Simple/OBV_impl.rb +1 -1
- data/test/OBV/Simple/client.rb +14 -15
- data/test/OBV/Simple/run_test.rb +11 -12
- data/test/OBV/Simple/server.rb +16 -17
- data/test/OBV/Simple_Event/Event_impl.rb +1 -1
- data/test/OBV/Simple_Event/client.rb +14 -15
- data/test/OBV/Simple_Event/run_test.rb +11 -12
- data/test/OBV/Simple_Event/server.rb +16 -17
- data/test/OBV/Supports/client.rb +19 -20
- data/test/OBV/Supports/run_test.rb +11 -12
- data/test/OBV/Supports/server.rb +15 -16
- data/test/OBV/Supports/supports.idl +0 -1
- data/test/OBV/Supports/supports_impl.rb +3 -1
- data/test/OBV/Tree/client.rb +14 -15
- data/test/OBV/Tree/run_test.rb +11 -12
- data/test/OBV/Tree/server.rb +19 -20
- data/test/OBV/Tree/test.idl +0 -1
- data/test/OBV/Truncatable/Extra.idl +0 -1
- data/test/OBV/Truncatable/Truncatable_impl.rb +1 -2
- data/test/OBV/Truncatable/client.rb +57 -58
- data/test/OBV/Truncatable/run_test.rb +11 -12
- data/test/OBV/Truncatable/server.rb +15 -16
- data/test/OBV/ValueBox/client.rb +154 -154
- data/test/OBV/ValueBox/run_test.rb +11 -12
- data/test/OBV/ValueBox/server.rb +42 -42
- data/test/Object/Test.idl +0 -1
- data/test/Object/client.rb +15 -16
- data/test/Object/run_test.rb +11 -12
- data/test/Object/server.rb +19 -20
- data/test/POA/run_test.rb +10 -11
- data/test/POA/test.rb +17 -18
- data/test/Param_Test/client.rb +53 -54
- data/test/Param_Test/run_test.rb +11 -12
- data/test/Param_Test/server.rb +60 -61
- data/test/Performance/Simple/Test.idl +0 -1
- data/test/Performance/Simple/client.rb +16 -17
- data/test/Performance/Simple/run_test.rb +11 -12
- data/test/Performance/Simple/server.rb +16 -17
- data/test/Policies/Test.idl +0 -1
- data/test/Policies/run_test.rb +10 -11
- data/test/Policies/test.rb +23 -25
- data/test/Timeout/client.rb +21 -22
- data/test/Timeout/run_test.rb +11 -12
- data/test/Timeout/server.rb +19 -20
- data/test/Timeout/test.idl +0 -1
- data/test/lib/assert.rb +0 -2
- data/test/lib/test.rb +29 -25
- data/test/test_runner.rb +22 -24
- metadata +24 -52
- data/README +0 -62
- data/test/BiDirectional/server.ior +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/corbaname.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Simple/ins.ior +0 -1
- data/test/DII/server.ior +0 -1
- data/test/DSI/server.ior +0 -1
- data/test/Exceptions/server.ior +0 -1
- data/test/IDL_Test/server.ior +0 -1
- data/test/IORMap/server.ior +0 -1
- data/test/IORTable/server.ior +0 -1
- data/test/Implicit_Conversion/server.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server0.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server1.ior +0 -1
- data/test/Multi_Threading/Simple/server.ior +0 -1
- data/test/Multi_Threading/Threads/server.ior +0 -1
- data/test/Multi_Threading/Threads/watchdog.ior +0 -1
- data/test/Multiple_Servant_Interfaces/server.ior +0 -1
- data/test/OBV/AbstractInterface/server.ior +0 -1
- data/test/OBV/Custom/server.ior +0 -1
- data/test/OBV/Simple/server.ior +0 -1
- data/test/OBV/Simple_Event/server.ior +0 -1
- data/test/OBV/Supports/server.ior +0 -1
- data/test/OBV/Tree/server.ior +0 -1
- data/test/OBV/Truncatable/server.ior +0 -1
- data/test/OBV/ValueBox/server.ior +0 -1
- data/test/Object/server.ior +0 -1
- data/test/Param_Test/server.ior +0 -1
- data/test/Performance/Simple/server.ior +0 -1
- data/test/Timeout/server.ior +0 -1
data/lib/corba/jbase/Streams.rb
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
13
|
module R2CORBA
|
@@ -58,7 +57,7 @@ module R2CORBA
|
|
58
57
|
when TK_DOUBLE
|
59
58
|
read_double()
|
60
59
|
when TK_LONGDOUBLE
|
61
|
-
raise CORBA::NO_IMPLEMENT.new('LongDouble not supported',0,CORBA::COMPLETED_NO)
|
60
|
+
raise CORBA::NO_IMPLEMENT.new('LongDouble not supported', 0, CORBA::COMPLETED_NO)
|
62
61
|
when TK_FIXED
|
63
62
|
read_fixed()
|
64
63
|
when TK_CHAR
|
@@ -93,6 +92,7 @@ module R2CORBA
|
|
93
92
|
CORBA::Exception.native2r($!)
|
94
93
|
end
|
95
94
|
end
|
95
|
+
|
96
96
|
def read_boolean()
|
97
97
|
begin
|
98
98
|
self.stream_.read_boolean()
|
@@ -100,6 +100,7 @@ module R2CORBA
|
|
100
100
|
CORBA::Exception.native2r($!)
|
101
101
|
end
|
102
102
|
end
|
103
|
+
|
103
104
|
def read_boolean_array(arr, offset, length)
|
104
105
|
jarr = Array.new(arr.size).to_java(:boolean)
|
105
106
|
begin
|
@@ -109,6 +110,7 @@ module R2CORBA
|
|
109
110
|
end
|
110
111
|
arr.fill(offset, length) {|i| jarr[i]}
|
111
112
|
end
|
113
|
+
|
112
114
|
def read_char()
|
113
115
|
begin
|
114
116
|
self.stream_.read_char().chr
|
@@ -116,6 +118,7 @@ module R2CORBA
|
|
116
118
|
CORBA::Exception.native2r($!)
|
117
119
|
end
|
118
120
|
end
|
121
|
+
|
119
122
|
def read_char_array(arr, offset, length)
|
120
123
|
jarr = Array.new(arr.size).to_java(:char)
|
121
124
|
begin
|
@@ -125,6 +128,7 @@ module R2CORBA
|
|
125
128
|
end
|
126
129
|
arr.fill(offset, length) {|i| jarr[i].chr }
|
127
130
|
end
|
131
|
+
|
128
132
|
def read_wchar()
|
129
133
|
begin
|
130
134
|
self.stream_.read_wchar()
|
@@ -132,6 +136,7 @@ module R2CORBA
|
|
132
136
|
CORBA::Exception.native2r($!)
|
133
137
|
end
|
134
138
|
end
|
139
|
+
|
135
140
|
def read_wchar_array(arr, offset, length)
|
136
141
|
jarr = Array.new(arr.size).to_java(:char)
|
137
142
|
begin
|
@@ -141,6 +146,7 @@ module R2CORBA
|
|
141
146
|
end
|
142
147
|
arr.fill(offset, length) {|i| jarr[i] }
|
143
148
|
end
|
149
|
+
|
144
150
|
def read_octet(value)
|
145
151
|
begin
|
146
152
|
[self.stream_.read_octet()].pack('c').unpack('C').first
|
@@ -148,6 +154,7 @@ module R2CORBA
|
|
148
154
|
CORBA::Exception.native2r($!)
|
149
155
|
end
|
150
156
|
end
|
157
|
+
|
151
158
|
def read_octet_array(arr, offset, length)
|
152
159
|
jarr = Array.new(arr.size).to_java(:byte)
|
153
160
|
begin
|
@@ -158,6 +165,7 @@ module R2CORBA
|
|
158
165
|
jarr = jarr.pack('c*').unpack('C*')
|
159
166
|
arr.fill(offset, length) {|i| jarr[i] }
|
160
167
|
end
|
168
|
+
|
161
169
|
def read_short()
|
162
170
|
begin
|
163
171
|
self.stream_.read_short()
|
@@ -165,6 +173,7 @@ module R2CORBA
|
|
165
173
|
CORBA::Exception.native2r($!)
|
166
174
|
end
|
167
175
|
end
|
176
|
+
|
168
177
|
def read_short_array(arr, offset, length)
|
169
178
|
jarr = Array.new(arr.size).to_java(:short)
|
170
179
|
begin
|
@@ -174,6 +183,7 @@ module R2CORBA
|
|
174
183
|
end
|
175
184
|
arr.fill(offset, length) {|i| jarr[i] }
|
176
185
|
end
|
186
|
+
|
177
187
|
def read_ushort()
|
178
188
|
begin
|
179
189
|
[self.stream_.read_ushort()].pack('s').unpack('S').first
|
@@ -181,6 +191,7 @@ module R2CORBA
|
|
181
191
|
CORBA::Exception.native2r($!)
|
182
192
|
end
|
183
193
|
end
|
194
|
+
|
184
195
|
def read_ushort_array(arr, offset, length)
|
185
196
|
jarr = Array.new(arr.size).to_java(:short)
|
186
197
|
begin
|
@@ -191,6 +202,7 @@ module R2CORBA
|
|
191
202
|
jarr = jarr.pack('s*').unpack('S*')
|
192
203
|
arr.fill(offset, length) {|i| jarr[i] }
|
193
204
|
end
|
205
|
+
|
194
206
|
def read_long()
|
195
207
|
begin
|
196
208
|
self.stream_.read_long()
|
@@ -198,6 +210,7 @@ module R2CORBA
|
|
198
210
|
CORBA::Exception.native2r($!)
|
199
211
|
end
|
200
212
|
end
|
213
|
+
|
201
214
|
def read_long_array(arr, offset, length)
|
202
215
|
jarr = Array.new(arr.size).to_java(:int)
|
203
216
|
begin
|
@@ -207,6 +220,7 @@ module R2CORBA
|
|
207
220
|
end
|
208
221
|
arr.fill(offset, length) {|i| jarr[i] }
|
209
222
|
end
|
223
|
+
|
210
224
|
def read_ulong()
|
211
225
|
begin
|
212
226
|
[self.stream_.read_ulong()].pack('l').unpack('L').first
|
@@ -214,6 +228,7 @@ module R2CORBA
|
|
214
228
|
CORBA::Exception.native2r($!)
|
215
229
|
end
|
216
230
|
end
|
231
|
+
|
217
232
|
def read_ulong_array(arr, offset, length)
|
218
233
|
jarr = Array.new(arr.size).to_java(:int)
|
219
234
|
begin
|
@@ -224,6 +239,7 @@ module R2CORBA
|
|
224
239
|
jarr = jarr.pack('l*').unpack('L*')
|
225
240
|
arr.fill(offset, length) {|i| jarr[i] }
|
226
241
|
end
|
242
|
+
|
227
243
|
def read_longlong()
|
228
244
|
begin
|
229
245
|
self.stream_.read_longlong()
|
@@ -231,6 +247,7 @@ module R2CORBA
|
|
231
247
|
CORBA::Exception.native2r($!)
|
232
248
|
end
|
233
249
|
end
|
250
|
+
|
234
251
|
def read_longlong_array(arr, offset, length)
|
235
252
|
jarr = Array.new(arr.size).to_java(:long)
|
236
253
|
begin
|
@@ -240,6 +257,7 @@ module R2CORBA
|
|
240
257
|
end
|
241
258
|
arr.fill(offset, length) {|i| jarr[i] }
|
242
259
|
end
|
260
|
+
|
243
261
|
def read_ulonglong()
|
244
262
|
begin
|
245
263
|
[self.stream_.read_ulonglong()].pack('q').unpack('Q').first
|
@@ -247,6 +265,7 @@ module R2CORBA
|
|
247
265
|
CORBA::Exception.native2r($!)
|
248
266
|
end
|
249
267
|
end
|
268
|
+
|
250
269
|
def read_ulonglong_array(arr, offset, length)
|
251
270
|
jarr = Array.new(arr.size).to_java(:long)
|
252
271
|
begin
|
@@ -257,6 +276,7 @@ module R2CORBA
|
|
257
276
|
jarr = jarr.pack('q*').unpack('Q*')
|
258
277
|
arr.fill(offset, length) {|i| jarr[i] }
|
259
278
|
end
|
279
|
+
|
260
280
|
def read_float()
|
261
281
|
begin
|
262
282
|
self.stream_.read_float()
|
@@ -264,6 +284,7 @@ module R2CORBA
|
|
264
284
|
CORBA::Exception.native2r($!)
|
265
285
|
end
|
266
286
|
end
|
287
|
+
|
267
288
|
def read_float_array(arr, offset, length)
|
268
289
|
jarr = Array.new(arr.size).to_java(:float)
|
269
290
|
begin
|
@@ -273,6 +294,7 @@ module R2CORBA
|
|
273
294
|
end
|
274
295
|
arr.fill(offset, length) {|i| jarr[i] }
|
275
296
|
end
|
297
|
+
|
276
298
|
def read_double()
|
277
299
|
begin
|
278
300
|
self.stream_.read_double()
|
@@ -280,6 +302,7 @@ module R2CORBA
|
|
280
302
|
CORBA::Exception.native2r($!)
|
281
303
|
end
|
282
304
|
end
|
305
|
+
|
283
306
|
def read_double_array(arr, offset, length)
|
284
307
|
jarr = Array.new(arr.size).to_java(:double)
|
285
308
|
begin
|
@@ -289,6 +312,7 @@ module R2CORBA
|
|
289
312
|
end
|
290
313
|
arr.fill(offset, length) {|i| jarr[i] }
|
291
314
|
end
|
315
|
+
|
292
316
|
def read_string()
|
293
317
|
begin
|
294
318
|
self.stream_.read_string()
|
@@ -296,6 +320,7 @@ module R2CORBA
|
|
296
320
|
CORBA::Exception.native2r($!)
|
297
321
|
end
|
298
322
|
end
|
323
|
+
|
299
324
|
def read_wstring()
|
300
325
|
begin
|
301
326
|
self.stream_.read_wstring()
|
@@ -303,6 +328,7 @@ module R2CORBA
|
|
303
328
|
CORBA::Exception.native2r($!)
|
304
329
|
end
|
305
330
|
end
|
331
|
+
|
306
332
|
def read_Object()
|
307
333
|
begin
|
308
334
|
CORBA::Object._wrap_native(self.stream_().read_Object())
|
@@ -310,6 +336,7 @@ module R2CORBA
|
|
310
336
|
CORBA::Exception.native2r($!)
|
311
337
|
end
|
312
338
|
end
|
339
|
+
|
313
340
|
def read_TypeCode()
|
314
341
|
begin
|
315
342
|
CORBA::TypeCode._wrap_native(self.stream_().read_TypeCode())
|
@@ -317,6 +344,7 @@ module R2CORBA
|
|
317
344
|
CORBA::Exception.native2r($!)
|
318
345
|
end
|
319
346
|
end
|
347
|
+
|
320
348
|
def read_fixed()
|
321
349
|
begin
|
322
350
|
java.math.BigDecimal.new(self.stream_.read_fixed().toString())
|
@@ -324,6 +352,7 @@ module R2CORBA
|
|
324
352
|
CORBA::Exception.native2r($!)
|
325
353
|
end
|
326
354
|
end
|
355
|
+
|
327
356
|
def read_construct(tc)
|
328
357
|
begin
|
329
358
|
jany = self.stream_.orb().create_any()
|
@@ -333,6 +362,7 @@ module R2CORBA
|
|
333
362
|
CORBA::Exception.native2r($!)
|
334
363
|
end
|
335
364
|
end
|
365
|
+
|
336
366
|
def read_Abstract()
|
337
367
|
begin
|
338
368
|
obj = self.stream_.read_abstract_interface()
|
@@ -342,6 +372,7 @@ module R2CORBA
|
|
342
372
|
obj = CORBA::Object._wrap_native(obj) if obj.is_a?(CORBA::Native::Object)
|
343
373
|
obj
|
344
374
|
end
|
375
|
+
|
345
376
|
def read_value()
|
346
377
|
begin
|
347
378
|
self.stream_.read_value()
|
@@ -403,7 +434,7 @@ module R2CORBA
|
|
403
434
|
when TK_DOUBLE
|
404
435
|
write_double(value)
|
405
436
|
when TK_LONGDOUBLE
|
406
|
-
raise CORBA::NO_IMPLEMENT.new('LongDouble not supported',0,CORBA::COMPLETED_NO)
|
437
|
+
raise CORBA::NO_IMPLEMENT.new('LongDouble not supported', 0, CORBA::COMPLETED_NO)
|
407
438
|
when TK_FIXED
|
408
439
|
write_fixed(value)
|
409
440
|
when TK_CHAR
|
@@ -437,6 +468,7 @@ module R2CORBA
|
|
437
468
|
CORBA::Exception.native2r($!)
|
438
469
|
end
|
439
470
|
end
|
471
|
+
|
440
472
|
def write_boolean(value)
|
441
473
|
begin
|
442
474
|
self.stream_.write_boolean(value)
|
@@ -444,6 +476,7 @@ module R2CORBA
|
|
444
476
|
CORBA::Exception.native2r($!)
|
445
477
|
end
|
446
478
|
end
|
479
|
+
|
447
480
|
def write_boolean_array(value, offset, length)
|
448
481
|
begin
|
449
482
|
self.stream_.write_boolean_array(value.to_java(:boolean), offset, length)
|
@@ -451,6 +484,7 @@ module R2CORBA
|
|
451
484
|
CORBA::Exception.native2r($!)
|
452
485
|
end
|
453
486
|
end
|
487
|
+
|
454
488
|
def write_char(value)
|
455
489
|
begin
|
456
490
|
self.stream_.write_char(value[0])
|
@@ -458,6 +492,7 @@ module R2CORBA
|
|
458
492
|
CORBA::Exception.native2r($!)
|
459
493
|
end
|
460
494
|
end
|
495
|
+
|
461
496
|
def write_char_array(value, offset, length)
|
462
497
|
begin
|
463
498
|
self.stream_.write_char_array(value.collect{|c| c[0]}.to_java(:char), offset, length)
|
@@ -465,9 +500,11 @@ module R2CORBA
|
|
465
500
|
CORBA::Exception.native2r($!)
|
466
501
|
end
|
467
502
|
end
|
503
|
+
|
468
504
|
def write_wchar(value)
|
469
505
|
self.stream_.write_wchar(value)
|
470
506
|
end
|
507
|
+
|
471
508
|
def write_wchar_array(value, offset, length)
|
472
509
|
begin
|
473
510
|
self.stream_.write_wchar_array(value.to_java(:char), offset, length)
|
@@ -475,6 +512,7 @@ module R2CORBA
|
|
475
512
|
CORBA::Exception.native2r($!)
|
476
513
|
end
|
477
514
|
end
|
515
|
+
|
478
516
|
def write_octet(value)
|
479
517
|
begin
|
480
518
|
self.stream_.write_octet([value].pack('C').unpack('c').first)
|
@@ -482,6 +520,7 @@ module R2CORBA
|
|
482
520
|
CORBA::Exception.native2r($!)
|
483
521
|
end
|
484
522
|
end
|
523
|
+
|
485
524
|
def write_octet_array(value, offset, length)
|
486
525
|
begin
|
487
526
|
self.stream_.write_octet_array(value.pack('C*').unpack('c*').to_java(:byte), offset, length)
|
@@ -489,6 +528,7 @@ module R2CORBA
|
|
489
528
|
CORBA::Exception.native2r($!)
|
490
529
|
end
|
491
530
|
end
|
531
|
+
|
492
532
|
def write_short(value)
|
493
533
|
begin
|
494
534
|
self.stream_.write_short(value)
|
@@ -496,6 +536,7 @@ module R2CORBA
|
|
496
536
|
CORBA::Exception.native2r($!)
|
497
537
|
end
|
498
538
|
end
|
539
|
+
|
499
540
|
def write_short_array(value, offset, length)
|
500
541
|
begin
|
501
542
|
self.stream_.write_short_array(value.to_java(:short), offset, length)
|
@@ -503,6 +544,7 @@ module R2CORBA
|
|
503
544
|
CORBA::Exception.native2r($!)
|
504
545
|
end
|
505
546
|
end
|
547
|
+
|
506
548
|
def write_ushort(value)
|
507
549
|
begin
|
508
550
|
self.stream_.write_ushort([value].pack('S').unpack('s').first)
|
@@ -510,6 +552,7 @@ module R2CORBA
|
|
510
552
|
CORBA::Exception.native2r($!)
|
511
553
|
end
|
512
554
|
end
|
555
|
+
|
513
556
|
def write_ushort_array(value, offset, length)
|
514
557
|
begin
|
515
558
|
self.stream_.write_ushort_array(value.pack('S*').unpack('s*').to_java(:short), offset, length)
|
@@ -517,6 +560,7 @@ module R2CORBA
|
|
517
560
|
CORBA::Exception.native2r($!)
|
518
561
|
end
|
519
562
|
end
|
563
|
+
|
520
564
|
def write_long(value)
|
521
565
|
begin
|
522
566
|
self.stream_.write_long(value)
|
@@ -524,6 +568,7 @@ module R2CORBA
|
|
524
568
|
CORBA::Exception.native2r($!)
|
525
569
|
end
|
526
570
|
end
|
571
|
+
|
527
572
|
def write_long_array(value, offset, length)
|
528
573
|
begin
|
529
574
|
self.stream_.write_long_array(value.to_java(:int), offset, length)
|
@@ -531,6 +576,7 @@ module R2CORBA
|
|
531
576
|
CORBA::Exception.native2r($!)
|
532
577
|
end
|
533
578
|
end
|
579
|
+
|
534
580
|
def write_ulong(value)
|
535
581
|
begin
|
536
582
|
self.stream_.write_ulong([value].pack('L').unpack('l').first)
|
@@ -538,6 +584,7 @@ module R2CORBA
|
|
538
584
|
CORBA::Exception.native2r($!)
|
539
585
|
end
|
540
586
|
end
|
587
|
+
|
541
588
|
def write_ulong_array(value, offset, length)
|
542
589
|
begin
|
543
590
|
self.stream_.write_ulong_array(value.pack('L*').unpack('l*').to_java(:int), offset, length)
|
@@ -545,6 +592,7 @@ module R2CORBA
|
|
545
592
|
CORBA::Exception.native2r($!)
|
546
593
|
end
|
547
594
|
end
|
595
|
+
|
548
596
|
def write_longlong(value)
|
549
597
|
begin
|
550
598
|
self.stream_.write_longlong(value)
|
@@ -552,6 +600,7 @@ module R2CORBA
|
|
552
600
|
CORBA::Exception.native2r($!)
|
553
601
|
end
|
554
602
|
end
|
603
|
+
|
555
604
|
def write_longlong_array(value, offset, length)
|
556
605
|
begin
|
557
606
|
self.stream_.write_longlong_array(value.to_java(:long), offset, length)
|
@@ -559,6 +608,7 @@ module R2CORBA
|
|
559
608
|
CORBA::Exception.native2r($!)
|
560
609
|
end
|
561
610
|
end
|
611
|
+
|
562
612
|
def write_ulonglong(value)
|
563
613
|
begin
|
564
614
|
self.stream_.write_ulonglong([value].pack('Q').unpack('q').first)
|
@@ -566,6 +616,7 @@ module R2CORBA
|
|
566
616
|
CORBA::Exception.native2r($!)
|
567
617
|
end
|
568
618
|
end
|
619
|
+
|
569
620
|
def write_ulonglong_array(value, offset, length)
|
570
621
|
begin
|
571
622
|
self.stream_.write_ulonglong_array(value.pack('Q*').unpack('q*').to_java(:long), offset, length)
|
@@ -573,6 +624,7 @@ module R2CORBA
|
|
573
624
|
CORBA::Exception.native2r($!)
|
574
625
|
end
|
575
626
|
end
|
627
|
+
|
576
628
|
def write_float(value)
|
577
629
|
begin
|
578
630
|
self.stream_.write_float(value)
|
@@ -580,6 +632,7 @@ module R2CORBA
|
|
580
632
|
CORBA::Exception.native2r($!)
|
581
633
|
end
|
582
634
|
end
|
635
|
+
|
583
636
|
def write_float_array(value, offset, length)
|
584
637
|
begin
|
585
638
|
self.stream_.write_float_array(value.to_java(:float), offset, length)
|
@@ -587,6 +640,7 @@ module R2CORBA
|
|
587
640
|
CORBA::Exception.native2r($!)
|
588
641
|
end
|
589
642
|
end
|
643
|
+
|
590
644
|
def write_double(value)
|
591
645
|
begin
|
592
646
|
self.stream_.write_double(value)
|
@@ -594,6 +648,7 @@ module R2CORBA
|
|
594
648
|
CORBA::Exception.native2r($!)
|
595
649
|
end
|
596
650
|
end
|
651
|
+
|
597
652
|
def write_double_array(value, offset, length)
|
598
653
|
begin
|
599
654
|
self.stream_.write_double_array(value.to_java(:double), offset, length)
|
@@ -601,6 +656,7 @@ module R2CORBA
|
|
601
656
|
CORBA::Exception.native2r($!)
|
602
657
|
end
|
603
658
|
end
|
659
|
+
|
604
660
|
def write_string(value)
|
605
661
|
begin
|
606
662
|
self.stream_.write_string(value)
|
@@ -608,13 +664,15 @@ module R2CORBA
|
|
608
664
|
CORBA::Exception.native2r($!)
|
609
665
|
end
|
610
666
|
end
|
667
|
+
|
611
668
|
def write_wstring(value)
|
612
669
|
begin
|
613
|
-
self.stream_.write_wstring(value.inject('') {|s,b| s << b.chr})
|
670
|
+
self.stream_.write_wstring(value.inject('') {|s, b| s << b.chr})
|
614
671
|
rescue ::NativeException
|
615
672
|
CORBA::Exception.native2r($!)
|
616
673
|
end
|
617
674
|
end
|
675
|
+
|
618
676
|
def write_fixed(value)
|
619
677
|
begin
|
620
678
|
self.stream_.write_fixed(java.math.BigDecimal.new(value.to_s))
|
@@ -622,6 +680,7 @@ module R2CORBA
|
|
622
680
|
CORBA::Exception.native2r($!)
|
623
681
|
end
|
624
682
|
end
|
683
|
+
|
625
684
|
def write_Object(value)
|
626
685
|
begin
|
627
686
|
self.stream_.write_Object(value.objref_)
|
@@ -629,6 +688,7 @@ module R2CORBA
|
|
629
688
|
CORBA::Exception.native2r($!)
|
630
689
|
end
|
631
690
|
end
|
691
|
+
|
632
692
|
def write_TypeCode(value)
|
633
693
|
begin
|
634
694
|
self.stream_.write_TypeCode(value.tc_)
|
@@ -636,6 +696,7 @@ module R2CORBA
|
|
636
696
|
CORBA::Exception.native2r($!)
|
637
697
|
end
|
638
698
|
end
|
699
|
+
|
639
700
|
def write_construct(value, tc)
|
640
701
|
begin
|
641
702
|
CORBA::Any.to_any(value, tc).to_java(self.stream_().orb()).write_value(self.stream_)
|
@@ -643,6 +704,7 @@ module R2CORBA
|
|
643
704
|
CORBA::Exception.native2r($!)
|
644
705
|
end
|
645
706
|
end
|
707
|
+
|
646
708
|
def write_Abstract(value)
|
647
709
|
begin
|
648
710
|
self.stream_().write_abstract_interface(value.is_a?(CORBA::Object) ? value.objref_ : value)
|
@@ -650,6 +712,7 @@ module R2CORBA
|
|
650
712
|
CORBA::Exception.native2r($!)
|
651
713
|
end
|
652
714
|
end
|
715
|
+
|
653
716
|
def write_value(value)
|
654
717
|
begin
|
655
718
|
self.stream_.write_value(value)
|
@@ -668,4 +731,4 @@ module R2CORBA
|
|
668
731
|
end
|
669
732
|
end
|
670
733
|
end
|
671
|
-
end
|
734
|
+
end
|
data/lib/corba/jbase/Stub.rb
CHANGED
data/lib/corba/jbase/Typecode.rb
CHANGED
@@ -8,9 +8,8 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
|
-
require
|
12
|
+
require 'corba/jbase/Any.rb'
|
14
13
|
require 'bigdecimal'
|
15
14
|
|
16
15
|
module R2CORBA
|
@@ -163,7 +162,7 @@ module R2CORBA
|
|
163
162
|
content_tc = args.shift
|
164
163
|
length = args
|
165
164
|
raise ArgumentError, 'expected CORBA::TypeCode' unless content_tc.is_a?(CORBA::TypeCode)
|
166
|
-
if length.size>1
|
165
|
+
if length.size > 1
|
167
166
|
this_len = length.shift
|
168
167
|
content_tc = self.class.new(content_tc, *length)
|
169
168
|
else
|
@@ -232,12 +231,12 @@ module R2CORBA
|
|
232
231
|
@members = []
|
233
232
|
members_.each { |n, tc, access| add_member(n, tc, access) }
|
234
233
|
jmembers = CORBA::Native::Reflect::Array.newInstance(CORBA::Native::ValueMember.java_class, @members.size)
|
235
|
-
@members.each_with_index do |(mn, mtc, access),i|
|
234
|
+
@members.each_with_index do |(mn, mtc, access), i|
|
236
235
|
m_id = mtc.is_a?(IdentifiedTypeCode) ? mtc.id : 'IDL:*primitive*:1.0'
|
237
236
|
jmembers[i] = CORBA::Native::ValueMember.new(mn.to_s, m_id,
|
238
237
|
name, id.split(':').last,
|
239
238
|
mtc.tc_, nil,
|
240
|
-
access
|
239
|
+
access == :public ?
|
241
240
|
CORBA::PUBLIC_MEMBER :
|
242
241
|
CORBA::PRIVATE_MEMBER)
|
243
242
|
end
|
@@ -248,7 +247,7 @@ module R2CORBA
|
|
248
247
|
|
249
248
|
protected
|
250
249
|
|
251
|
-
def _create_tc(id,name,modifier,base,jmembers)
|
250
|
+
def _create_tc(id, name, modifier, base, jmembers)
|
252
251
|
begin
|
253
252
|
CORBA::ORB._orb.create_value_tc(id.to_s,
|
254
253
|
name.to_s,
|
@@ -266,7 +265,7 @@ module R2CORBA
|
|
266
265
|
|
267
266
|
protected
|
268
267
|
|
269
|
-
def _create_tc(id,name,modifier,base,jmembers)
|
268
|
+
def _create_tc(id, name, modifier, base, jmembers)
|
270
269
|
# JaCORB 2.3.1' does not support tk_event typecodes yet;
|
271
270
|
# so just let it be a regular valuetype
|
272
271
|
# NOTE: this will not be interoperable between jR2CORBA and R2CORBA
|
@@ -369,7 +368,7 @@ module R2CORBA
|
|
369
368
|
@members = []
|
370
369
|
members_.each { |n, tc| add_member(n, tc) }
|
371
370
|
jmembers = CORBA::Native::Reflect::Array.newInstance(CORBA::Native::StructMember.java_class, @members.size)
|
372
|
-
@members.each_with_index {|(mn, mtc),i| jmembers[i] = CORBA::Native::StructMember.new(mn.to_s, mtc.tc_, nil) }
|
371
|
+
@members.each_with_index {|(mn, mtc), i| jmembers[i] = CORBA::Native::StructMember.new(mn.to_s, mtc.tc_, nil) }
|
373
372
|
@tc_ = _create_tc(id, name, jmembers)
|
374
373
|
super(id)
|
375
374
|
end
|
@@ -377,7 +376,7 @@ module R2CORBA
|
|
377
376
|
|
378
377
|
protected
|
379
378
|
|
380
|
-
def _create_tc(id,name,jmembers)
|
379
|
+
def _create_tc(id, name, jmembers)
|
381
380
|
begin
|
382
381
|
CORBA::ORB._orb.create_struct_tc(id.to_s, name.to_s, jmembers)
|
383
382
|
rescue ::NativeException
|
@@ -390,20 +389,20 @@ module R2CORBA
|
|
390
389
|
class Except < Struct
|
391
390
|
|
392
391
|
def from_java(jex)
|
393
|
-
raise CORBA::BAD_PARAM.new('org.om.CORBA.UserException expected',0,CORBA::COMPLETED_NO) unless jex.is_a?(CORBA::Native::UserException)
|
392
|
+
raise CORBA::BAD_PARAM.new('org.om.CORBA.UserException expected', 0, CORBA::COMPLETED_NO) unless jex.is_a?(CORBA::Native::UserException)
|
394
393
|
ex = get_type.new
|
395
|
-
members.each {|mname,mtc| ex.__send__("#{mname}=".to_sym, jex.__send__(mname.to_sym)) }
|
394
|
+
members.each {|mname, mtc| ex.__send__("#{mname}=".to_sym, jex.__send__(mname.to_sym)) }
|
396
395
|
ex
|
397
396
|
end
|
398
397
|
|
399
398
|
def is_compatible?(jex)
|
400
|
-
raise CORBA::BAD_PARAM.new('org.om.CORBA.UserException expected',0,CORBA::COMPLETED_NO) unless jex.is_a?(CORBA::Native::UserException)
|
401
|
-
members.all? {|mname,mtc| jex.respond_to?(mname.to_sym) }
|
399
|
+
raise CORBA::BAD_PARAM.new('org.om.CORBA.UserException expected', 0, CORBA::COMPLETED_NO) unless jex.is_a?(CORBA::Native::UserException)
|
400
|
+
members.all? {|mname, mtc| jex.respond_to?(mname.to_sym) }
|
402
401
|
end
|
403
402
|
|
404
403
|
protected
|
405
404
|
|
406
|
-
def _create_tc(id,name,jmembers)
|
405
|
+
def _create_tc(id, name, jmembers)
|
407
406
|
begin
|
408
407
|
CORBA::ORB._orb.create_exception_tc(id.to_s, name.to_s, jmembers)
|
409
408
|
rescue ::NativeException
|
@@ -424,7 +423,7 @@ module R2CORBA
|
|
424
423
|
@members = []
|
425
424
|
def_inx = @tc_.default_index
|
426
425
|
@tc_.member_count.times do |i|
|
427
|
-
if def_inx < 0
|
426
|
+
if def_inx < 0 || def_inx != i
|
428
427
|
ml_ = Any.from_java(@tc_.member_label(i))
|
429
428
|
else
|
430
429
|
ml_ = :default
|
@@ -450,6 +449,7 @@ module R2CORBA
|
|
450
449
|
super(id)
|
451
450
|
end
|
452
451
|
end
|
452
|
+
|
453
453
|
# because creating the native tc involves creating Any's we postpone until actually needed
|
454
454
|
def tc_
|
455
455
|
@tc_ ||= begin
|
@@ -468,7 +468,7 @@ module R2CORBA
|
|
468
468
|
|
469
469
|
protected
|
470
470
|
|
471
|
-
def _create_tc(id,name, disctc,jmembers)
|
471
|
+
def _create_tc(id, name, disctc, jmembers)
|
472
472
|
begin
|
473
473
|
CORBA::ORB._orb.create_union_tc(id.to_s, name.to_s, disctc.tc_, jmembers)
|
474
474
|
rescue ::NativeException
|
@@ -505,7 +505,7 @@ module R2CORBA
|
|
505
505
|
def TypeCode.get_primitive_tc(kind)
|
506
506
|
case kind
|
507
507
|
when CORBA::TK_OBJREF
|
508
|
-
TypeCode::ObjectRef.new(
|
508
|
+
TypeCode::ObjectRef.new('IDL:omg.org/CORBA/Object:1.0', 'Object', CORBA::Object).freeze
|
509
509
|
else
|
510
510
|
TypeCode._wrap_native(CORBA::ORB._orb.get_primitive_tc(CORBA::Native::TCKind.from_int(kind.to_i)))
|
511
511
|
end
|
data/lib/corba/jbase/Values.rb
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
13
|
module R2CORBA
|
@@ -22,6 +21,7 @@ module R2CORBA
|
|
22
21
|
end
|
23
22
|
end
|
24
23
|
end
|
24
|
+
|
25
25
|
module ValueBase
|
26
26
|
def self.included(mod)
|
27
27
|
mod.module_eval do
|
@@ -112,6 +112,7 @@ module R2CORBA
|
|
112
112
|
class FactoryBase < CORBA::Portable::ValueFactoryBase
|
113
113
|
## generic factory base
|
114
114
|
end
|
115
|
+
|
115
116
|
def self.included(mod)
|
116
117
|
mod.module_eval do
|
117
118
|
include CORBA::ValueBase unless self.include?(CORBA::ValueBase)
|
@@ -8,7 +8,6 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
13
|
# import all java CORBA exceptions into the R2CORBA::CORBA namespace
|
@@ -74,6 +73,7 @@ module R2CORBA
|
|
74
73
|
end
|
75
74
|
raise exklass.new(jex)
|
76
75
|
end
|
76
|
+
|
77
77
|
def initialize(*args)
|
78
78
|
if (NativeException === args.first and args.first.cause.is_a? Native::SystemException) or args.first.is_a?(Native::SystemException)
|
79
79
|
java_ex = args.first.is_a?(Native::SystemException) ? args.first : args.first.cause
|
@@ -83,7 +83,7 @@ module R2CORBA
|
|
83
83
|
self.set_backtrace(args.first.backtrace) if NativeException === args.first
|
84
84
|
else
|
85
85
|
super(args.shift.to_s)
|
86
|
-
@minor, @completed = (args + [0,0][args.size..2])
|
86
|
+
@minor, @completed = (args + [0, 0][args.size..2])
|
87
87
|
end
|
88
88
|
end
|
89
89
|
end
|