r2corba 1.7.0-x64-mingw32 → 1.7.1-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/lib/corba/cbase/ORB.rb +9 -8
  3. data/lib/corba/cbase/Request.rb +4 -6
  4. data/lib/corba/cbase/Streams.rb +20 -20
  5. data/lib/corba/cbase/Typecode.rb +12 -41
  6. data/lib/corba/cbase/Values.rb +1 -4
  7. data/lib/corba/cbase/exception.rb +0 -2
  8. data/lib/corba/cbase/poa.rb +2 -2
  9. data/lib/corba/cbase/policies.rb +9 -8
  10. data/lib/corba/cbase/require.rb +1 -1
  11. data/lib/corba/cmds/base.rb +0 -1
  12. data/lib/corba/common/Any.rb +1 -2
  13. data/lib/corba/common/IDL.rb +3 -7
  14. data/lib/corba/common/ORB.rb +19 -19
  15. data/lib/corba/common/Object.rb +32 -22
  16. data/lib/corba/common/Request.rb +0 -2
  17. data/lib/corba/common/Servant.rb +4 -9
  18. data/lib/corba/common/Stub.rb +9 -7
  19. data/lib/corba/common/Typecode.rb +44 -27
  20. data/lib/corba/common/Values.rb +0 -1
  21. data/lib/corba/common/require.rb +1 -3
  22. data/lib/corba/common/version.rb +1 -3
  23. data/lib/corba/idl/IDL.rb +0 -2
  24. data/lib/corba/idl/require.rb +2 -2
  25. data/lib/corba/jbase/Any.rb +34 -35
  26. data/lib/corba/jbase/ORB.rb +5 -6
  27. data/lib/corba/jbase/Object.rb +10 -10
  28. data/lib/corba/jbase/Request.rb +8 -9
  29. data/lib/corba/jbase/Servant.rb +28 -32
  30. data/lib/corba/jbase/ServerRequest.rb +10 -8
  31. data/lib/corba/jbase/Streams.rb +80 -78
  32. data/lib/corba/jbase/Stub.rb +1 -1
  33. data/lib/corba/jbase/Typecode.rb +18 -46
  34. data/lib/corba/jbase/Values.rb +0 -1
  35. data/lib/corba/jbase/exception.rb +2 -1
  36. data/lib/corba/jbase/poa.rb +18 -17
  37. data/lib/corba/jbase/policies.rb +42 -45
  38. data/lib/corba/jbase/require.rb +3 -3
  39. data/lib/corba/naming_service.rb +1 -1
  40. data/lib/corba/poa.rb +1 -1
  41. data/lib/corba/policies.rb +2 -2
  42. data/lib/corba/svcs/ins/cos_naming.rb +23 -12
  43. data/lib/corba/svcs/ins/ins.rb +5 -5
  44. data/lib/corba/svcs/ins/naming_service.rb +1 -1
  45. data/lib/corba.rb +1 -1
  46. data/lib/ridlbe/ruby/config.rb +2 -8
  47. data/lib/ridlbe/ruby/orb.pidlc +0 -0
  48. data/lib/ridlbe/ruby/walker.rb +94 -108
  49. data/rakelib/ext.rake +1 -1
  50. data/rakelib/ext_r2tao.rb +1 -1
  51. data/rakelib/gem.rake +0 -30
  52. metadata +3 -4
@@ -10,5 +10,5 @@
10
10
  # Copyright (c) Remedy IT Expertise BV
11
11
  #--------------------------------------------------------------------
12
12
 
13
- require 'corba/naming.rb'
13
+ require 'corba/naming'
14
14
  require 'corba/idl/CosNamingS'
data/lib/corba/poa.rb CHANGED
@@ -10,5 +10,5 @@
10
10
  # Copyright (c) Remedy IT Expertise BV
11
11
  #--------------------------------------------------------------------
12
12
 
13
- require 'corba.rb'
13
+ require 'corba'
14
14
  require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/poa.rb"
@@ -10,8 +10,8 @@
10
10
  # Copyright (c) Remedy IT Expertise BV
11
11
  #--------------------------------------------------------------------
12
12
 
13
- require 'corba.rb'
14
- require 'corba/poa.rb'
13
+ require 'corba'
14
+ require 'corba/poa'
15
15
  require 'corba/idl/BiDirPolicyC'
16
16
  require 'corba/idl/MessagingC'
17
17
  require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/policies.rb"
@@ -36,6 +36,7 @@ module CosNaming
36
36
  # convert stringified name back to NameComponent
37
37
  def self.from_string(snc)
38
38
  raise CosNaming::NamingContext::InvalidName.new if snc.empty?
39
+
39
40
  esc_ = false
40
41
  id_ = ''
41
42
  off_ = 0
@@ -46,6 +47,7 @@ module CosNaming
46
47
  when '.'
47
48
  unless esc_
48
49
  raise CosNaming::NamingContext::InvalidName.new if off_ > 0
50
+
49
51
  id_ = snc[0, i].gsub(/\\(\.|\\)/, '\1')
50
52
  off_ = i + 1
51
53
  end
@@ -62,7 +64,6 @@ end
62
64
 
63
65
  module R2CORBA
64
66
  module INS
65
-
66
67
  ##
67
68
  # Binding iterator servant class
68
69
  #
@@ -81,6 +82,7 @@ module R2CORBA
81
82
 
82
83
  def next_n(how_many)
83
84
  raise CORBA::BAD_PARAM.new if how_many < 1
85
+
84
86
  bindings = []
85
87
  while how_many > 0 and !@rl.empty?
86
88
  reg = @rl.shift
@@ -102,7 +104,6 @@ module R2CORBA
102
104
  # Naming context servant class
103
105
  #
104
106
  class NamingContext < POA::CosNaming::NamingContextExt
105
-
106
107
  # Map type to store bindings.
107
108
  # Use synchronized version for multithreading capable implementations.
108
109
  #
@@ -113,7 +114,7 @@ module R2CORBA
113
114
  @map_ = {}
114
115
  end
115
116
 
116
- def size()
117
+ def size
117
118
  rc = 0
118
119
  synchronize do
119
120
  rc = @map_.size
@@ -207,6 +208,7 @@ module R2CORBA
207
208
  #
208
209
  def bind(n, obj)
209
210
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
211
+
210
212
  if n.size > 1
211
213
  nc = find_context(n)
212
214
  nc.bind(n, obj)
@@ -217,6 +219,7 @@ module R2CORBA
217
219
 
218
220
  def rebind(n, obj)
219
221
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
222
+
220
223
  if n.size > 1
221
224
  nc = find_context(n)
222
225
  nc.rebind(n, obj)
@@ -227,6 +230,7 @@ module R2CORBA
227
230
 
228
231
  def bind_context(n, nc_new)
229
232
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
233
+
230
234
  if n.size > 1
231
235
  nc = find_context(n)
232
236
  nc.bind_context(n, nc_new)
@@ -237,6 +241,7 @@ module R2CORBA
237
241
 
238
242
  def rebind_context(n, nc_new)
239
243
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
244
+
240
245
  if n.size > 1
241
246
  nc = find_context(n)
242
247
  nc.rebind_context(n, nc_new)
@@ -247,24 +252,26 @@ module R2CORBA
247
252
 
248
253
  def resolve(n)
249
254
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
255
+
250
256
  find_object(n)
251
257
  end
252
258
 
253
259
  def unbind(n)
254
260
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
261
+
255
262
  if n.size > 1
256
263
  nc = find_context(n)
257
264
  nc.unbind(n)
258
265
  else
259
266
  @map.synchronize do
260
267
  raise CosNaming::NamingContext::NotFound.new(CosNaming::NamingContext::Missing_node,
261
- n) if !@map.has_key?(n.first.r_id)
268
+ n) unless @map.has_key?(n.first.r_id)
262
269
  @map.delete(n.last.r_id)
263
270
  end
264
271
  end
265
272
  end
266
273
 
267
- def new_context()
274
+ def new_context
268
275
  poa = self._default_POA
269
276
  naming_srv = NamingContext.new(@orb)
270
277
  naming_srv.oid = poa.activate_object(naming_srv)
@@ -273,14 +280,16 @@ module R2CORBA
273
280
 
274
281
  def bind_new_context(n)
275
282
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
276
- nc = self.new_context()
283
+
284
+ nc = self.new_context
277
285
  self.bind_context(n, nc)
278
286
  nc
279
287
  end
280
288
 
281
- def destroy()
289
+ def destroy
282
290
  raise CosNaming::NamingContext::NotEmpty.new if @map.size > 0
283
291
  return if self.oid.nil? ## no oid for root context
292
+
284
293
  poa = self._default_POA
285
294
  poa.deactivate_object(self.oid)
286
295
  @orb = nil
@@ -295,7 +304,7 @@ module R2CORBA
295
304
  how_many -= 1
296
305
  end
297
306
  bi_obj = nil
298
- if !reglist.empty?
307
+ unless reglist.empty?
299
308
  bi = INS::NamingContext.alloc_iterator(reglist)
300
309
  poa = self._default_POA
301
310
  bi.oid = poa.activate_object(bi)
@@ -308,11 +317,13 @@ module R2CORBA
308
317
  #
309
318
  def to_string(n)
310
319
  raise CosNaming::NamingContext::InvalidName.new if n.size < 1
320
+
311
321
  n.collect { |nc| nc.to_string }.join('/')
312
322
  end
313
323
 
314
324
  def to_name(sn)
315
325
  raise CosNaming::NamingContext::InvalidName.new if sn.to_s.empty?
326
+
316
327
  snc_arr = []
317
328
  off_ = 0
318
329
  esc_ = false
@@ -336,6 +347,7 @@ module R2CORBA
336
347
 
337
348
  def to_url(addr, sn)
338
349
  raise CosNaming::NamingContext::InvalidName.new if addr.to_s.empty? or sn.to_s.empty?
350
+
339
351
  url = 'corbaname:' + addr + '#'
340
352
  sn.scan(/./) do |ch|
341
353
  if /[a-zA-Z0-9;\/:\?@=+\$,\-_\.!~*\'\(\)]/ =~ ch
@@ -362,6 +374,7 @@ module R2CORBA
362
374
  key_ = name.to_key
363
375
  @map.synchronize do
364
376
  raise CosNaming::NamingContext::AlreadyBound.new if @map.has_key?(key_)
377
+
365
378
  @map[key_] = {
366
379
  name: full_name,
367
380
  type: type,
@@ -401,7 +414,7 @@ module R2CORBA
401
414
  key_ = n.first.to_key
402
415
  @map.synchronize do
403
416
  raise CosNaming::NamingContext::NotFound.new(CosNaming::NamingContext::Missing_node,
404
- n) if !@map.has_key?(key_)
417
+ n) unless @map.has_key?(key_)
405
418
  @map[key_][:object]
406
419
  end
407
420
  end
@@ -418,15 +431,13 @@ module R2CORBA
418
431
  key_ = n.first.to_key
419
432
  @map.synchronize do
420
433
  raise CosNaming::NamingContext::NotFound.new(CosNaming::NamingContext::Missing_node,
421
- n) if !@map.has_key?(key_)
434
+ n) unless @map.has_key?(key_)
422
435
  raise CosNaming::NamingContext::NotFound.new(CosNaming::NamingContext::Not_context,
423
436
  n) if @map[key_][:type] != CosNaming::Ncontext
424
437
  n.shift
425
438
  @map[key_][:object]
426
439
  end
427
440
  end
428
-
429
441
  end # of NamingContext servant
430
-
431
442
  end
432
443
  end
@@ -101,7 +101,7 @@ module R2CORBA
101
101
  def stop
102
102
  report 'INS - stopping service'
103
103
 
104
- rc, pid = self.check_pidfile()
104
+ rc, pid = self.check_pidfile
105
105
 
106
106
  if pid
107
107
  report 'INS - signalling service'
@@ -117,7 +117,7 @@ module R2CORBA
117
117
  def status
118
118
  report 'INS - retrieving service status'
119
119
 
120
- rc, pid = self.check_pidfile()
120
+ rc, pid = self.check_pidfile
121
121
 
122
122
  if pid
123
123
  if rc
@@ -261,7 +261,7 @@ module R2CORBA
261
261
 
262
262
  Daemons.run_proc('ins.rb', daemon_opt) {}
263
263
  else
264
- rc, pid = self.check_pidfile()
264
+ rc, pid = self.check_pidfile
265
265
 
266
266
  if pid
267
267
  report 'INS - signalling service'
@@ -384,7 +384,7 @@ module R2CORBA
384
384
 
385
385
  def INS.parse_arg
386
386
  script_name = File.basename($0, '.bat')
387
- if not script_name =~ /rins/
387
+ unless script_name =~ /rins/
388
388
  script_name = 'ruby ' + $0
389
389
  end
390
390
 
@@ -511,7 +511,7 @@ module R2CORBA
511
511
  end
512
512
 
513
513
  def INS.run
514
- self.parse_arg()
514
+ self.parse_arg
515
515
 
516
516
  Controller.new(OPTIONS).send(self.command)
517
517
  end
@@ -76,7 +76,7 @@ module R2CORBA
76
76
  #
77
77
  @naming_srv = INS::NamingContext.new(@orb)
78
78
 
79
- naming_obj = @naming_srv._this()
79
+ naming_obj = @naming_srv._this
80
80
 
81
81
  naming_ior = @orb.object_to_string(naming_obj)
82
82
 
data/lib/corba.rb CHANGED
@@ -10,6 +10,6 @@
10
10
  # Copyright (c) Remedy IT Expertise BV
11
11
  #--------------------------------------------------------------------
12
12
 
13
- require 'corba/require.rb'
13
+ require 'corba/require'
14
14
 
15
15
  include R2CORBA
@@ -11,9 +11,8 @@
11
11
  #--------------------------------------------------------------------
12
12
 
13
13
  module IDL
14
-
15
14
  class StrOStream
16
- def initialize()
15
+ def initialize
17
16
  @str = ''
18
17
  end
19
18
 
@@ -114,7 +113,7 @@ module IDL
114
113
 
115
114
  # ruby specific option switches
116
115
 
117
- unless ridl_params[:preprocess] # same switch defined for IDL preprocessing mode
116
+ unless ridl_params[:preprocess] # same switch defined for IDL preprocessing mode
118
117
  optlist.for_switch '--output=FILE', :type => String,
119
118
  :description => ['Specifies filename to generate output in.',
120
119
  'Default: File.basename(idlfile, \'.idl\')+<postfix>+<ext>'] do |swcfg|
@@ -260,7 +259,6 @@ module IDL
260
259
  end
261
260
 
262
261
  module LeafMixin
263
-
264
262
  RESERVED_RUBY_CONST = %w(Array Bignum Binding Class Continuation Dir Exception FalseClass File
265
263
  Fixnum Float Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Process
266
264
  Range Regexp String Struct Symbol Thread ThreadGroup Time TrueClass UnboundMethod Comparable
@@ -319,7 +317,6 @@ module IDL
319
317
  end
320
318
 
321
319
  module ScannerMixin
322
-
323
320
  RUBYKW = %w(__FILE__ and def end in or self unless __LINE__ begin defined? ensure module redo
324
321
  super until BEGIN break do false next rescue then when END case else for nil retry true while
325
322
  alias class elsif if not return undef yield).collect! { |w| w.to_sym }
@@ -328,13 +325,10 @@ module IDL
328
325
  # prefix Ruby keywords with 'r_'
329
326
  RUBYKW.include?(ident.to_sym) ? 'r_' + ident : ident
330
327
  end
331
-
332
328
  end # module ScannerMixin
333
329
 
334
330
  IDL::Scanner.class_eval do
335
331
  include ScannerMixin
336
332
  end
337
-
338
333
  end # module Ruby
339
-
340
334
  end # module IDL
Binary file