r2corba 1.7.0-x64-mingw32 → 1.7.1-x64-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/corba/cbase/ORB.rb +9 -8
- data/lib/corba/cbase/Request.rb +4 -6
- data/lib/corba/cbase/Streams.rb +20 -20
- data/lib/corba/cbase/Typecode.rb +12 -41
- data/lib/corba/cbase/Values.rb +1 -4
- data/lib/corba/cbase/exception.rb +0 -2
- data/lib/corba/cbase/poa.rb +2 -2
- data/lib/corba/cbase/policies.rb +9 -8
- data/lib/corba/cbase/require.rb +1 -1
- data/lib/corba/cmds/base.rb +0 -1
- data/lib/corba/common/Any.rb +1 -2
- data/lib/corba/common/IDL.rb +3 -7
- data/lib/corba/common/ORB.rb +19 -19
- data/lib/corba/common/Object.rb +32 -22
- data/lib/corba/common/Request.rb +0 -2
- data/lib/corba/common/Servant.rb +4 -9
- data/lib/corba/common/Stub.rb +9 -7
- data/lib/corba/common/Typecode.rb +44 -27
- data/lib/corba/common/Values.rb +0 -1
- data/lib/corba/common/require.rb +1 -3
- data/lib/corba/common/version.rb +1 -3
- data/lib/corba/idl/IDL.rb +0 -2
- data/lib/corba/idl/require.rb +2 -2
- data/lib/corba/jbase/Any.rb +34 -35
- data/lib/corba/jbase/ORB.rb +5 -6
- data/lib/corba/jbase/Object.rb +10 -10
- data/lib/corba/jbase/Request.rb +8 -9
- data/lib/corba/jbase/Servant.rb +28 -32
- data/lib/corba/jbase/ServerRequest.rb +10 -8
- data/lib/corba/jbase/Streams.rb +80 -78
- data/lib/corba/jbase/Stub.rb +1 -1
- data/lib/corba/jbase/Typecode.rb +18 -46
- data/lib/corba/jbase/Values.rb +0 -1
- data/lib/corba/jbase/exception.rb +2 -1
- data/lib/corba/jbase/poa.rb +18 -17
- data/lib/corba/jbase/policies.rb +42 -45
- data/lib/corba/jbase/require.rb +3 -3
- data/lib/corba/naming_service.rb +1 -1
- data/lib/corba/poa.rb +1 -1
- data/lib/corba/policies.rb +2 -2
- data/lib/corba/svcs/ins/cos_naming.rb +23 -12
- data/lib/corba/svcs/ins/ins.rb +5 -5
- data/lib/corba/svcs/ins/naming_service.rb +1 -1
- data/lib/corba.rb +1 -1
- data/lib/ridlbe/ruby/config.rb +2 -8
- data/lib/ridlbe/ruby/orb.pidlc +0 -0
- data/lib/ridlbe/ruby/walker.rb +94 -108
- data/rakelib/ext.rake +1 -1
- data/rakelib/ext_r2tao.rb +1 -1
- data/rakelib/gem.rake +0 -30
- metadata +3 -4
data/lib/corba/jbase/Object.rb
CHANGED
@@ -11,11 +11,9 @@
|
|
11
11
|
#--------------------------------------------------------------------
|
12
12
|
module R2CORBA
|
13
13
|
module CORBA
|
14
|
-
|
15
14
|
module Object
|
16
|
-
|
17
15
|
# ret InterfaceDef
|
18
|
-
def _get_interface
|
16
|
+
def _get_interface
|
19
17
|
raise ::CORBA::NO_IMPLEMENT
|
20
18
|
# ifdef_obj = self.objref_._get_interface_def rescue CORBA::Exception.native2r($!)
|
21
19
|
# (ifdef_obj = CORBA::Native::InterfaceDefHelper.narrow(ifdef_obj) rescue CORBA::Exception.native2r($!)) unless ifdef_obj.nil?
|
@@ -24,10 +22,11 @@ module R2CORBA
|
|
24
22
|
# ::String logical_type_id
|
25
23
|
# ret boolean
|
26
24
|
def _is_a?(logical_type_id)
|
27
|
-
raise CORBA::INV_OBJREF.new if self._is_nil?
|
25
|
+
raise CORBA::INV_OBJREF.new if self._is_nil?
|
28
26
|
## JacORB's LocalObjects throw NO_IMPLEMENT on _is_a?() and _ids() is also not always defined
|
29
27
|
return true if self.objref_.is_a?(CORBA::Native::LocalObject) &&
|
30
|
-
(!self.objref_.respond_to?(:_ids) || self.objref_._ids
|
28
|
+
(!self.objref_.respond_to?(:_ids) || self.objref_._ids.include?(logical_type_id))
|
29
|
+
|
31
30
|
begin
|
32
31
|
self.objref_._is_a(logical_type_id)
|
33
32
|
rescue ::NativeException
|
@@ -36,10 +35,11 @@ module R2CORBA
|
|
36
35
|
end
|
37
36
|
|
38
37
|
# ret ::String
|
39
|
-
def _repository_id
|
40
|
-
raise CORBA::INV_OBJREF.new if self._is_nil?
|
38
|
+
def _repository_id
|
39
|
+
raise CORBA::INV_OBJREF.new if self._is_nil?
|
41
40
|
## if this object ref has already been narrowed
|
42
41
|
return self._interface_repository_id if self.respond_to?(:_interface_repository_id)
|
42
|
+
|
43
43
|
## ask the remote side
|
44
44
|
## have to do this ourselves since JacORB only resolves this locally (never calling remote)
|
45
45
|
req = self._request('_repository_id')
|
@@ -49,8 +49,9 @@ module R2CORBA
|
|
49
49
|
|
50
50
|
unless CORBA::Native::Portable::ObjectImpl.public_instance_methods.include?(:_get_component)
|
51
51
|
# ret ::CORBA::Object
|
52
|
-
def _get_component
|
53
|
-
raise CORBA::INV_OBJREF.new if self._is_nil?
|
52
|
+
def _get_component
|
53
|
+
raise CORBA::INV_OBJREF.new if self._is_nil?
|
54
|
+
|
54
55
|
## ask the remote side
|
55
56
|
## have to do this ourselves since JacORB does not support this remote method on Object
|
56
57
|
## and we can't use #invoke since this should work without narrowing
|
@@ -92,7 +93,6 @@ module R2CORBA
|
|
92
93
|
CORBA::Exception.native2r($!)
|
93
94
|
end
|
94
95
|
end
|
95
|
-
|
96
96
|
end # Object
|
97
97
|
end # CORBA
|
98
98
|
end # R2CORBA
|
data/lib/corba/jbase/Request.rb
CHANGED
@@ -11,7 +11,6 @@
|
|
11
11
|
#--------------------------------------------------------------------
|
12
12
|
module R2CORBA
|
13
13
|
module CORBA
|
14
|
-
|
15
14
|
module Request
|
16
15
|
@@wrapper_klass = Class.new do
|
17
16
|
include CORBA::Request
|
@@ -25,12 +24,13 @@ module R2CORBA
|
|
25
24
|
|
26
25
|
def self._wrap_native(nreq, target)
|
27
26
|
raise ArgumentError, 'Expected org.omg.CORBA.Request' unless nreq.nil? || nreq.is_a?(Native::Request)
|
28
|
-
|
27
|
+
|
28
|
+
nreq.nil? ? nreq : @@wrapper_klass.new(nreq, target)
|
29
29
|
end
|
30
30
|
|
31
31
|
def operation
|
32
32
|
begin
|
33
|
-
self.req_.operation
|
33
|
+
self.req_.operation
|
34
34
|
rescue ::NativeException
|
35
35
|
CORBA::Exception.native2r($!)
|
36
36
|
end
|
@@ -80,10 +80,11 @@ module R2CORBA
|
|
80
80
|
|
81
81
|
def arguments=(*args)
|
82
82
|
if args.size == 1
|
83
|
-
raise ArgumentError, 'invalid argument list' unless ::Array === args.first && args.first.all? {|a| ::Array === a }
|
83
|
+
raise ArgumentError, 'invalid argument list' unless ::Array === args.first && args.first.all? { |a| ::Array === a }
|
84
|
+
|
84
85
|
args = args.first
|
85
86
|
else
|
86
|
-
raise ArgumentError, 'invalid argument list' unless args.all? {|a| ::Array === a }
|
87
|
+
raise ArgumentError, 'invalid argument list' unless args.all? { |a| ::Array === a }
|
87
88
|
end
|
88
89
|
# clear current arguments
|
89
90
|
begin
|
@@ -153,7 +154,7 @@ module R2CORBA
|
|
153
154
|
rescue ::NativeException
|
154
155
|
CORBA::Exception.native2r($!)
|
155
156
|
end
|
156
|
-
jex = self.req_.env
|
157
|
+
jex = self.req_.env.exception
|
157
158
|
unless jex.nil?
|
158
159
|
STDERR.puts "#{jex}\n#{jex.backtrace.join("\n")}" if $VERBOSE
|
159
160
|
if jex.is_a?(CORBA::Native::SystemException)
|
@@ -161,7 +162,7 @@ module R2CORBA
|
|
161
162
|
elsif jex.is_a?(CORBA::Native::UnknownUserException)
|
162
163
|
CORBA::UserException._raise(jex)
|
163
164
|
else
|
164
|
-
raise CORBA::UNKNOWN.new(jex.getMessage
|
165
|
+
raise CORBA::UNKNOWN.new(jex.getMessage, 0, CORBA::COMPLETED_MAYBE)
|
165
166
|
end
|
166
167
|
end
|
167
168
|
self.result
|
@@ -218,8 +219,6 @@ module R2CORBA
|
|
218
219
|
return *rc
|
219
220
|
end
|
220
221
|
end
|
221
|
-
|
222
222
|
end
|
223
|
-
|
224
223
|
end # CORBA
|
225
224
|
end # R2CORBA
|
data/lib/corba/jbase/Servant.rb
CHANGED
@@ -11,11 +11,8 @@
|
|
11
11
|
#--------------------------------------------------------------------
|
12
12
|
|
13
13
|
module R2CORBA
|
14
|
-
|
15
14
|
module PortableServer
|
16
|
-
|
17
15
|
module DSI
|
18
|
-
|
19
16
|
class Servant < PortableServer::Native::DynamicImplementation
|
20
17
|
def self.new_instance(rsrv)
|
21
18
|
srv = PortableServer::DSI::Servant.new
|
@@ -33,38 +30,39 @@ module R2CORBA
|
|
33
30
|
@rsrv
|
34
31
|
end
|
35
32
|
|
36
|
-
def detach_rbServant
|
33
|
+
def detach_rbServant
|
37
34
|
@rsrv = nil
|
38
35
|
end
|
39
36
|
|
40
37
|
def invoke(jsrvreq)
|
41
38
|
begin
|
42
39
|
raise CORBA::NO_IMPLEMENT.new('', 0, CORBA::COMPLETED_NO) unless @rsrv
|
43
|
-
|
40
|
+
|
41
|
+
rsrvreq = CORBA::ServerRequest._wrap_native(jsrvreq, self._orb)
|
44
42
|
begin
|
45
|
-
case rsrvreq.srvreq_.operation
|
43
|
+
case rsrvreq.srvreq_.operation
|
46
44
|
when '_is_a'
|
47
45
|
rsrvreq.describe({arg_list: [['', CORBA::ARG_IN, CORBA._tc_string]], result_type: CORBA._tc_boolean})
|
48
46
|
rc = self._is_a(*rsrvreq.arguments)
|
49
|
-
jany = rsrvreq.orb_.create_any
|
47
|
+
jany = rsrvreq.orb_.create_any
|
50
48
|
jany.insert_boolean(rc == true)
|
51
49
|
jsrvreq.set_result(jany)
|
52
50
|
when '_non_existent'
|
53
51
|
rsrvreq.describe({arg_list: [], result_type: CORBA._tc_boolean})
|
54
52
|
rc = self._non_existent(*rsrvreq.arguments)
|
55
|
-
jany = rsrvreq.orb_.create_any
|
53
|
+
jany = rsrvreq.orb_.create_any
|
56
54
|
jany.insert_boolean(rc == true)
|
57
55
|
jsrvreq.set_result(jany)
|
58
56
|
when '_repository_id'
|
59
57
|
rsrvreq.describe({arg_list: [], result_type: CORBA._tc_string})
|
60
58
|
rc = self._repository_id(*rsrvreq.arguments)
|
61
|
-
jany = rsrvreq.orb_.create_any
|
59
|
+
jany = rsrvreq.orb_.create_any
|
62
60
|
jany.insert_string(rc)
|
63
61
|
jsrvreq.set_result(jany)
|
64
62
|
when '_component'
|
65
63
|
rsrvreq.describe({arg_list: [], result_type: CORBA._tc_Object})
|
66
64
|
rc = self._get_component(*rsrvreq.arguments)
|
67
|
-
jany = rsrvreq.orb_.create_any
|
65
|
+
jany = rsrvreq.orb_.create_any
|
68
66
|
jany.insert_Object(rc)
|
69
67
|
jsrvreq.set_result(jany)
|
70
68
|
else
|
@@ -75,14 +73,14 @@ module R2CORBA
|
|
75
73
|
end
|
76
74
|
rescue CORBA::UserException => ex_
|
77
75
|
STDERR.puts "#{ex_}\n#{ex_.backtrace.join("\n")}" if $VERBOSE
|
78
|
-
if rsrvreq.exc_list_.nil? || rsrvreq.exc_list_.any? {|extc| extc.id == ex_.class._tc.id }
|
79
|
-
jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb
|
76
|
+
if rsrvreq.exc_list_.nil? || rsrvreq.exc_list_.any? { |extc| extc.id == ex_.class._tc.id }
|
77
|
+
jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb))
|
80
78
|
else
|
81
79
|
STDERR.puts "#{ex_}\n#{ex_.backtrace.join("\n")}" unless $VERBOSE
|
82
80
|
if jsrvreq.respond_to?(:setSystemException) # JacORB special
|
83
81
|
jsrvreq.setSystemException(CORBA::Native::UNKNOWN.new("#{ex_}", 0, CORBA::Native::CompletionStatus.from_int(CORBA::COMPLETED_MAYBE)))
|
84
82
|
else
|
85
|
-
jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb
|
83
|
+
jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb))
|
86
84
|
end
|
87
85
|
end
|
88
86
|
rescue CORBA::SystemException => ex_
|
@@ -91,14 +89,14 @@ module R2CORBA
|
|
91
89
|
jex_klass = CORBA::Native.const_get(ex_.class::Name)
|
92
90
|
jsrvreq.setSystemException(jex_klass.new(ex_.reason, ex_.minor, CORBA::Native::CompletionStatus.from_int(ex_.completed)))
|
93
91
|
else
|
94
|
-
jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb
|
92
|
+
jsrvreq.set_exception(CORBA::Any.to_any(ex_).to_java(self._orb))
|
95
93
|
end
|
96
94
|
rescue Exception => ex_
|
97
95
|
STDERR.puts "#{ex_}\n#{ex_.backtrace.join("\n")}"
|
98
96
|
if jsrvreq.respond_to?(:setSystemException) # JacORB special
|
99
97
|
jsrvreq.setSystemException(CORBA::Native::UNKNOWN.new("#{ex_}", 0, CORBA::Native::CompletionStatus.from_int(CORBA::COMPLETED_MAYBE)))
|
100
98
|
else
|
101
|
-
jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb
|
99
|
+
jsrvreq.set_exception(CORBA::Any.to_any(CORBA::UNKNOWN.new("#{ex_}", 0, CORBA::COMPLETED_MAYBE)).to_java(self._orb))
|
102
100
|
end
|
103
101
|
end
|
104
102
|
end
|
@@ -108,7 +106,7 @@ module R2CORBA
|
|
108
106
|
return [].to_java(:string)
|
109
107
|
elsif @rsrv.respond_to?(:_ids)
|
110
108
|
return @rsrv._ids.to_java(:string)
|
111
|
-
elsif @rsrv.class.constants.any? {|c| c.to_sym == :Ids }
|
109
|
+
elsif @rsrv.class.constants.any? { |c| c.to_sym == :Ids }
|
112
110
|
return @rsrv.class::Ids.to_java(:string)
|
113
111
|
elsif @rsrv.respond_to?(:_primary_interface)
|
114
112
|
return [@rsrv._primary_interface(oid, poa)].to_java(:string)
|
@@ -141,7 +139,7 @@ module R2CORBA
|
|
141
139
|
end
|
142
140
|
end
|
143
141
|
|
144
|
-
def _non_existent
|
142
|
+
def _non_existent
|
145
143
|
if @rsrv.nil?
|
146
144
|
return true
|
147
145
|
elsif @rsrv.respond_to?(:_non_existent)
|
@@ -151,7 +149,7 @@ module R2CORBA
|
|
151
149
|
end
|
152
150
|
end
|
153
151
|
|
154
|
-
def _get_component
|
152
|
+
def _get_component
|
155
153
|
if @rsrv.nil?
|
156
154
|
return nil
|
157
155
|
elsif @rsrv.respond_to?(:_get_component)
|
@@ -163,7 +161,7 @@ module R2CORBA
|
|
163
161
|
end
|
164
162
|
protected
|
165
163
|
def invoke_SI(rsrvreq)
|
166
|
-
opsym = rsrvreq.srvreq_.operation
|
164
|
+
opsym = rsrvreq.srvreq_.operation.to_sym
|
167
165
|
opsig = @rsrv.get_operation_signature(opsym)
|
168
166
|
# explicitly define empty (but not nil) exceptionlist if not yet specified
|
169
167
|
opsig[:exc_list] = [] if (Hash === opsig) && !opsig.has_key?(:exc_list)
|
@@ -174,17 +172,17 @@ module R2CORBA
|
|
174
172
|
unless rsrvreq.result_type_.nil?
|
175
173
|
result_value = (rsrvreq.arg_out_ > 0 ? results.shift : results) unless rsrvreq.result_type_.kind == CORBA::TK_VOID
|
176
174
|
if rsrvreq.arg_out_ > 0
|
177
|
-
rsrvreq.nvlist_.count
|
175
|
+
rsrvreq.nvlist_.count.times do |i|
|
178
176
|
jnv = rsrvreq.nvlist_.item(i)
|
179
177
|
if [CORBA::ARG_OUT, CORBA::ARG_INOUT].include?(jnv.flags)
|
180
178
|
rval = results.shift
|
181
179
|
rtc = rsrvreq.arg_list_[i][2]
|
182
|
-
CORBA::Any.to_any(rval, rtc).to_java(self._orb
|
180
|
+
CORBA::Any.to_any(rval, rtc).to_java(self._orb, jnv.value)
|
183
181
|
end
|
184
182
|
end
|
185
183
|
end
|
186
184
|
unless rsrvreq.result_type_.kind == CORBA::TK_VOID
|
187
|
-
rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb
|
185
|
+
rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb))
|
188
186
|
end
|
189
187
|
end
|
190
188
|
end
|
@@ -194,22 +192,21 @@ module R2CORBA
|
|
194
192
|
unless rsrvreq.result_type_.nil?
|
195
193
|
result_value = (rsrvreq.arg_out_ > 0 ? results.shift : results) unless rsrvreq.result_type_.kind == CORBA::TK_VOID
|
196
194
|
if rsrvreq.arg_out_ > 0
|
197
|
-
rsrvreq.nvlist_.count
|
195
|
+
rsrvreq.nvlist_.count.times do |i|
|
198
196
|
jnv = rsrvreq.nvlist_.item(i)
|
199
197
|
if [CORBA::ARG_OUT, CORBA::ARG_INOUT].include?(jnv.flags)
|
200
198
|
rval = results.shift
|
201
199
|
rtc = rsrvreq.arg_list_[i][2]
|
202
|
-
CORBA::Any.to_any(rval, rtc).to_java(self._orb
|
200
|
+
CORBA::Any.to_any(rval, rtc).to_java(self._orb, jnv.value)
|
203
201
|
end
|
204
202
|
end
|
205
203
|
end
|
206
204
|
unless rsrvreq.result_type_.kind == CORBA::TK_VOID
|
207
|
-
rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb
|
205
|
+
rsrvreq.srvreq_.set_result(CORBA::Any.to_any(result_value, rsrvreq.result_type_).to_java(self._orb))
|
208
206
|
end
|
209
207
|
end
|
210
208
|
end
|
211
209
|
end # Servant
|
212
|
-
|
213
210
|
end # DSI
|
214
211
|
|
215
212
|
class Servant
|
@@ -217,23 +214,24 @@ module R2CORBA
|
|
217
214
|
@srvref_ ||= PortableServer::DSI::Servant.new_instance(self)
|
218
215
|
end
|
219
216
|
|
220
|
-
def _default_POA
|
217
|
+
def _default_POA
|
221
218
|
begin
|
222
|
-
return PortableServer::POA._narrow(CORBA::Object._wrap_native(self.srvref_._default_POA
|
219
|
+
return PortableServer::POA._narrow(CORBA::Object._wrap_native(self.srvref_._default_POA))
|
223
220
|
rescue ::NativeException
|
224
221
|
CORBA::Exception.native2r($!)
|
225
222
|
end
|
226
223
|
end
|
227
224
|
|
228
|
-
def _this
|
225
|
+
def _this
|
229
226
|
unless @srvref_.nil?
|
230
227
|
begin
|
231
|
-
return CORBA::Object._wrap_native(self.srvref_._this_object
|
228
|
+
return CORBA::Object._wrap_native(self.srvref_._this_object)
|
232
229
|
rescue NativeException
|
233
230
|
# not in call context or not associated with ORB yet
|
234
231
|
end
|
235
232
|
end
|
236
233
|
raise CORBA::BAD_INV_ORDER.new('no ORB initialized', 0, CORBA::COMPLETED_NO) if CORBA::ORB._orb.nil?
|
234
|
+
|
237
235
|
begin
|
238
236
|
return CORBA::Object._wrap_native(self.srvref_._this_object(CORBA::ORB._orb))
|
239
237
|
rescue ::NativeException
|
@@ -241,7 +239,5 @@ module R2CORBA
|
|
241
239
|
end
|
242
240
|
end
|
243
241
|
end # Servant
|
244
|
-
|
245
242
|
end # PortableServer
|
246
|
-
|
247
243
|
end # R2CORBA
|
@@ -11,9 +11,7 @@
|
|
11
11
|
#--------------------------------------------------------------------
|
12
12
|
|
13
13
|
module R2CORBA
|
14
|
-
|
15
14
|
module CORBA
|
16
|
-
|
17
15
|
module ServerRequest
|
18
16
|
@@wrapper_klass = Class.new do
|
19
17
|
include CORBA::ServerRequest
|
@@ -40,6 +38,7 @@ module R2CORBA
|
|
40
38
|
def self._wrap_native(jsrvreq, jorb)
|
41
39
|
raise ArgumentError, 'Expected org.omg.CORBA.ServerRequest' unless jsrvreq.is_a?(Native::ServerRequest)
|
42
40
|
raise ArgumentError, 'Expected org.omg.CORBA.ORB' unless jorb.is_a?(Native::ORB)
|
41
|
+
|
43
42
|
@@wrapper_klass.new(jsrvreq, jorb)
|
44
43
|
end
|
45
44
|
|
@@ -54,21 +53,24 @@ module R2CORBA
|
|
54
53
|
def describe(opsig)
|
55
54
|
raise CORBA::BAD_INV_ORDER.new('', 0, CORBA::COMPLETED_NO) if @nvlist_
|
56
55
|
raise CORBA::NO_IMPLEMENT.new('', 0, CORBA::COMPLETED_NO) unless opsig && (Hash === opsig)
|
56
|
+
|
57
57
|
@arg_list_ = opsig[:arg_list]
|
58
58
|
@result_type_ = opsig[:result_type]
|
59
59
|
@exc_list_ = opsig[:exc_list]
|
60
60
|
raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETED_NO) unless (@arg_list_.nil? || @arg_list_.is_a?(Array)) &&
|
61
61
|
(@result_type_.nil? || @result_type_.is_a?(CORBA::TypeCode)) &&
|
62
62
|
(@exc_list_.nil? || @exc_list_.is_a?(Array))
|
63
|
+
|
63
64
|
@nvlist_ = extract_arguments_(@arg_list_)
|
64
65
|
self
|
65
66
|
end
|
66
67
|
|
67
68
|
def arguments
|
68
69
|
raise CORBA::BAD_INV_ORDER.new('', 0, CORBA::COMPLETED_NO) unless @nvlist_
|
70
|
+
|
69
71
|
unless @arg_
|
70
72
|
@arg_ = []
|
71
|
-
@nvlist_.count
|
73
|
+
@nvlist_.count.times do |i|
|
72
74
|
jnv = @nvlist_.item(i)
|
73
75
|
@arg_ << CORBA::Any.from_java(jnv.value, self.orb_, @arg_list_[i][2]) if [CORBA::ARG_IN, CORBA::ARG_INOUT].include?(jnv.flags)
|
74
76
|
@arg_out_ += 1 if [CORBA::ARG_OUT, CORBA::ARG_INOUT].include?(jnv.flags)
|
@@ -82,6 +84,7 @@ module R2CORBA
|
|
82
84
|
key = arg_index_from_name(key) if String === key
|
83
85
|
key = key.to_i if key
|
84
86
|
raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETD_NO) unless key && (key >= 0) && (key < @arg_.size)
|
87
|
+
|
85
88
|
@arg_[key]
|
86
89
|
end
|
87
90
|
|
@@ -90,9 +93,10 @@ module R2CORBA
|
|
90
93
|
key = arg_index_from_name(key) if String === key
|
91
94
|
key = key.to_i if key
|
92
95
|
raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETD_NO) unless key && (key >= 0) && (key < @arg_.size)
|
96
|
+
|
93
97
|
jnv = @nvlist_.item(key)
|
94
98
|
rtc = @arg_list_[key][2]
|
95
|
-
CORBA::Any.to_any(val, rtc).to_java(self.orb_, jnv.value
|
99
|
+
CORBA::Any.to_any(val, rtc).to_java(self.orb_, jnv.value)
|
96
100
|
@arg_[key] = val
|
97
101
|
end
|
98
102
|
|
@@ -100,7 +104,7 @@ module R2CORBA
|
|
100
104
|
def arg_index_from_name(arg_name)
|
101
105
|
unless @arg_index_
|
102
106
|
@arg_index_ = {}
|
103
|
-
@nvlist_.count
|
107
|
+
@nvlist_.count.times do |i|
|
104
108
|
jnv = @nvlist_.item(i)
|
105
109
|
@arg_index_[jnv.name] = i
|
106
110
|
end
|
@@ -113,15 +117,13 @@ module R2CORBA
|
|
113
117
|
unless arg_list.nil?
|
114
118
|
arg_list.each do |argnm, argf, argtc|
|
115
119
|
raise CORBA::BAD_PARAM.new('', 0, CORBA::COMPLETED_NO) if argf.nil? || argtc.nil? || !argtc.is_a?(CORBA::TypeCode)
|
120
|
+
|
116
121
|
jnvlist.add_value(argnm.to_s, Any.to_any(nil, argtc).to_java(@orb_), argf.to_i)
|
117
122
|
end
|
118
123
|
self.srvreq_.arguments(jnvlist)
|
119
124
|
end
|
120
125
|
jnvlist
|
121
126
|
end
|
122
|
-
|
123
127
|
end # ServerRequest
|
124
|
-
|
125
128
|
end # CORBA
|
126
|
-
|
127
129
|
end # R2CORBA
|