r2corba 1.5.4 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +3 -2
  3. data/ext/libr2tao/any.cpp +11 -10
  4. data/ext/libr2tao/exception.cpp +6 -8
  5. data/ext/libr2tao/exception.h +1 -1
  6. data/ext/libr2tao/longdouble.cpp +5 -9
  7. data/ext/libr2tao/object.cpp +37 -53
  8. data/ext/libr2tao/orb.cpp +46 -73
  9. data/ext/libr2tao/r2tao_ext.h +8 -19
  10. data/ext/libr2tao/required.cpp +3 -8
  11. data/ext/libr2tao/required.h +18 -34
  12. data/ext/libr2tao/values.cpp +97 -98
  13. data/ext/libr2tao/values.h +35 -37
  14. data/ext/librpoa/iortable.cpp +6 -7
  15. data/ext/librpoa/poa.cpp +29 -32
  16. data/ext/librpoa/servant.cpp +39 -113
  17. data/ext/librpoa/servant.h +18 -40
  18. data/lib/corba/cbase/ORB.rb +26 -23
  19. data/lib/corba/cbase/Request.rb +3 -3
  20. data/lib/corba/cbase/Streams.rb +2 -2
  21. data/lib/corba/cbase/Typecode.rb +6 -6
  22. data/lib/corba/cbase/Values.rb +4 -2
  23. data/lib/corba/cbase/exception.rb +6 -4
  24. data/lib/corba/cbase/poa.rb +1 -1
  25. data/lib/corba/cbase/policies.rb +2 -2
  26. data/lib/corba/cbase/require.rb +8 -1
  27. data/lib/corba/cmds/base.rb +1 -1
  28. data/lib/corba/common/Any.rb +3 -2
  29. data/lib/corba/common/IDL.rb +1 -1
  30. data/lib/corba/common/ORB.rb +22 -22
  31. data/lib/corba/common/Object.rb +14 -14
  32. data/lib/corba/common/Servant.rb +4 -4
  33. data/lib/corba/common/Stub.rb +6 -6
  34. data/lib/corba/common/Typecode.rb +69 -42
  35. data/lib/corba/common/Union.rb +5 -0
  36. data/lib/corba/common/Values.rb +1 -0
  37. data/lib/corba/common/const.rb +2 -2
  38. data/lib/corba/common/exception.rb +2 -1
  39. data/lib/corba/common/version.rb +2 -2
  40. data/lib/corba/idl/IDL.rb +1 -1
  41. data/lib/corba/jbase/Any.rb +28 -26
  42. data/lib/corba/jbase/ORB.rb +5 -5
  43. data/lib/corba/jbase/Object.rb +13 -13
  44. data/lib/corba/jbase/Request.rb +8 -8
  45. data/lib/corba/jbase/Servant.rb +10 -10
  46. data/lib/corba/jbase/ServerRequest.rb +7 -7
  47. data/lib/corba/jbase/Streams.rb +67 -3
  48. data/lib/corba/jbase/Typecode.rb +17 -16
  49. data/lib/corba/jbase/Values.rb +2 -0
  50. data/lib/corba/jbase/exception.rb +2 -1
  51. data/lib/corba/jbase/poa.rb +20 -20
  52. data/lib/corba/jbase/policies.rb +32 -32
  53. data/lib/corba/jbase/require.rb +4 -0
  54. data/lib/corba/poa.rb +1 -1
  55. data/lib/corba/policies.rb +1 -1
  56. data/lib/corba/require.rb +2 -2
  57. data/lib/corba/svcs/ins/cos_naming.rb +37 -28
  58. data/lib/corba/svcs/ins/ins.rb +51 -51
  59. data/lib/corba/svcs/ins/naming_service.rb +8 -8
  60. data/lib/corba.rb +1 -1
  61. data/lib/ridlbe/ruby/config.rb +37 -30
  62. data/lib/ridlbe/ruby/walker.rb +295 -272
  63. data/mkrf_conf_srcgem.rb +6 -6
  64. data/rakelib/bin.rake +1 -1
  65. data/rakelib/bin.rb +3 -3
  66. data/rakelib/build.rake +16 -16
  67. data/rakelib/config.rake +1 -1
  68. data/rakelib/config.rb +22 -22
  69. data/rakelib/ext.rake +7 -68
  70. data/rakelib/ext.rb +15 -15
  71. data/rakelib/ext_r2tao.rb +12 -55
  72. data/rakelib/gem.rake +25 -25
  73. data/rakelib/gem.rb +6 -6
  74. data/rakelib/package.rake +1 -1
  75. data/test/BiDirectional/client.rb +17 -17
  76. data/test/BiDirectional/run_test.rb +11 -11
  77. data/test/BiDirectional/server.rb +24 -25
  78. data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -17
  79. data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -13
  80. data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -19
  81. data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -15
  82. data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -13
  83. data/test/CORBA_Services/Naming/Corbaname/server.rb +30 -30
  84. data/test/CORBA_Services/Naming/Simple/client.rb +16 -16
  85. data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -13
  86. data/test/CORBA_Services/Naming/Simple/server.rb +19 -19
  87. data/test/Collocation/run_test.rb +10 -10
  88. data/test/Collocation/test.rb +27 -20
  89. data/test/Connect_Timeout/client.rb +16 -17
  90. data/test/Connect_Timeout/run_test.rb +10 -10
  91. data/test/DII/client.rb +30 -30
  92. data/test/DII/run_test.rb +11 -11
  93. data/test/DII/server.rb +16 -16
  94. data/test/DSI/client.rb +16 -16
  95. data/test/DSI/run_test.rb +11 -11
  96. data/test/DSI/server.rb +17 -17
  97. data/test/Exceptions/client.rb +21 -21
  98. data/test/Exceptions/run_test.rb +11 -11
  99. data/test/Exceptions/server.rb +16 -16
  100. data/test/Hello/client.rb +16 -16
  101. data/test/Hello/run_test.rb +11 -11
  102. data/test/Hello/server.rb +17 -17
  103. data/test/IDL_Test/client.rb +21 -21
  104. data/test/IDL_Test/run_test.rb +11 -11
  105. data/test/IDL_Test/server.rb +19 -19
  106. data/test/IORMap/client.rb +14 -14
  107. data/test/IORMap/run_test.rb +11 -11
  108. data/test/IORMap/server.rb +26 -26
  109. data/test/IORTable/client.rb +14 -14
  110. data/test/IORTable/run_test.rb +11 -11
  111. data/test/IORTable/server.rb +26 -26
  112. data/test/Implicit_Conversion/client.rb +20 -17
  113. data/test/Implicit_Conversion/run_test.rb +11 -11
  114. data/test/Implicit_Conversion/server.rb +16 -16
  115. data/test/Multi_Threading/Multiple_ORB/client.rb +14 -14
  116. data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -12
  117. data/test/Multi_Threading/Multiple_ORB/server.rb +17 -17
  118. data/test/Multi_Threading/Simple/client.rb +17 -17
  119. data/test/Multi_Threading/Simple/run_test.rb +11 -11
  120. data/test/Multi_Threading/Simple/server.rb +16 -16
  121. data/test/Multi_Threading/Threads/client.rb +16 -16
  122. data/test/Multi_Threading/Threads/run_test.rb +11 -11
  123. data/test/Multi_Threading/Threads/server.rb +22 -22
  124. data/test/Multi_Threading/Threads/watchdog.rb +16 -16
  125. data/test/Multiple_Servant_Interfaces/client.rb +14 -14
  126. data/test/Multiple_Servant_Interfaces/run_test.rb +11 -11
  127. data/test/Multiple_Servant_Interfaces/server.rb +18 -18
  128. data/test/Nil/run_test.rb +10 -10
  129. data/test/Nil/test.rb +14 -15
  130. data/test/OBV/AbstractInterface/client.rb +14 -14
  131. data/test/OBV/AbstractInterface/run_test.rb +11 -11
  132. data/test/OBV/AbstractInterface/server.rb +20 -19
  133. data/test/OBV/Custom/OBV_impl.rb +2 -0
  134. data/test/OBV/Custom/client.rb +14 -14
  135. data/test/OBV/Custom/run_test.rb +11 -11
  136. data/test/OBV/Custom/server.rb +16 -16
  137. data/test/OBV/Simple/OBV_impl.rb +1 -0
  138. data/test/OBV/Simple/client.rb +14 -14
  139. data/test/OBV/Simple/run_test.rb +11 -11
  140. data/test/OBV/Simple/server.rb +16 -16
  141. data/test/OBV/Simple_Event/Event_impl.rb +1 -0
  142. data/test/OBV/Simple_Event/client.rb +14 -14
  143. data/test/OBV/Simple_Event/run_test.rb +11 -11
  144. data/test/OBV/Simple_Event/server.rb +16 -16
  145. data/test/OBV/Supports/client.rb +19 -19
  146. data/test/OBV/Supports/run_test.rb +11 -11
  147. data/test/OBV/Supports/server.rb +15 -15
  148. data/test/OBV/Supports/supports_impl.rb +3 -0
  149. data/test/OBV/Tree/client.rb +14 -14
  150. data/test/OBV/Tree/run_test.rb +11 -11
  151. data/test/OBV/Tree/server.rb +19 -19
  152. data/test/OBV/Truncatable/Truncatable_impl.rb +1 -1
  153. data/test/OBV/Truncatable/client.rb +57 -57
  154. data/test/OBV/Truncatable/run_test.rb +11 -11
  155. data/test/OBV/Truncatable/server.rb +15 -15
  156. data/test/OBV/ValueBox/client.rb +154 -153
  157. data/test/OBV/ValueBox/run_test.rb +11 -11
  158. data/test/OBV/ValueBox/server.rb +42 -42
  159. data/test/Object/client.rb +15 -15
  160. data/test/Object/run_test.rb +11 -11
  161. data/test/Object/server.rb +19 -19
  162. data/test/POA/run_test.rb +10 -10
  163. data/test/POA/test.rb +16 -16
  164. data/test/Param_Test/client.rb +51 -51
  165. data/test/Param_Test/run_test.rb +11 -11
  166. data/test/Param_Test/server.rb +59 -59
  167. data/test/Performance/Simple/client.rb +16 -16
  168. data/test/Performance/Simple/run_test.rb +11 -11
  169. data/test/Performance/Simple/server.rb +16 -16
  170. data/test/Policies/run_test.rb +10 -10
  171. data/test/Policies/test.rb +23 -24
  172. data/test/Timeout/client.rb +21 -21
  173. data/test/Timeout/run_test.rb +11 -11
  174. data/test/Timeout/server.rb +22 -22
  175. data/test/lib/assert.rb +0 -1
  176. data/test/lib/test.rb +28 -23
  177. data/test/test_runner.rb +21 -22
  178. metadata +6 -9
  179. data/ext/extload/extload.c +0 -60
  180. data/ext/librpoa/srvreq_fix.cpp +0 -282
  181. data/ext/librpoa/srvreq_fix.h +0 -148
@@ -36,11 +36,11 @@ module R2CORBA
36
36
  module POA
37
37
  def destroy(etherealize_objects, wait_for_completion)
38
38
  begin
39
- self.objref_.destroy(etherealize_objects!=false, wait_for_completion!=false)
39
+ self.objref_.destroy(etherealize_objects != false, wait_for_completion != false)
40
40
  rescue ::NativeException
41
41
  CORBA::Exception.native2r($!)
42
42
  end
43
- end #of operation destroy
43
+ end # of operation destroy
44
44
 
45
45
  def the_name()
46
46
  begin
@@ -48,7 +48,7 @@ module R2CORBA
48
48
  rescue ::NativeException
49
49
  CORBA::Exception.native2r($!)
50
50
  end
51
- end #of attribute get_the_name
51
+ end # of attribute get_the_name
52
52
 
53
53
  def the_POAManager()
54
54
  begin
@@ -56,7 +56,7 @@ module R2CORBA
56
56
  rescue ::NativeException
57
57
  CORBA::Exception.native2r($!)
58
58
  end
59
- end #of attribute get_the_POAManager
59
+ end # of attribute get_the_POAManager
60
60
 
61
61
  def the_parent()
62
62
  begin
@@ -64,7 +64,7 @@ module R2CORBA
64
64
  rescue ::NativeException
65
65
  CORBA::Exception.native2r($!)
66
66
  end
67
- end #of attribute get_the_parent
67
+ end # of attribute get_the_parent
68
68
 
69
69
  def the_children()
70
70
  begin
@@ -72,7 +72,7 @@ module R2CORBA
72
72
  rescue ::NativeException
73
73
  CORBA::Exception.native2r($!)
74
74
  end
75
- end #of attribute get_the_children
75
+ end # of attribute get_the_children
76
76
 
77
77
  def activate_object(p_servant)
78
78
  begin
@@ -80,7 +80,7 @@ module R2CORBA
80
80
  rescue ::NativeException
81
81
  CORBA::Exception.native2r($!)
82
82
  end
83
- end #of operation activate_object
83
+ end # of operation activate_object
84
84
 
85
85
  def activate_object_with_id(r_id, p_servant)
86
86
  begin
@@ -88,7 +88,7 @@ module R2CORBA
88
88
  rescue ::NativeException
89
89
  CORBA::Exception.native2r($!)
90
90
  end
91
- end #of operation activate_object_with_id
91
+ end # of operation activate_object_with_id
92
92
 
93
93
  def deactivate_object(oid)
94
94
  begin
@@ -96,7 +96,7 @@ module R2CORBA
96
96
  rescue ::NativeException
97
97
  CORBA::Exception.native2r($!)
98
98
  end
99
- end #of operation deactivate_object
99
+ end # of operation deactivate_object
100
100
 
101
101
  def create_reference(intf)
102
102
  begin
@@ -104,7 +104,7 @@ module R2CORBA
104
104
  rescue ::NativeException
105
105
  CORBA::Exception.native2r($!)
106
106
  end
107
- end #of operation create_reference
107
+ end # of operation create_reference
108
108
 
109
109
  def create_reference_with_id(oid, intf)
110
110
  begin
@@ -112,7 +112,7 @@ module R2CORBA
112
112
  rescue ::NativeException
113
113
  CORBA::Exception.native2r($!)
114
114
  end
115
- end #of operation create_reference_with_id
115
+ end # of operation create_reference_with_id
116
116
 
117
117
  def servant_to_id(p_servant)
118
118
  begin
@@ -120,7 +120,7 @@ module R2CORBA
120
120
  rescue ::NativeException
121
121
  CORBA::Exception.native2r($!)
122
122
  end
123
- end #of operation servant_to_id
123
+ end # of operation servant_to_id
124
124
 
125
125
  def servant_to_reference(p_servant)
126
126
  begin
@@ -128,7 +128,7 @@ module R2CORBA
128
128
  rescue ::NativeException
129
129
  CORBA::Exception.native2r($!)
130
130
  end
131
- end #of operation servant_to_reference
131
+ end # of operation servant_to_reference
132
132
 
133
133
  def reference_to_servant(reference)
134
134
  begin
@@ -136,7 +136,7 @@ module R2CORBA
136
136
  rescue ::NativeException
137
137
  CORBA::Exception.native2r($!)
138
138
  end
139
- end #of operation reference_to_servant
139
+ end # of operation reference_to_servant
140
140
 
141
141
  def reference_to_id(reference)
142
142
  begin
@@ -144,7 +144,7 @@ module R2CORBA
144
144
  rescue ::NativeException
145
145
  CORBA::Exception.native2r($!)
146
146
  end
147
- end #of operation reference_to_id
147
+ end # of operation reference_to_id
148
148
 
149
149
  def id_to_servant(oid)
150
150
  begin
@@ -152,7 +152,7 @@ module R2CORBA
152
152
  rescue ::NativeException
153
153
  CORBA::Exception.native2r($!)
154
154
  end
155
- end #of operation id_to_servant
155
+ end # of operation id_to_servant
156
156
 
157
157
  def id_to_reference(oid)
158
158
  begin
@@ -160,19 +160,19 @@ module R2CORBA
160
160
  rescue ::NativeException
161
161
  CORBA::Exception.native2r($!)
162
162
  end
163
- end #of operation id_to_reference
163
+ end # of operation id_to_reference
164
164
 
165
165
  def create_POA(adapter_name, a_POAManager, policies)
166
166
  raise CORBA::BAD_PARAM.new('expected POAManager', 0, CORBA::COMPLETED_NO) unless a_POAManager.is_a?(PortableServer::POAManager)
167
167
  CORBA::PolicyList._tc.validate(policies) unless policies.nil? || policies.empty?
168
168
  jpolicies = CORBA::Native::Reflect::Array.newInstance(CORBA::Native::Policy.java_class, policies.nil? ? 0 : policies.size)
169
- policies.each_with_index {|p,i| jpolicies[i] = p.objref_ } unless policies.nil?
169
+ policies.each_with_index {|p, i| jpolicies[i] = p.objref_ } unless policies.nil?
170
170
  begin
171
171
  PortableServer::POA._narrow(CORBA::Object._wrap_native(self.objref_.create_POA(adapter_name, a_POAManager.objref_, jpolicies)))
172
172
  rescue ::NativeException
173
173
  CORBA::Exception.native2r($!)
174
174
  end
175
- end #of operation create_POA
175
+ end # of operation create_POA
176
176
 
177
177
  def find_POA(adapter_name, activate_it)
178
178
  begin
@@ -180,7 +180,7 @@ module R2CORBA
180
180
  rescue ::NativeException
181
181
  CORBA::Exception.native2r($!)
182
182
  end
183
- end #of operation find_POA
183
+ end # of operation find_POA
184
184
  end # POA
185
185
 
186
186
  module POAManager
@@ -16,7 +16,7 @@ module R2CORBA
16
16
 
17
17
  module ORB
18
18
  def create_policy(type, val)
19
- raise CORBA::BAD_PARAM.new('Any expected',0,CORBA::COMPLETED_NO) unless CORBA::Any === val
19
+ raise CORBA::BAD_PARAM.new('Any expected', 0, CORBA::COMPLETED_NO) unless CORBA::Any === val
20
20
  begin
21
21
  Policy._wrap_native(self.orb_.create_policy(type.to_i, val.to_java(self.orb_)))
22
22
  rescue ::NativeException
@@ -53,12 +53,12 @@ module R2CORBA
53
53
  end
54
54
  jpolicies.collect {|jpol| Policy._wrap_native(jpol) }
55
55
  end
56
- end #of operation get_policy_overrides
56
+ end # of operation get_policy_overrides
57
57
 
58
58
  def _set_policy_overrides(policies, set_add)
59
59
  raise CORBA::INV_OBJREF.new if self._is_nil?()
60
60
  jpolicies = CORBA::Native::Reflect::Array.newInstance(CORBA::Native::Policy.java_class, policies.size)
61
- policies.each_with_index {|e,i| jpolicies[i] = e.objref_ }
61
+ policies.each_with_index {|e, i| jpolicies[i] = e.objref_ }
62
62
  begin
63
63
  obj = self.objref_._set_policy_override(jpolicies, Native::SetOverrideType.from_int(set_add))
64
64
  rescue ::NativeException
@@ -91,7 +91,7 @@ module R2CORBA
91
91
  rescue ::NativeException
92
92
  CORBA::Exception.native2r($!)
93
93
  end
94
- end #of attribute get_policy_type
94
+ end # of attribute get_policy_type
95
95
 
96
96
  def copy()
97
97
  begin
@@ -99,7 +99,7 @@ module R2CORBA
99
99
  rescue ::NativeException
100
100
  CORBA::Exception.native2r($!)
101
101
  end
102
- end #of operation copy
102
+ end # of operation copy
103
103
 
104
104
  def destroy()
105
105
  begin
@@ -108,7 +108,7 @@ module R2CORBA
108
108
  CORBA::Exception.native2r($!)
109
109
  end
110
110
  @objref_ = nil
111
- end #of operation destroy
111
+ end # of operation destroy
112
112
  end # Policy
113
113
 
114
114
  module PolicyManager
@@ -121,17 +121,17 @@ module R2CORBA
121
121
  CORBA::Exception.native2r($!)
122
122
  end
123
123
  jpolicies.collect {|jpol| Policy._wrap_native(jpol) }
124
- end #of operation get_policy_overrides
124
+ end # of operation get_policy_overrides
125
125
 
126
126
  def set_policy_overrides(policies, set_add)
127
127
  jpolicies = CORBA::Native::Reflect::Array.newInstance(CORBA::Native::Policy.java_class, policies.size)
128
- policies.each_with_index {|e,i| jpolicies[i] = e.objref_ }
128
+ policies.each_with_index {|e, i| jpolicies[i] = e.objref_ }
129
129
  begin
130
130
  self.objref_.set_policy_overrides(jpolicies, Native::SetOverrideType.from_int(set_add))
131
131
  rescue ::NativeException
132
132
  CORBA::Exception.native2r($!)
133
133
  end
134
- end #of operation set_policy_overrides
134
+ end # of operation set_policy_overrides
135
135
  end # Policy
136
136
 
137
137
  end # CORBA
@@ -147,7 +147,7 @@ module R2CORBA
147
147
  rescue ::NativeException
148
148
  CORBA::Exception.native2r($!)
149
149
  end
150
- end #of operation create_thread_policy
150
+ end # of operation create_thread_policy
151
151
 
152
152
  def create_lifespan_policy(value)
153
153
  begin
@@ -157,7 +157,7 @@ module R2CORBA
157
157
  rescue ::NativeException
158
158
  CORBA::Exception.native2r($!)
159
159
  end
160
- end #of operation create_lifespan_policy
160
+ end # of operation create_lifespan_policy
161
161
 
162
162
  def create_id_uniqueness_policy(value)
163
163
  begin
@@ -167,7 +167,7 @@ module R2CORBA
167
167
  rescue ::NativeException
168
168
  CORBA::Exception.native2r($!)
169
169
  end
170
- end #of operation create_id_uniqueness_policy
170
+ end # of operation create_id_uniqueness_policy
171
171
 
172
172
  def create_id_assignment_policy(value)
173
173
  begin
@@ -177,7 +177,7 @@ module R2CORBA
177
177
  rescue ::NativeException
178
178
  CORBA::Exception.native2r($!)
179
179
  end
180
- end #of operation create_id_assignment_policy
180
+ end # of operation create_id_assignment_policy
181
181
 
182
182
  def create_implicit_activation_policy(value)
183
183
  begin
@@ -187,7 +187,7 @@ module R2CORBA
187
187
  rescue ::NativeException
188
188
  CORBA::Exception.native2r($!)
189
189
  end
190
- end #of operation create_implicit_activation_policy
190
+ end # of operation create_implicit_activation_policy
191
191
 
192
192
  def create_servant_retention_policy(value)
193
193
  begin
@@ -197,7 +197,7 @@ module R2CORBA
197
197
  rescue ::NativeException
198
198
  CORBA::Exception.native2r($!)
199
199
  end
200
- end #of operation create_servant_retention_policy
200
+ end # of operation create_servant_retention_policy
201
201
 
202
202
  def create_request_processing_policy(value)
203
203
  begin
@@ -207,7 +207,7 @@ module R2CORBA
207
207
  rescue ::NativeException
208
208
  CORBA::Exception.native2r($!)
209
209
  end
210
- end #of operation create_request_processing_policy
210
+ end # of operation create_request_processing_policy
211
211
  end # POA
212
212
 
213
213
  module ThreadPolicy ## interface
@@ -217,8 +217,8 @@ module R2CORBA
217
217
  rescue ::NativeException
218
218
  CORBA::Exception.native2r($!)
219
219
  end
220
- end #of attribute get_value
221
- end #of interface ThreadPolicy
220
+ end # of attribute get_value
221
+ end # of interface ThreadPolicy
222
222
 
223
223
  module LifespanPolicy ## interface
224
224
  def value()
@@ -227,8 +227,8 @@ module R2CORBA
227
227
  rescue ::NativeException
228
228
  CORBA::Exception.native2r($!)
229
229
  end
230
- end #of attribute get_value
231
- end #of interface LifespanPolicy
230
+ end # of attribute get_value
231
+ end # of interface LifespanPolicy
232
232
 
233
233
  module IdUniquenessPolicy ## interface
234
234
  def value()
@@ -237,8 +237,8 @@ module R2CORBA
237
237
  rescue ::NativeException
238
238
  CORBA::Exception.native2r($!)
239
239
  end
240
- end #of attribute get_value
241
- end #of interface IdUniquenessPolicy
240
+ end # of attribute get_value
241
+ end # of interface IdUniquenessPolicy
242
242
 
243
243
  module IdAssignmentPolicy ## interface
244
244
  def value()
@@ -247,8 +247,8 @@ module R2CORBA
247
247
  rescue ::NativeException
248
248
  CORBA::Exception.native2r($!)
249
249
  end
250
- end #of attribute get_value
251
- end #of interface IdAssignmentPolicy
250
+ end # of attribute get_value
251
+ end # of interface IdAssignmentPolicy
252
252
 
253
253
  module ImplicitActivationPolicy ## interface
254
254
  def value()
@@ -257,8 +257,8 @@ module R2CORBA
257
257
  rescue ::NativeException
258
258
  CORBA::Exception.native2r($!)
259
259
  end
260
- end #of attribute get_value
261
- end #of interface ImplicitActivationPolicy
260
+ end # of attribute get_value
261
+ end # of interface ImplicitActivationPolicy
262
262
 
263
263
  module ServantRetentionPolicy ## interface
264
264
  def value()
@@ -267,8 +267,8 @@ module R2CORBA
267
267
  rescue ::NativeException
268
268
  CORBA::Exception.native2r($!)
269
269
  end
270
- end #of attribute get_value
271
- end #of interface RequestProcessingPolicy
270
+ end # of attribute get_value
271
+ end # of interface RequestProcessingPolicy
272
272
 
273
273
  module RequestProcessingPolicy ## interface
274
274
  def value()
@@ -277,8 +277,8 @@ module R2CORBA
277
277
  rescue ::NativeException
278
278
  CORBA::Exception.native2r($!)
279
279
  end
280
- end #of attribute get_value
281
- end #of interface RequestProcessingPolicy
280
+ end # of attribute get_value
281
+ end # of interface RequestProcessingPolicy
282
282
 
283
283
  end # PortableServer
284
284
 
@@ -291,8 +291,8 @@ module R2CORBA
291
291
  rescue ::NativeException
292
292
  CORBA::Exception.native2r($!)
293
293
  end
294
- end #of attribute get_value
295
- end #of interface BidirectionalPolicy
294
+ end # of attribute get_value
295
+ end # of interface BidirectionalPolicy
296
296
 
297
297
  end # BiDirPolicy
298
298
 
@@ -50,18 +50,22 @@ module R2CORBA
50
50
  module Portable
51
51
  include_package 'org.omg.CORBA.portable'
52
52
  end
53
+
53
54
  module V2_3
54
55
  include_package 'org.omg.CORBA_2_3'
55
56
  module Portable
56
57
  include_package 'org.omg.CORBA.portable'
57
58
  end
58
59
  end
60
+
59
61
  module V2_5
60
62
  include_package 'org.omg.CORBA_2_5'
61
63
  end
64
+
62
65
  module V3_0
63
66
  include_package 'org.omg.CORBA_3_0'
64
67
  end
68
+
65
69
  module Jacorb
66
70
  module Util
67
71
  java_import org.jacorb.util.Version
data/lib/corba/poa.rb CHANGED
@@ -11,4 +11,4 @@
11
11
  #--------------------------------------------------------------------
12
12
 
13
13
  require 'corba.rb'
14
- require "corba/#{defined?(JRUBY_VERSION)?'jbase':'cbase'}/poa.rb"
14
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/poa.rb"
@@ -14,4 +14,4 @@ require 'corba.rb'
14
14
  require 'corba/poa.rb'
15
15
  require 'corba/idl/BiDirPolicyC'
16
16
  require 'corba/idl/MessagingC'
17
- require "corba/#{defined?(JRUBY_VERSION)?'jbase':'cbase'}/policies.rb"
17
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/policies.rb"
data/lib/corba/require.rb CHANGED
@@ -11,6 +11,6 @@
11
11
  #--------------------------------------------------------------------
12
12
 
13
13
  require 'corba/common/require'
14
- require "corba/#{defined?(JRUBY_VERSION)?'jbase':'cbase'}/require"
14
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/require"
15
15
  require 'corba/idl/require'
16
- require "corba/#{defined?(JRUBY_VERSION)?'jbase':'cbase'}/post_require"
16
+ require "corba/#{defined?(JRUBY_VERSION) ? 'jbase' : 'cbase'}/post_require"
@@ -12,7 +12,7 @@
12
12
  #--------------------------------------------------------------------
13
13
 
14
14
  require 'corba/naming_service'
15
- if (defined?(JRUBY_VERSION) or R2CORBA::TAO::RUBY_THREAD_SUPPORT)
15
+ if defined?(JRUBY_VERSION) or R2CORBA::TAO::RUBY_THREAD_SUPPORT
16
16
  require 'monitor'
17
17
  end
18
18
 
@@ -23,14 +23,16 @@ module CosNaming
23
23
  def to_key
24
24
  "#{self.r_id}|#{self.kind}"
25
25
  end
26
+
26
27
  # convert NameComponent to stringified format according to spec
27
28
  def to_string
28
29
  s = ''
29
- s = self.r_id.gsub(/([\/\.\\])/,'\\\1') unless self.r_id.to_s.empty?
30
+ s = self.r_id.gsub(/([\/\.\\])/, '\\\1') unless self.r_id.to_s.empty?
30
31
  s << '.' if s.empty? or !self.kind.to_s.empty?
31
- s << self.kind.gsub(/([\/\.\\])/,'\\\1') unless self.kind.to_s.empty?
32
+ s << self.kind.gsub(/([\/\.\\])/, '\\\1') unless self.kind.to_s.empty?
32
33
  s
33
34
  end
35
+
34
36
  # convert stringified name back to NameComponent
35
37
  def self.from_string(snc)
36
38
  raise CosNaming::NamingContext::InvalidName.new if snc.empty?
@@ -43,9 +45,9 @@ module CosNaming
43
45
  esc_ = !esc_
44
46
  when '.'
45
47
  unless esc_
46
- raise CosNaming::NamingContext::InvalidName.new if off_>0
48
+ raise CosNaming::NamingContext::InvalidName.new if off_ > 0
47
49
  id_ = snc[0, i].gsub(/\\(\.|\\)/, '\1')
48
- off_ = i+1
50
+ off_ = i + 1
49
51
  end
50
52
  esc_ = false
51
53
  else
@@ -80,7 +82,7 @@ module R2CORBA
80
82
  def next_n(how_many)
81
83
  raise CORBA::BAD_PARAM.new if how_many < 1
82
84
  bindings = []
83
- while how_many>0 and !@rl.empty?
85
+ while how_many > 0 and !@rl.empty?
84
86
  reg = @rl.shift
85
87
  bindings << CosNaming::Binding.new(reg[:name], reg[:type])
86
88
  how_many -= 1
@@ -104,12 +106,13 @@ module R2CORBA
104
106
  # Map type to store bindings.
105
107
  # Use synchronized version for multithreading capable implementations.
106
108
  #
107
- if (defined?(JRUBY_VERSION) or R2CORBA::TAO::RUBY_THREAD_SUPPORT)
109
+ if defined?(JRUBY_VERSION) or R2CORBA::TAO::RUBY_THREAD_SUPPORT
108
110
  MAP_TYPE = Class.new(Monitor) do
109
111
  def initialize
110
112
  super
111
113
  @map_ = {}
112
114
  end
115
+
113
116
  def size()
114
117
  rc = 0
115
118
  synchronize do
@@ -117,6 +120,7 @@ module R2CORBA
117
120
  end
118
121
  return rc
119
122
  end
123
+
120
124
  def has_key?(key)
121
125
  rc = false
122
126
  synchronize do
@@ -124,6 +128,7 @@ module R2CORBA
124
128
  end
125
129
  return rc
126
130
  end
131
+
127
132
  def [](key)
128
133
  rc = nil
129
134
  synchronize do
@@ -131,12 +136,14 @@ module R2CORBA
131
136
  end
132
137
  return rc
133
138
  end
139
+
134
140
  def []=(key, value)
135
141
  synchronize do
136
142
  @map_[key] = value
137
143
  end
138
144
  value
139
145
  end
146
+
140
147
  def delete(key)
141
148
  rc = nil
142
149
  synchronize do
@@ -144,6 +151,7 @@ module R2CORBA
144
151
  end
145
152
  return rc
146
153
  end
154
+
147
155
  def values
148
156
  rc = nil
149
157
  synchronize do
@@ -151,6 +159,7 @@ module R2CORBA
151
159
  end
152
160
  return rc
153
161
  end
162
+
154
163
  def each(&block)
155
164
  synchronize do
156
165
  @map_.each &block
@@ -197,8 +206,8 @@ module R2CORBA
197
206
  # CosNaming::NamingContext methods
198
207
  #
199
208
  def bind(n, obj)
200
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
201
- if n.size>1
209
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
210
+ if n.size > 1
202
211
  nc = find_context(n)
203
212
  nc.bind(n, obj)
204
213
  else
@@ -207,8 +216,8 @@ module R2CORBA
207
216
  end
208
217
 
209
218
  def rebind(n, obj)
210
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
211
- if n.size>1
219
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
220
+ if n.size > 1
212
221
  nc = find_context(n)
213
222
  nc.rebind(n, obj)
214
223
  else
@@ -217,8 +226,8 @@ module R2CORBA
217
226
  end
218
227
 
219
228
  def bind_context(n, nc_new)
220
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
221
- if n.size>1
229
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
230
+ if n.size > 1
222
231
  nc = find_context(n)
223
232
  nc.bind_context(n, nc_new)
224
233
  else
@@ -227,8 +236,8 @@ module R2CORBA
227
236
  end
228
237
 
229
238
  def rebind_context(n, nc_new)
230
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
231
- if n.size>1
239
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
240
+ if n.size > 1
232
241
  nc = find_context(n)
233
242
  nc.rebind_context(n, nc_new)
234
243
  else
@@ -237,13 +246,13 @@ module R2CORBA
237
246
  end
238
247
 
239
248
  def resolve(n)
240
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
249
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
241
250
  find_object(n)
242
251
  end
243
252
 
244
253
  def unbind(n)
245
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
246
- if n.size>1
254
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
255
+ if n.size > 1
247
256
  nc = find_context(n)
248
257
  nc.unbind(n)
249
258
  else
@@ -263,14 +272,14 @@ module R2CORBA
263
272
  end
264
273
 
265
274
  def bind_new_context(n)
266
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
275
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
267
276
  nc = self.new_context()
268
277
  self.bind_context(n, nc)
269
278
  nc
270
279
  end
271
280
 
272
281
  def destroy()
273
- raise CosNaming::NamingContext::NotEmpty.new if @map.size>0
282
+ raise CosNaming::NamingContext::NotEmpty.new if @map.size > 0
274
283
  return if self.oid.nil? ## no oid for root context
275
284
  poa = self._default_POA
276
285
  poa.deactivate_object(self.oid)
@@ -280,7 +289,7 @@ module R2CORBA
280
289
  def list(how_many)
281
290
  reglist = @map.values
282
291
  bindings = []
283
- while how_many>0 and !reglist.empty?
292
+ while how_many > 0 and !reglist.empty?
284
293
  reg = reglist.shift
285
294
  bindings << CosNaming::Binding.new(reg[:name], reg[:type])
286
295
  how_many -= 1
@@ -298,7 +307,7 @@ module R2CORBA
298
307
  # CosNaming::NamingContextExt methods
299
308
  #
300
309
  def to_string(n)
301
- raise CosNaming::NamingContext::InvalidName.new if n.size<1
310
+ raise CosNaming::NamingContext::InvalidName.new if n.size < 1
302
311
  n.collect { |nc| nc.to_string }.join('/')
303
312
  end
304
313
 
@@ -308,13 +317,13 @@ module R2CORBA
308
317
  off_ = 0
309
318
  esc_ = false
310
319
  sn.size.times do |i|
311
- case sn[i,1]
320
+ case sn[i, 1]
312
321
  when '\\'
313
322
  esc_ = !esc_
314
323
  when '/'
315
324
  unless esc_
316
- snc_arr << sn[off_, i-off_]
317
- off_ = i+1
325
+ snc_arr << sn[off_, i - off_]
326
+ off_ = i + 1
318
327
  end
319
328
  esc_ = false
320
329
  else
@@ -327,7 +336,7 @@ module R2CORBA
327
336
 
328
337
  def to_url(addr, sn)
329
338
  raise CosNaming::NamingContext::InvalidName.new if addr.to_s.empty? or sn.to_s.empty?
330
- url = 'corbaname:'+addr+'#'
339
+ url = 'corbaname:' + addr + '#'
331
340
  sn.scan(/./) do |ch|
332
341
  if /[a-zA-Z0-9;\/:\?@=+\$,\-_\.!~*\'\(\)]/ =~ ch
333
342
  url << ch
@@ -385,7 +394,7 @@ module R2CORBA
385
394
  # resolving the context levels
386
395
  #
387
396
  def find_object(n)
388
- if n.size>1
397
+ if n.size > 1
389
398
  nc = find_context(n)
390
399
  nc.resolve(n)
391
400
  else
@@ -417,7 +426,7 @@ module R2CORBA
417
426
  end
418
427
  end
419
428
 
420
- end #of NamingContext servant
429
+ end # of NamingContext servant
421
430
 
422
431
  end
423
432
  end