r2corba 1.6.2-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 (151) hide show
  1. checksums.yaml +5 -5
  2. data/README.rdoc +5 -5
  3. data/lib/corba/cbase/ORB.rb +9 -8
  4. data/lib/corba/cbase/Request.rb +10 -12
  5. data/lib/corba/cbase/Streams.rb +20 -20
  6. data/lib/corba/cbase/Typecode.rb +12 -41
  7. data/lib/corba/cbase/Values.rb +1 -4
  8. data/lib/corba/cbase/exception.rb +0 -2
  9. data/lib/corba/cbase/poa.rb +2 -2
  10. data/lib/corba/cbase/policies.rb +9 -8
  11. data/lib/corba/cbase/require.rb +1 -1
  12. data/lib/corba/cmds/base.rb +1 -2
  13. data/lib/corba/common/Any.rb +2 -3
  14. data/lib/corba/common/IDL.rb +3 -7
  15. data/lib/corba/common/ORB.rb +19 -19
  16. data/lib/corba/common/Object.rb +32 -22
  17. data/lib/corba/common/Request.rb +0 -2
  18. data/lib/corba/common/Servant.rb +4 -9
  19. data/lib/corba/common/Stub.rb +9 -7
  20. data/lib/corba/common/Typecode.rb +44 -27
  21. data/lib/corba/common/Values.rb +4 -5
  22. data/lib/corba/common/require.rb +1 -3
  23. data/lib/corba/common/version.rb +2 -4
  24. data/lib/corba/idl/IDL.rb +0 -2
  25. data/lib/corba/idl/require.rb +2 -2
  26. data/lib/corba/jbase/Any.rb +34 -35
  27. data/lib/corba/jbase/ORB.rb +5 -6
  28. data/lib/corba/jbase/Object.rb +10 -10
  29. data/lib/corba/jbase/Request.rb +8 -9
  30. data/lib/corba/jbase/Servant.rb +32 -36
  31. data/lib/corba/jbase/ServerRequest.rb +10 -8
  32. data/lib/corba/jbase/Streams.rb +80 -78
  33. data/lib/corba/jbase/Stub.rb +1 -1
  34. data/lib/corba/jbase/Typecode.rb +18 -46
  35. data/lib/corba/jbase/Values.rb +0 -1
  36. data/lib/corba/jbase/exception.rb +2 -1
  37. data/lib/corba/jbase/poa.rb +18 -17
  38. data/lib/corba/jbase/policies.rb +42 -45
  39. data/lib/corba/jbase/require.rb +3 -3
  40. data/lib/corba/naming_service.rb +1 -1
  41. data/lib/corba/poa.rb +1 -1
  42. data/lib/corba/policies.rb +2 -2
  43. data/lib/corba/svcs/ins/cos_naming.rb +29 -18
  44. data/lib/corba/svcs/ins/ins.rb +38 -38
  45. data/lib/corba/svcs/ins/naming_service.rb +6 -6
  46. data/lib/corba.rb +1 -1
  47. data/lib/ridlbe/ruby/config.rb +2 -8
  48. data/lib/ridlbe/ruby/orb.pidlc +0 -0
  49. data/lib/ridlbe/ruby/walker.rb +94 -108
  50. data/rakelib/config.rb +9 -6
  51. data/rakelib/ext.rake +1 -1
  52. data/rakelib/ext_r2tao.rb +1 -1
  53. data/rakelib/gem.rake +0 -30
  54. data/test/BiDirectional/client.rb +7 -7
  55. data/test/BiDirectional/run_test.rb +2 -2
  56. data/test/BiDirectional/server.rb +13 -13
  57. data/test/CORBA_Services/Naming/BindingIterator/client.rb +9 -9
  58. data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +2 -2
  59. data/test/CORBA_Services/Naming/BindingIterator/server.rb +6 -6
  60. data/test/CORBA_Services/Naming/Corbaname/client.rb +6 -6
  61. data/test/CORBA_Services/Naming/Corbaname/run_test.rb +2 -2
  62. data/test/CORBA_Services/Naming/Corbaname/server.rb +8 -8
  63. data/test/CORBA_Services/Naming/Simple/client.rb +6 -6
  64. data/test/CORBA_Services/Naming/Simple/run_test.rb +2 -2
  65. data/test/CORBA_Services/Naming/Simple/server.rb +6 -6
  66. data/test/Collocation/run_test.rb +2 -2
  67. data/test/Collocation/test.rb +1 -1
  68. data/test/Connect_Timeout/client.rb +7 -7
  69. data/test/Connect_Timeout/run_test.rb +2 -2
  70. data/test/DII/client.rb +10 -10
  71. data/test/DII/run_test.rb +2 -2
  72. data/test/DII/server.rb +7 -7
  73. data/test/DSI/client.rb +6 -6
  74. data/test/DSI/run_test.rb +2 -2
  75. data/test/DSI/server.rb +9 -9
  76. data/test/Exceptions/client.rb +6 -6
  77. data/test/Exceptions/run_test.rb +2 -2
  78. data/test/Exceptions/server.rb +7 -7
  79. data/test/Hello/client.rb +7 -7
  80. data/test/Hello/run_test.rb +2 -2
  81. data/test/Hello/server.rb +7 -7
  82. data/test/IDL_Test/client.rb +9 -9
  83. data/test/IDL_Test/run_test.rb +2 -2
  84. data/test/IDL_Test/server.rb +7 -7
  85. data/test/IORMap/client.rb +7 -7
  86. data/test/IORMap/run_test.rb +2 -2
  87. data/test/IORMap/server.rb +9 -9
  88. data/test/IORTable/client.rb +7 -7
  89. data/test/IORTable/run_test.rb +2 -2
  90. data/test/IORTable/server.rb +10 -10
  91. data/test/Implicit_Conversion/client.rb +5 -5
  92. data/test/Implicit_Conversion/run_test.rb +2 -2
  93. data/test/Implicit_Conversion/server.rb +7 -7
  94. data/test/Multi_Threading/Multiple_ORB/client.rb +6 -6
  95. data/test/Multi_Threading/Multiple_ORB/run_test.rb +2 -2
  96. data/test/Multi_Threading/Multiple_ORB/server.rb +5 -5
  97. data/test/Multi_Threading/Simple/client.rb +6 -6
  98. data/test/Multi_Threading/Simple/run_test.rb +2 -2
  99. data/test/Multi_Threading/Simple/server.rb +8 -8
  100. data/test/Multi_Threading/Threads/client.rb +6 -6
  101. data/test/Multi_Threading/Threads/run_test.rb +2 -2
  102. data/test/Multi_Threading/Threads/server.rb +9 -9
  103. data/test/Multi_Threading/Threads/watchdog.rb +7 -7
  104. data/test/Multiple_Servant_Interfaces/client.rb +7 -7
  105. data/test/Multiple_Servant_Interfaces/run_test.rb +2 -2
  106. data/test/Multiple_Servant_Interfaces/server.rb +7 -7
  107. data/test/Nil/run_test.rb +2 -2
  108. data/test/Nil/test.rb +4 -4
  109. data/test/OBV/AbstractInterface/client.rb +9 -9
  110. data/test/OBV/AbstractInterface/run_test.rb +2 -2
  111. data/test/OBV/AbstractInterface/server.rb +7 -7
  112. data/test/OBV/Custom/client.rb +5 -5
  113. data/test/OBV/Custom/run_test.rb +2 -2
  114. data/test/OBV/Custom/server.rb +7 -7
  115. data/test/OBV/Simple/client.rb +5 -5
  116. data/test/OBV/Simple/run_test.rb +2 -2
  117. data/test/OBV/Simple/server.rb +7 -7
  118. data/test/OBV/Simple_Event/client.rb +5 -5
  119. data/test/OBV/Simple_Event/run_test.rb +2 -2
  120. data/test/OBV/Simple_Event/server.rb +7 -7
  121. data/test/OBV/Supports/client.rb +17 -17
  122. data/test/OBV/Supports/run_test.rb +2 -2
  123. data/test/OBV/Supports/server.rb +7 -7
  124. data/test/OBV/Tree/client.rb +6 -6
  125. data/test/OBV/Tree/run_test.rb +2 -2
  126. data/test/OBV/Tree/server.rb +7 -7
  127. data/test/OBV/Truncatable/client.rb +5 -5
  128. data/test/OBV/Truncatable/run_test.rb +2 -2
  129. data/test/OBV/Truncatable/server.rb +6 -6
  130. data/test/OBV/ValueBox/client.rb +20 -20
  131. data/test/OBV/ValueBox/run_test.rb +2 -2
  132. data/test/OBV/ValueBox/server.rb +8 -8
  133. data/test/Object/client.rb +6 -6
  134. data/test/Object/run_test.rb +2 -2
  135. data/test/Object/server.rb +9 -9
  136. data/test/POA/run_test.rb +2 -2
  137. data/test/POA/test.rb +4 -4
  138. data/test/Param_Test/client.rb +6 -6
  139. data/test/Param_Test/run_test.rb +2 -2
  140. data/test/Param_Test/server.rb +6 -6
  141. data/test/Performance/Simple/client.rb +6 -6
  142. data/test/Performance/Simple/run_test.rb +2 -2
  143. data/test/Performance/Simple/server.rb +7 -7
  144. data/test/Policies/run_test.rb +2 -2
  145. data/test/Policies/test.rb +4 -4
  146. data/test/Timeout/client.rb +11 -11
  147. data/test/Timeout/run_test.rb +2 -2
  148. data/test/Timeout/server.rb +9 -9
  149. data/test/lib/test.rb +5 -5
  150. data/test/test_runner.rb +8 -7
  151. metadata +6 -7
@@ -18,15 +18,15 @@ module IDL
18
18
  @nest = 0
19
19
  end
20
20
 
21
- def print(str); @output << str; end
21
+ def print(str); @output << str; end
22
22
 
23
23
  def println(str = ''); @output << str << "\n"; end
24
24
 
25
- def printi(str = ''); @output << indent() << str; end
25
+ def printi(str = ''); @output << indent << str; end
26
26
 
27
- def printiln(str = ''); @output << indent() << str << "\n"; end
27
+ def printiln(str = ''); @output << indent << str << "\n"; end
28
28
 
29
- def indent()
29
+ def indent
30
30
  @indent * @nest
31
31
  end
32
32
 
@@ -65,18 +65,18 @@ module IDL
65
65
  #
66
66
  })
67
67
  println("require 'corba'") if @params[:libinit]
68
- println()
68
+ println
69
69
  enter_module(parser.root_namespace) unless parser.root_namespace.nil?
70
70
  idleval = @params[:idl_eval] || false
71
- if !idleval
71
+ unless idleval
72
72
  printiln("CORBA.implement('#{@params[:idlfile]}', {}, CORBA::IDL::CLIENT_STUB) {")
73
- println()
73
+ println
74
74
  end
75
75
  end
76
76
 
77
77
  def post_visit(parser)
78
78
  idleval = @params[:idl_eval] || false
79
- if !idleval
79
+ unless idleval
80
80
  printiln("} ## end of '#{@params[:idlfile]}'")
81
81
  end
82
82
  leave_module(parser.root_namespace) unless parser.root_namespace.nil?
@@ -85,31 +85,31 @@ module IDL
85
85
 
86
86
  def visit_include(node)
87
87
  printiln(format("require '%s'", node.filename.sub(/\.[^\.]*$/, @params[:stub_pfx])))
88
- println()
88
+ println
89
89
  end
90
90
 
91
91
  def enter_include(node)
92
92
  printiln('## include')
93
93
  printiln("CORBA.implement('#{node.filename}', {}, CORBA::IDL::CLIENT_STUB) {")
94
- println()
94
+ println
95
95
  end
96
96
 
97
97
  def leave_include(node)
98
- println()
98
+ println
99
99
  printiln("} ## end of include '#{node.filename}'")
100
- println()
100
+ println
101
101
  end
102
102
 
103
103
  def enter_module(node)
104
104
  printiln('module ' + node.rubyname)
105
- println()
105
+ println
106
106
  @nest += 1
107
107
  end
108
108
 
109
109
  def leave_module(node)
110
110
  @nest -= 1
111
111
  printiln("end #of module #{node.rubyname}")
112
- println()
112
+ println
113
113
  end
114
114
 
115
115
  def declare_interface(node)
@@ -137,14 +137,14 @@ module IDL
137
137
  else
138
138
  printiln("module #{node.rubyname} ## interface")
139
139
  end
140
- println()
140
+ println
141
141
  @nest += 1
142
142
 
143
143
  if node.bases.size > 0
144
144
  node.bases.each do |n|
145
145
  printiln("include #{n.scoped_rubyname}")
146
146
  end
147
- println()
147
+ println
148
148
  end
149
149
 
150
150
  printiln(format("Id = '%s'.freeze", node.repository_id))
@@ -252,11 +252,10 @@ module IDL
252
252
 
253
253
  public
254
254
 
255
- def declare_valuetype(node)
256
- end
255
+ def declare_valuetype(node); end
257
256
 
258
257
  def enter_valuetype(node)
259
- println()
258
+ println
260
259
  name = node.rubyname
261
260
  unless node.is_abstract?
262
261
  printiln("class #{name}")
@@ -277,7 +276,7 @@ module IDL
277
276
 
278
277
  unless node.is_abstract?
279
278
  trunc_ids = node.truncatable_ids
280
- println()
279
+ println
281
280
  printi('TRUNCATABLE_IDS = [')
282
281
  print("'#{trunc_ids.shift}'")
283
282
  unless trunc_ids.empty?
@@ -291,19 +290,19 @@ module IDL
291
290
  println(' ].freeze')
292
291
  end
293
292
 
294
- println()
293
+ println
295
294
  printiln(format('def %s._tc', node.rubyname))
296
295
  nest {
297
296
  printi("@@tc_#{node.rubyname} ||= ")
298
297
  print_valuetype_typecode(node)
299
- println()
298
+ println
300
299
  }
301
300
  printiln('end')
302
301
  printiln('self._tc # register typecode')
303
302
  end
304
303
 
305
304
  def leave_valuetype(node)
306
- println()
305
+ println
307
306
  printiln('module Intf')
308
307
  nest {
309
308
  intfs_ = node.interfaces
@@ -327,7 +326,7 @@ module IDL
327
326
  end
328
327
  end
329
328
 
330
- if node.has_concrete_base?() || !bases_.empty?() || !intfs_.empty?()
329
+ if node.has_concrete_base? || !bases_.empty? || !intfs_.empty?
331
330
  println
332
331
  end
333
332
 
@@ -347,7 +346,7 @@ module IDL
347
346
  end
348
347
  end
349
348
  end
350
- println() if has_type
349
+ println if has_type
351
350
  end
352
351
 
353
352
  unless node.is_abstract?
@@ -360,7 +359,7 @@ module IDL
360
359
  has_type = true
361
360
  end
362
361
  end
363
- println() if has_type
362
+ println if has_type
364
363
  has_type = false
365
364
  state_members_.each do |m|
366
365
  unless m.visibility == :public
@@ -372,10 +371,10 @@ module IDL
372
371
  has_type = true
373
372
  end
374
373
  end
375
- println() if has_type
374
+ println if has_type
376
375
 
377
376
  printiln('public')
378
- println()
377
+ println
379
378
 
380
379
  unless node.is_custom?
381
380
  printiln('def self.marshal(vt, __os__)')
@@ -393,7 +392,7 @@ module IDL
393
392
  end
394
393
  }
395
394
  printiln('end')
396
- println()
395
+ println
397
396
 
398
397
  printiln('def self.unmarshal(vt, __is__)')
399
398
  nest {
@@ -410,21 +409,21 @@ module IDL
410
409
  end
411
410
  }
412
411
  printiln('end')
413
- println()
412
+ println
414
413
 
415
414
  printiln('def marshal(os)')
416
415
  nest {
417
416
  printiln("#{node.scoped_rubyname}::Intf.marshal(self, os)")
418
417
  }
419
418
  printiln('end')
420
- println()
419
+ println
421
420
 
422
421
  printiln('def unmarshal(is)')
423
422
  nest {
424
423
  printiln("#{node.scoped_rubyname}::Intf.unmarshal(self, is)")
425
424
  }
426
425
  printiln('end')
427
- println()
426
+ println
428
427
  end
429
428
  end
430
429
  }
@@ -456,9 +455,9 @@ module IDL
456
455
  printiln('end')
457
456
  end
458
457
  else
459
- println()
458
+ println
460
459
  initializers.each do |init|
461
- printiln("def #{init.rubyname}(#{init.params().collect {|p| p.rubyname}.join(',')})")
460
+ printiln("def #{init.rubyname}(#{init.params.collect { |p| p.rubyname }.join(',')})")
462
461
  nest {
463
462
  printiln("raise RuntimeError, 'unimplemented local operation called'")
464
463
  }
@@ -476,9 +475,9 @@ module IDL
476
475
  printiln("class #{name}")
477
476
  nest {
478
477
  printiln('include CORBA::Portable::BoxedValueBase')
479
- println()
478
+ println
480
479
  printiln("TRUNCATABLE_IDS = [ '#{node.repository_id}' ].freeze")
481
- println()
480
+ println
482
481
  printiln(format('def %s._tc', node.rubyname))
483
482
  nest {
484
483
  printiln(format("@@tc_%s ||= CORBA::TypeCode::Valuebox.new('%s'.freeze, '%s',",
@@ -506,7 +505,7 @@ module IDL
506
505
  _out = node.out_params
507
506
  _intf = node.enclosure
508
507
 
509
- println()
508
+ println
510
509
  printi("def #{node.rubyname}(")
511
510
  print(_in.collect{ |p| p.rubyname }.join(', '))
512
511
  if node.oneway
@@ -568,7 +567,7 @@ module IDL
568
567
  newln = ','
569
568
  end
570
569
 
571
- if not node.oneway
570
+ unless node.oneway
572
571
  println(newln)
573
572
  nest { printi(":result_type => #{get_typecode(node.idltype)}") }
574
573
  newln = ','
@@ -592,7 +591,7 @@ module IDL
592
591
 
593
592
  println('})')
594
593
 
595
- if not node.oneway
594
+ unless node.oneway
596
595
  returns_void = (node.idltype.is_a? Type::Void)
597
596
  size = _out.size
598
597
  size += 1 unless returns_void
@@ -606,7 +605,7 @@ module IDL
606
605
 
607
606
  def visit_attribute(node, from_valuetype = false)
608
607
  _intf = node.enclosure
609
- println()
608
+ println
610
609
  printiln("def #{node.rubyname}()")
611
610
  nest do
612
611
  if _intf.is_a?(IDL::AST::Valuetype) or from_valuetype
@@ -642,7 +641,7 @@ module IDL
642
641
  end
643
642
  end
644
643
  printiln("end #of attribute #{node.name} getter")
645
- if not node.readonly
644
+ unless node.readonly
646
645
  printiln("def #{node.rubyname}=(val)")
647
646
  nest do
648
647
  if _intf.is_a?(IDL::AST::Valuetype) or from_valuetype
@@ -719,7 +718,7 @@ module IDL
719
718
 
720
719
  when Type::ScopedName
721
720
  scoped_type = _type.node.idltype
722
- if scoped_type.is_a?(IDL::Type::Interface) && scoped_type.node.is_forward?()
721
+ if scoped_type.is_a?(IDL::Type::Interface) && scoped_type.node.is_forward?
723
722
  node = scoped_type.node
724
723
  "(CORBA::TypeCode.typecode_for_id('#{node.repository_id}') || " +
725
724
  "CORBA::TypeCode::ObjectRef.new('#{node.repository_id}', '#{node.rubyname}', #{node.scoped_rubyname}))"
@@ -843,6 +842,8 @@ module IDL
843
842
  s = '-' + expression_to_s(op[0])
844
843
  when Expression::Operation::UnaryNot
845
844
  s = '~' + expression_to_s(op[0])
845
+ when Expression::Operation::Xor
846
+ s = expression_to_s(op[0]) + ' ^ ' + expression_to_s(op[1])
846
847
  when Expression::Operation::Or
847
848
  s = expression_to_s(op[0]) + ' | ' + expression_to_s(op[1])
848
849
  when Expression::Operation::And
@@ -867,11 +868,10 @@ module IDL
867
868
  '(' + s + ')'
868
869
  end
869
870
 
870
- def declare_struct(node)
871
- end
871
+ def declare_struct(node); end
872
872
 
873
873
  def enter_struct(node)
874
- println()
874
+ println
875
875
  name = node.rubyname
876
876
  printiln("class #{name} < CORBA::Portable::Struct")
877
877
  @nest += 1
@@ -879,7 +879,7 @@ module IDL
879
879
 
880
880
  def leave_struct(node)
881
881
  tc_ = if node.is_a? IDL::AST::Exception then 'Except' else 'Struct' end
882
- println()
882
+ println
883
883
  printiln(format('def %s._tc', node.rubyname))
884
884
  struct_members_ = node.members
885
885
  nest {
@@ -912,7 +912,7 @@ module IDL
912
912
  end
913
913
  }
914
914
  printiln('end')
915
- println()
915
+ println
916
916
  end
917
917
 
918
918
  name = node.rubyname
@@ -921,7 +921,7 @@ module IDL
921
921
  end
922
922
 
923
923
  def enter_exception(node)
924
- println()
924
+ println
925
925
  name = node.rubyname
926
926
  printiln("class #{name} < CORBA::UserException")
927
927
  @nest += 1
@@ -931,18 +931,17 @@ module IDL
931
931
  leave_struct(node)
932
932
  end
933
933
 
934
- def declare_union(node)
935
- end
934
+ def declare_union(node); end
936
935
 
937
936
  def enter_union(node)
938
- println()
937
+ println
939
938
  name = node.rubyname
940
939
  printiln("class #{name} < CORBA::Portable::Union")
941
940
  @nest += 1
942
941
  end
943
942
 
944
943
  def leave_union(node)
945
- println()
944
+ println
946
945
  printiln(format('def %s._tc', node.rubyname))
947
946
  nest {
948
947
  printiln(format("@@tc_%s ||= CORBA::TypeCode::Union.new('%s'.freeze, '%s',",
@@ -1136,15 +1135,15 @@ module IDL
1136
1135
  })
1137
1136
  idleval = @params[:idl_eval] || false
1138
1137
  println("require 'corba/poa.rb'") if @params[:libinit]
1139
- if !@params[:expand_includes]
1138
+ unless @params[:expand_includes]
1140
1139
  println("require '" + @params[:idlfile].sub(/\.[^\.]*$/, @params[:stub_pfx]) + "'")
1141
1140
  end
1142
- println()
1141
+ println
1143
1142
  printiln('module POA')
1144
1143
  @nest += 1
1145
- if !idleval
1144
+ unless idleval
1146
1145
  printiln("CORBA.implement('#{@params[:idlfile]}', {}, CORBA::IDL::SERVANT_INTF) {")
1147
- println()
1146
+ println
1148
1147
  end
1149
1148
  ## register explicit (*not* IDL derived) rootnamespace used for client stubs
1150
1149
  @stub_root = "#{parser.root_namespace.rubyname}::" unless parser.root_namespace.nil?
@@ -1152,7 +1151,7 @@ module IDL
1152
1151
 
1153
1152
  def post_visit(parser)
1154
1153
  idleval = @params[:idl_eval] || false
1155
- if !idleval
1154
+ unless idleval
1156
1155
  printiln("} ## end of '#{@params[:idlfile]}'")
1157
1156
  end
1158
1157
  @nest -= 1
@@ -1162,31 +1161,31 @@ module IDL
1162
1161
 
1163
1162
  def visit_include(node)
1164
1163
  printiln(format("require '%s'", node.filename.sub(/\.[^\.]*$/, @params[:srv_pfx])))
1165
- println()
1164
+ println
1166
1165
  end
1167
1166
 
1168
1167
  def enter_include(node)
1169
1168
  printiln('## include')
1170
1169
  printiln("CORBA.implement('#{node.filename}', {}, CORBA::IDL::SERVANT_INTF) {")
1171
- println()
1170
+ println
1172
1171
  end
1173
1172
 
1174
1173
  def leave_include(node)
1175
- println()
1174
+ println
1176
1175
  printiln("} ## end of include '#{node.filename}'")
1177
- println()
1176
+ println
1178
1177
  end
1179
1178
 
1180
1179
  def enter_module(node)
1181
1180
  printiln('module ' + node.rubyname)
1182
- println()
1181
+ println
1183
1182
  @nest += 1
1184
1183
  end
1185
1184
 
1186
1185
  def leave_module(node)
1187
1186
  @nest -= 1
1188
1187
  printiln("end #of module #{node.rubyname}")
1189
- println()
1188
+ println
1190
1189
  end
1191
1190
 
1192
1191
  def declare_interface(node)
@@ -1194,10 +1193,10 @@ module IDL
1194
1193
  end
1195
1194
 
1196
1195
  def enter_interface(node)
1197
- if !node.is_local?
1196
+ unless node.is_local?
1198
1197
  println
1199
1198
  printiln("class #{node.rubyname} < PortableServer::Servant ## servant")
1200
- println()
1199
+ println
1201
1200
  @nest += 1
1202
1201
 
1203
1202
  printiln('module Intf')
@@ -1209,20 +1208,20 @@ module IDL
1209
1208
  end
1210
1209
  println(' ]')
1211
1210
  printiln('Operations = {}')
1212
- println()
1211
+ println
1213
1212
  end
1214
1213
  end
1215
1214
 
1216
1215
  def leave_interface(node)
1217
- if !node.is_local?
1216
+ unless node.is_local?
1218
1217
  name = node.rubyname
1219
1218
 
1220
1219
  @nest -= 1
1221
1220
  printiln('end #of Intf')
1222
1221
 
1223
- println()
1222
+ println
1224
1223
  printiln('Id = Intf::Id')
1225
- println()
1224
+ println
1226
1225
 
1227
1226
  if node.bases.size > 0
1228
1227
  node.bases.each do |n|
@@ -1231,10 +1230,10 @@ module IDL
1231
1230
  else
1232
1231
  printiln('include_interface(PortableServer::Servant::Intf)')
1233
1232
  end
1234
- println()
1233
+ println
1235
1234
 
1236
1235
  printiln('include Intf')
1237
- println()
1236
+ println
1238
1237
 
1239
1238
  printiln("def _this; #{@stub_root}#{node.scoped_rubyname}._narrow(super); end")
1240
1239
 
@@ -1243,8 +1242,7 @@ module IDL
1243
1242
  end
1244
1243
  end
1245
1244
 
1246
- def declare_valuetype(node)
1247
- end
1245
+ def declare_valuetype(node); end
1248
1246
 
1249
1247
  def enter_valuetype(node)
1250
1248
  println
@@ -1265,11 +1263,9 @@ module IDL
1265
1263
  printiln("end #of servant #{node.rubyname}")
1266
1264
  end
1267
1265
 
1268
- def visit_valuebox(node)
1269
- end
1266
+ def visit_valuebox(node); end
1270
1267
 
1271
- def visit_const(node)
1272
- end
1268
+ def visit_const(node); end
1273
1269
 
1274
1270
  def visit_operation(node)
1275
1271
  _parm = node.params
@@ -1301,7 +1297,7 @@ module IDL
1301
1297
  newln = ','
1302
1298
  end
1303
1299
 
1304
- if not node.oneway
1300
+ unless node.oneway
1305
1301
  println(newln)
1306
1302
  nest { printi(":result_type => #{get_typecode(node.idltype)}") }
1307
1303
  newln = ','
@@ -1329,7 +1325,7 @@ module IDL
1329
1325
  nest { printi(":op_sym => :#{node.rubyname}") }
1330
1326
  end
1331
1327
  println('})')
1332
- println()
1328
+ println
1333
1329
 
1334
1330
  printi("def #{node.rubyname}(")
1335
1331
  print(_in.collect{ |p| p.rubyname }.join(', '))
@@ -1344,7 +1340,7 @@ module IDL
1344
1340
  printiln(' 1, ::CORBA::COMPLETED_NO)')
1345
1341
  }
1346
1342
  printiln('end')
1347
- println()
1343
+ println
1348
1344
  end
1349
1345
 
1350
1346
  def visit_attribute(node)
@@ -1372,7 +1368,7 @@ module IDL
1372
1368
  printiln(":op_sym => :#{node.rubyname} })")
1373
1369
  }
1374
1370
  }
1375
- println()
1371
+ println
1376
1372
 
1377
1373
  printiln("def #{node.rubyname}()")
1378
1374
  nest {
@@ -1381,9 +1377,9 @@ module IDL
1381
1377
  printiln(' 1, ::CORBA::COMPLETED_NO)')
1382
1378
  }
1383
1379
  printiln("end #of attribute get_#{node.name}")
1384
- println()
1380
+ println
1385
1381
 
1386
- if not node.readonly
1382
+ unless node.readonly
1387
1383
  printiln("Operations.store(:_set_#{node.name}, {")
1388
1384
  nest {
1389
1385
  nest {
@@ -1407,7 +1403,7 @@ module IDL
1407
1403
  printiln(":op_sym => :#{node.rubyname}= })")
1408
1404
  }
1409
1405
  }
1410
- println()
1406
+ println
1411
1407
 
1412
1408
  printiln("def #{node.rubyname}=(val)")
1413
1409
  nest {
@@ -1416,7 +1412,7 @@ module IDL
1416
1412
  printiln(' 1, ::CORBA::COMPLETED_NO)')
1417
1413
  }
1418
1414
  printiln("end #of attribute set_#{node.name}")
1419
- println()
1415
+ println
1420
1416
  end
1421
1417
  end
1422
1418
 
@@ -1544,6 +1540,8 @@ module IDL
1544
1540
  s = '-' + expression_to_s(op[0])
1545
1541
  when Expression::UnaryNot
1546
1542
  s = '~' + expression_to_s(op[0])
1543
+ when Expression::Xor
1544
+ s = expression_to_s(op[0]) + ' ^ ' + expression_to_s(op[1])
1547
1545
  when Expression::Or
1548
1546
  s = expression_to_s(op[0]) + ' | ' + expression_to_s(op[1])
1549
1547
  when Expression::And
@@ -1568,38 +1566,26 @@ module IDL
1568
1566
  '(' + s + ')'
1569
1567
  end
1570
1568
 
1571
- def declare_struct(node)
1572
- end
1569
+ def declare_struct(node); end
1573
1570
 
1574
- def enter_struct(node)
1575
- end
1571
+ def enter_struct(node); end
1576
1572
 
1577
- def leave_struct(node)
1578
- end
1573
+ def leave_struct(node); end
1579
1574
 
1580
- def enter_exception(node)
1581
- end
1575
+ def enter_exception(node); end
1582
1576
 
1583
- def leave_exception(node)
1584
- end
1577
+ def leave_exception(node); end
1585
1578
 
1586
- def declare_union(node)
1587
- end
1579
+ def declare_union(node); end
1588
1580
 
1589
- def enter_union(node)
1590
- end
1581
+ def enter_union(node); end
1591
1582
 
1592
- def leave_union(node)
1593
- end
1583
+ def leave_union(node); end
1594
1584
 
1595
- def visit_enum(node)
1596
- end
1585
+ def visit_enum(node); end
1597
1586
 
1598
- def visit_enumerator(node)
1599
- end
1587
+ def visit_enumerator(node); end
1600
1588
 
1601
- def visit_typedef(node)
1602
- end
1589
+ def visit_typedef(node); end
1603
1590
  end ## RubyServantWriter
1604
-
1605
1591
  end ## module IDL
data/rakelib/config.rb CHANGED
@@ -346,10 +346,12 @@ module R2CORBA
346
346
 
347
347
  @@ridlc = File.join('bin', 'ridlc')
348
348
 
349
- # check availability of RIDL; either as gem or in subdir
350
- if (@@ridl_local = File.exist?(File.join('ridl', 'lib', 'ridl', 'ridl.rb')))
349
+ # check availability of RIDL; either as gem or in ridl subdir, or to a location as set
350
+ # in the RIDL_ROOT environment variable
351
+ ENV['RIDL_ROOT'] ||= File.expand_path('ridl')
352
+ if (@@ridl_local = File.exist?(File.join(ENV['RIDL_ROOT'], 'lib', 'ridl', 'ridl.rb')))
351
353
  incdirs = [
352
- File.expand_path(File.join('ridl', 'lib')),
354
+ File.expand_path(File.join(ENV['RIDL_ROOT'], 'lib')),
353
355
  File.expand_path('lib'),
354
356
  ENV['RUBYLIB']
355
357
  ].compact
@@ -513,9 +515,10 @@ module R2CORBA
513
515
  end
514
516
  end
515
517
 
516
- # check availability of RIDL; either as gem or in subdir
517
- unless File.exist?(File.join('ridl', 'lib', 'ridl', 'ridl.rb')) || (`gem search -i -q ridl`.strip) == 'true'
518
- raise 'Missing RIDL installation. R2CORBA requires RIDL installed either as gem or in subdirectory ridl.'
518
+ # check availability of RIDL; either as gem or in subdir or as set in RIDL_ROOT
519
+ ENV['RIDL_ROOT'] ||= File.expand_path('ridl')
520
+ unless File.exist?(File.join(ENV['RIDL_ROOT'], 'lib', 'ridl', 'ridl.rb')) || (`gem search -i -q ridl`.strip) == 'true'
521
+ raise 'Missing RIDL installation. R2CORBA requires RIDL installed either as gem or in the subdirectory ridl, or at the location as set by RIDL_ROOT.'
519
522
  end
520
523
  end
521
524
 
data/rakelib/ext.rake CHANGED
@@ -130,7 +130,7 @@ else # !JRUBY_VERSION
130
130
  cur_dir = Dir.getwd
131
131
  Dir.chdir File.expand_path(get_config('aceroot'))
132
132
  begin
133
- sh("perl bin/mwc.pl -type gnuautobuild TAO4Ruby.mwc -workers #{R2CORBA::Config.cpu_cores}")
133
+ sh("perl bin/mwc.pl -type gnuace TAO4Ruby.mwc -workers #{R2CORBA::Config.cpu_cores}")
134
134
  ensure
135
135
  Dir.chdir cur_dir
136
136
  end
data/rakelib/ext_r2tao.rb CHANGED
@@ -142,7 +142,7 @@ THE_END
142
142
  def self.get_latest_ace_version
143
143
  print 'Latest ACE release is '
144
144
  _version = nil
145
- open('https://raw.githubusercontent.com/DOCGroup/ACE_TAO/master/ACE/ace/Version.h') do |f|
145
+ URI.open('https://raw.githubusercontent.com/DOCGroup/ACE_TAO/master/ACE/ace/Version.h') do |f|
146
146
  f.each_line do |ln|
147
147
  if /define\s+ACE_VERSION\s+\"(.*)\"/ =~ ln
148
148
  _version = $1