r2corba 1.6.2-universal-java → 1.7.1-universal-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +5 -5
- data/lib/corba/cbase/ORB.rb +9 -8
- data/lib/corba/cbase/Request.rb +10 -12
- 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 +1 -2
- data/lib/corba/common/Any.rb +2 -3
- 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 +4 -5
- data/lib/corba/common/require.rb +1 -3
- data/lib/corba/common/version.rb +2 -4
- 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 +32 -36
- 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 +29 -18
- data/lib/corba/svcs/ins/ins.rb +38 -38
- data/lib/corba/svcs/ins/naming_service.rb +6 -6
- 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/config.rb +9 -6
- data/rakelib/gem.rake +0 -30
- data/test/BiDirectional/client.rb +7 -7
- data/test/BiDirectional/run_test.rb +2 -2
- data/test/BiDirectional/server.rb +13 -13
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +9 -9
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +2 -2
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +6 -6
- data/test/CORBA_Services/Naming/Corbaname/client.rb +6 -6
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +2 -2
- data/test/CORBA_Services/Naming/Corbaname/server.rb +8 -8
- data/test/CORBA_Services/Naming/Simple/client.rb +6 -6
- data/test/CORBA_Services/Naming/Simple/run_test.rb +2 -2
- data/test/CORBA_Services/Naming/Simple/server.rb +6 -6
- data/test/Collocation/run_test.rb +2 -2
- data/test/Collocation/test.rb +1 -1
- data/test/Connect_Timeout/client.rb +7 -7
- data/test/Connect_Timeout/run_test.rb +2 -2
- data/test/DII/client.rb +10 -10
- data/test/DII/run_test.rb +2 -2
- data/test/DII/server.rb +7 -7
- data/test/DSI/client.rb +6 -6
- data/test/DSI/run_test.rb +2 -2
- data/test/DSI/server.rb +9 -9
- data/test/Exceptions/client.rb +6 -6
- data/test/Exceptions/run_test.rb +2 -2
- data/test/Exceptions/server.rb +7 -7
- data/test/Hello/client.rb +7 -7
- data/test/Hello/run_test.rb +2 -2
- data/test/Hello/server.rb +7 -7
- data/test/IDL_Test/client.rb +9 -9
- data/test/IDL_Test/run_test.rb +2 -2
- data/test/IDL_Test/server.rb +7 -7
- data/test/IORMap/client.rb +7 -7
- data/test/IORMap/run_test.rb +2 -2
- data/test/IORMap/server.rb +9 -9
- data/test/IORTable/client.rb +7 -7
- data/test/IORTable/run_test.rb +2 -2
- data/test/IORTable/server.rb +10 -10
- data/test/Implicit_Conversion/client.rb +5 -5
- data/test/Implicit_Conversion/run_test.rb +2 -2
- data/test/Implicit_Conversion/server.rb +7 -7
- data/test/Multi_Threading/Multiple_ORB/client.rb +6 -6
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +2 -2
- data/test/Multi_Threading/Multiple_ORB/server.rb +5 -5
- data/test/Multi_Threading/Simple/client.rb +6 -6
- data/test/Multi_Threading/Simple/run_test.rb +2 -2
- data/test/Multi_Threading/Simple/server.rb +8 -8
- data/test/Multi_Threading/Threads/client.rb +6 -6
- data/test/Multi_Threading/Threads/run_test.rb +2 -2
- data/test/Multi_Threading/Threads/server.rb +9 -9
- data/test/Multi_Threading/Threads/watchdog.rb +7 -7
- data/test/Multiple_Servant_Interfaces/client.rb +7 -7
- data/test/Multiple_Servant_Interfaces/run_test.rb +2 -2
- data/test/Multiple_Servant_Interfaces/server.rb +7 -7
- data/test/Nil/run_test.rb +2 -2
- data/test/Nil/test.rb +4 -4
- data/test/OBV/AbstractInterface/client.rb +9 -9
- data/test/OBV/AbstractInterface/run_test.rb +2 -2
- data/test/OBV/AbstractInterface/server.rb +7 -7
- data/test/OBV/Custom/client.rb +5 -5
- data/test/OBV/Custom/run_test.rb +2 -2
- data/test/OBV/Custom/server.rb +7 -7
- data/test/OBV/Simple/client.rb +5 -5
- data/test/OBV/Simple/run_test.rb +2 -2
- data/test/OBV/Simple/server.rb +7 -7
- data/test/OBV/Simple_Event/client.rb +5 -5
- data/test/OBV/Simple_Event/run_test.rb +2 -2
- data/test/OBV/Simple_Event/server.rb +7 -7
- data/test/OBV/Supports/client.rb +17 -17
- data/test/OBV/Supports/run_test.rb +2 -2
- data/test/OBV/Supports/server.rb +7 -7
- data/test/OBV/Tree/client.rb +6 -6
- data/test/OBV/Tree/run_test.rb +2 -2
- data/test/OBV/Tree/server.rb +7 -7
- data/test/OBV/Truncatable/client.rb +5 -5
- data/test/OBV/Truncatable/run_test.rb +2 -2
- data/test/OBV/Truncatable/server.rb +6 -6
- data/test/OBV/ValueBox/client.rb +20 -20
- data/test/OBV/ValueBox/run_test.rb +2 -2
- data/test/OBV/ValueBox/server.rb +8 -8
- data/test/Object/client.rb +6 -6
- data/test/Object/run_test.rb +2 -2
- data/test/Object/server.rb +9 -9
- data/test/POA/run_test.rb +2 -2
- data/test/POA/test.rb +4 -4
- data/test/Param_Test/client.rb +6 -6
- data/test/Param_Test/run_test.rb +2 -2
- data/test/Param_Test/server.rb +6 -6
- data/test/Performance/Simple/client.rb +6 -6
- data/test/Performance/Simple/run_test.rb +2 -2
- data/test/Performance/Simple/server.rb +7 -7
- data/test/Policies/run_test.rb +2 -2
- data/test/Policies/test.rb +4 -4
- data/test/Timeout/client.rb +11 -11
- data/test/Timeout/run_test.rb +2 -2
- data/test/Timeout/server.rb +9 -9
- data/test/lib/test.rb +5 -5
- data/test/test_runner.rb +8 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdeaabab1fd3b542abecdb5481f56012a4817af88022293a8cc7684c4f90562f
|
4
|
+
data.tar.gz: 2d8024131d94b739c28ce52e372e38d05fe1f92449eeff8e60c232579f8cd548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2309ceb2b6bff0160550ce46f88107d567255654c190a900e455ae0b0781eda015fea3aecad4a386fe6a2b685b219a2d372f498185fcf01246a6311e035d261
|
7
|
+
data.tar.gz: 29097fe46fd287b2e41651c43ea94091e3d1107e8c28ea4f2b4fb3d7c369cf4e8d90c9e9fe9d257f93fbdc3dca31030d149483017c5988e8a9228b2069cd4cfa
|
data/README.rdoc
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
{
|
2
|
-
{
|
3
|
-
{
|
4
|
-
{
|
1
|
+
{rdoc-image:https://badge.fury.io/rb/r2corba.svg}[https://rubygems.org/gems/r2corba]
|
2
|
+
{rdoc-image:https://www.codefactor.io/repository/github/remedyit/r2corba/badge}[https://www.codefactor.io/repository/github/remedyit/r2corba]
|
3
|
+
{rdoc-image:https://github.com/RemedyIT/r2corba/workflows/linux/badge.svg}[https://github.com/RemedyIT/r2corba/actions?query=workflow%3Alinux]
|
4
|
+
{rdoc-image:https://github.com/RemedyIT/r2corba/workflows/windows/badge.svg}[https://github.com/RemedyIT/r2corba/actions?query=workflow%3Awindows]
|
5
5
|
|
6
6
|
= R2CORBA
|
7
7
|
|
@@ -40,7 +40,7 @@ If you find a bug, please report it at the R2CORBA project's {issue tracker}[htt
|
|
40
40
|
|
41
41
|
== License
|
42
42
|
|
43
|
-
R2CORBA is Copyright (c) 2007-
|
43
|
+
R2CORBA is Copyright (c) 2007-2023 Remedy IT Expertise BV, The Netherlands.
|
44
44
|
|
45
45
|
It is free software, and may be redistributed under the terms specified in the link:LICENSE file.
|
46
46
|
|
data/lib/corba/cbase/ORB.rb
CHANGED
@@ -13,9 +13,7 @@ require 'monitor'
|
|
13
13
|
|
14
14
|
module R2CORBA
|
15
15
|
module CORBA
|
16
|
-
|
17
16
|
module ORB
|
18
|
-
|
19
17
|
class << self
|
20
18
|
protected
|
21
19
|
def _singleton_orb_init
|
@@ -42,23 +40,26 @@ module R2CORBA
|
|
42
40
|
a1, a2, a3 = args
|
43
41
|
if Array === a1
|
44
42
|
raise ArgumentError, "Incorrect nr. of arguments; #{args.size}" if args.size > 3
|
43
|
+
|
45
44
|
argv = a1
|
46
45
|
orb_id = (Hash === a2 ? nil : a2)
|
47
46
|
prop = (Hash === a2 ? a2 : a3)
|
48
47
|
elsif args.size == 1 || Hash === a2
|
49
48
|
raise ArgumentError, "Incorrect nr. of arguments; #{args.size}" if args.size > 2
|
49
|
+
|
50
50
|
orb_id = a1
|
51
51
|
prop = a2
|
52
52
|
else
|
53
53
|
argv = args
|
54
54
|
end
|
55
55
|
raise ArgumentError, "Invalid argument #{prop.class}; expected Hash" unless prop.nil? || Hash === prop
|
56
|
-
|
57
|
-
|
56
|
+
|
57
|
+
unless prop.nil?
|
58
|
+
prop.inject(argv) { |a, (k, v)| a << k; a << v; a }
|
58
59
|
end
|
59
|
-
@@cached_orb = CORBA::Native::ORB.init(argv.collect {|a| a.to_s }.concat(@@_default_args), orb_id.nil?
|
60
|
+
@@cached_orb = CORBA::Native::ORB.init(argv.collect { |a| a.to_s }.concat(@@_default_args), orb_id.nil? ? nil : orb_id.to_s)
|
60
61
|
end
|
61
|
-
unless n_orb.nil?
|
62
|
+
unless n_orb.nil? || @@vf_queue.empty?
|
62
63
|
@@vf_queue.process_all { |vfklass| vfklass._check_factory }
|
63
64
|
end
|
64
65
|
@@wrapper_klass.new(n_orb)
|
@@ -98,6 +99,7 @@ module R2CORBA
|
|
98
99
|
else
|
99
100
|
@running ||= true
|
100
101
|
raise CORBA::BAD_INV_ORDER.new('ORB has been shutdown', 0, CORBA::COMPLETED_NO) if @shutdown
|
102
|
+
|
101
103
|
while (timeout.nil? or timeout > 0) and !@shutdown
|
102
104
|
to = timeout || 0.05
|
103
105
|
f, to = self.work_pending(to)
|
@@ -158,7 +160,7 @@ module R2CORBA
|
|
158
160
|
end
|
159
161
|
end
|
160
162
|
|
161
|
-
def empty?
|
163
|
+
def empty?
|
162
164
|
f = false
|
163
165
|
synchronize do
|
164
166
|
f = @q_.empty?
|
@@ -180,7 +182,6 @@ module R2CORBA
|
|
180
182
|
def ior_map
|
181
183
|
@iormap ||= R2CORBA::IORMap.new(self)
|
182
184
|
end
|
183
|
-
|
184
185
|
end # ORB
|
185
186
|
|
186
187
|
=begin
|
data/lib/corba/cbase/Request.rb
CHANGED
@@ -11,9 +11,7 @@
|
|
11
11
|
#--------------------------------------------------------------------
|
12
12
|
module R2CORBA
|
13
13
|
module CORBA
|
14
|
-
|
15
14
|
module Request
|
16
|
-
|
17
15
|
def add_in_arg(tc, val, nm = '')
|
18
16
|
self._arguments << [nm, CORBA::ARG_IN, tc, val]
|
19
17
|
self._arguments.size
|
@@ -35,10 +33,11 @@ module R2CORBA
|
|
35
33
|
|
36
34
|
def arguments=(*args)
|
37
35
|
if args.size == 1
|
38
|
-
raise ArgumentError, 'invalid argument list' unless ::Array === args.first && args.first.all? {|a| ::Array === a }
|
36
|
+
raise ArgumentError, 'invalid argument list' unless ::Array === args.first && args.first.all? { |a| ::Array === a }
|
37
|
+
|
39
38
|
args = args.first
|
40
39
|
else
|
41
|
-
raise ArgumentError, 'invalid argument list' unless args.all? {|a| ::Array === a }
|
40
|
+
raise ArgumentError, 'invalid argument list' unless args.all? { |a| ::Array === a }
|
42
41
|
end
|
43
42
|
# clear current arguments
|
44
43
|
self._arguments.clear
|
@@ -74,14 +73,15 @@ module R2CORBA
|
|
74
73
|
|
75
74
|
def return_value
|
76
75
|
return nil if @_rettc.nil? || @_rettc.kind == CORBA::TK_VOID || @_rettc.kind == CORBA::TK_NULL
|
76
|
+
|
77
77
|
self._return_value(@_rettc)
|
78
78
|
end
|
79
79
|
|
80
80
|
def invoke
|
81
81
|
self._invoke({
|
82
|
-
:
|
83
|
-
:
|
84
|
-
:
|
82
|
+
arg_list: self._arguments,
|
83
|
+
result_type: @_rettc,
|
84
|
+
exc_list: self._exceptions
|
85
85
|
})
|
86
86
|
end
|
87
87
|
|
@@ -91,9 +91,9 @@ module R2CORBA
|
|
91
91
|
|
92
92
|
def send_deferred
|
93
93
|
self._send_deferred({
|
94
|
-
:
|
95
|
-
:
|
96
|
-
:
|
94
|
+
arg_list: self._arguments,
|
95
|
+
result_type: @_rettc,
|
96
|
+
exc_list: self._exceptions
|
97
97
|
})
|
98
98
|
end
|
99
99
|
|
@@ -126,8 +126,6 @@ module R2CORBA
|
|
126
126
|
def _exceptions
|
127
127
|
@_excl ||= []
|
128
128
|
end
|
129
|
-
|
130
129
|
end
|
131
|
-
|
132
130
|
end # CORBA
|
133
131
|
end # R2CORBA
|
data/lib/corba/cbase/Streams.rb
CHANGED
@@ -18,51 +18,51 @@ module R2CORBA
|
|
18
18
|
tc = tc.resolved_tc # takes care of recursive typecodes
|
19
19
|
v = case tc.kind
|
20
20
|
when TK_ANY
|
21
|
-
read_any
|
21
|
+
read_any
|
22
22
|
when TK_BOOLEAN
|
23
|
-
read_boolean
|
23
|
+
read_boolean
|
24
24
|
when TK_SHORT
|
25
|
-
read_short
|
25
|
+
read_short
|
26
26
|
when TK_LONG
|
27
|
-
read_long
|
27
|
+
read_long
|
28
28
|
when TK_USHORT
|
29
|
-
read_ushort
|
29
|
+
read_ushort
|
30
30
|
when TK_WCHAR
|
31
|
-
read_wchar
|
31
|
+
read_wchar
|
32
32
|
when TK_ULONG
|
33
|
-
read_ulong
|
33
|
+
read_ulong
|
34
34
|
when TK_LONGLONG
|
35
|
-
read_longlong
|
35
|
+
read_longlong
|
36
36
|
when TK_ULONGLONG
|
37
|
-
read_ulonglong
|
37
|
+
read_ulonglong
|
38
38
|
when TK_OCTET
|
39
|
-
read_octet
|
39
|
+
read_octet
|
40
40
|
when TK_FLOAT
|
41
|
-
read_float
|
41
|
+
read_float
|
42
42
|
when TK_DOUBLE
|
43
|
-
read_double
|
43
|
+
read_double
|
44
44
|
when TK_LONGDOUBLE
|
45
45
|
raise CORBA::NO_IMPLEMENT.new('LongDouble not supported', 0, CORBA::COMPLETED_NO)
|
46
46
|
when TK_FIXED
|
47
|
-
read_fixed
|
47
|
+
read_fixed
|
48
48
|
when TK_CHAR
|
49
|
-
read_char
|
49
|
+
read_char
|
50
50
|
when TK_STRING
|
51
|
-
read_string
|
51
|
+
read_string
|
52
52
|
when TK_WSTRING
|
53
|
-
read_wstring
|
53
|
+
read_wstring
|
54
54
|
when TK_OBJREF
|
55
|
-
read_Object
|
55
|
+
read_Object
|
56
56
|
when TK_TYPECODE
|
57
|
-
read_TypeCode
|
57
|
+
read_TypeCode
|
58
58
|
when TK_ARRAY, TK_SEQUENCE,
|
59
59
|
TK_ENUM, TK_STRUCT, TK_EXCEPT, TK_UNION,
|
60
60
|
TK_PRINCIPAL
|
61
61
|
read_construct(tc)
|
62
62
|
when TK_ABSTRACT_INTERFACE
|
63
|
-
read_Abstract
|
63
|
+
read_Abstract
|
64
64
|
when TK_VALUE, TK_VALUE_BOX, TK_EVENT
|
65
|
-
read_Value
|
65
|
+
read_Value
|
66
66
|
## TODO: TK_NATIVE
|
67
67
|
end
|
68
68
|
v
|
data/lib/corba/cbase/Typecode.rb
CHANGED
@@ -13,7 +13,6 @@
|
|
13
13
|
module R2CORBA
|
14
14
|
module CORBA
|
15
15
|
class TypeCode
|
16
|
-
|
17
16
|
def kind
|
18
17
|
begin
|
19
18
|
self.tc_.kind
|
@@ -31,7 +30,6 @@ module R2CORBA
|
|
31
30
|
end
|
32
31
|
|
33
32
|
class Recursive < CORBA::TypeCode
|
34
|
-
|
35
33
|
def initialize(id)
|
36
34
|
begin
|
37
35
|
@tc_ = CORBA::Native::TypeCode.create_recursive_tc(id)
|
@@ -39,11 +37,9 @@ module R2CORBA
|
|
39
37
|
CORBA::Exception.native2r($!)
|
40
38
|
end
|
41
39
|
end
|
42
|
-
|
43
40
|
end # Recursive
|
44
41
|
|
45
42
|
class String < CORBA::TypeCode
|
46
|
-
|
47
43
|
def initialize(*args)
|
48
44
|
if CORBA::Native::TypeCode === args.first
|
49
45
|
@tc_ = args.first
|
@@ -55,11 +51,9 @@ module R2CORBA
|
|
55
51
|
end
|
56
52
|
end
|
57
53
|
end
|
58
|
-
|
59
54
|
end # String
|
60
55
|
|
61
56
|
class WString < CORBA::TypeCode
|
62
|
-
|
63
57
|
def initialize(*args)
|
64
58
|
if CORBA::Native::TypeCode === args.first
|
65
59
|
@tc_ = args.first
|
@@ -71,11 +65,9 @@ module R2CORBA
|
|
71
65
|
end
|
72
66
|
end
|
73
67
|
end
|
74
|
-
|
75
68
|
end # WString
|
76
69
|
|
77
70
|
class Fixed < CORBA::TypeCode
|
78
|
-
|
79
71
|
def initialize(*args)
|
80
72
|
if CORBA::Native::TypeCode === args.first
|
81
73
|
@tc_ = args.first
|
@@ -88,17 +80,16 @@ module R2CORBA
|
|
88
80
|
end
|
89
81
|
end
|
90
82
|
end
|
91
|
-
|
92
83
|
end # Fixed
|
93
84
|
|
94
85
|
class Sequence < CORBA::TypeCode
|
95
|
-
|
96
86
|
def initialize(*args)
|
97
87
|
if CORBA::Native::TypeCode === args.first
|
98
88
|
@tc_ = args.first
|
99
89
|
else
|
100
90
|
element_tc, bound = args
|
101
91
|
raise ArgumentError, 'expected CORBA::TypeCode' unless element_tc.is_a?(CORBA::TypeCode)
|
92
|
+
|
102
93
|
begin
|
103
94
|
@tc_ = CORBA::Native::TypeCode.create_tc(TK_SEQUENCE, bound.to_i, element_tc.tc_)
|
104
95
|
rescue ::NativeException
|
@@ -106,11 +97,9 @@ module R2CORBA
|
|
106
97
|
end
|
107
98
|
end
|
108
99
|
end
|
109
|
-
|
110
100
|
end
|
111
101
|
|
112
102
|
class Array < CORBA::TypeCode
|
113
|
-
|
114
103
|
def initialize(*args)
|
115
104
|
if CORBA::Native::TypeCode === args.first
|
116
105
|
@tc_ = args.first
|
@@ -118,6 +107,7 @@ module R2CORBA
|
|
118
107
|
content_tc = args.shift
|
119
108
|
length = args
|
120
109
|
raise ArgumentError, 'expected CORBA::TypeCode' unless content_tc.is_a?(CORBA::TypeCode)
|
110
|
+
|
121
111
|
if length.size > 1
|
122
112
|
this_len = length.shift
|
123
113
|
content_tc = self.class.new(content_tc, *length)
|
@@ -131,19 +121,15 @@ module R2CORBA
|
|
131
121
|
end
|
132
122
|
end
|
133
123
|
end
|
134
|
-
|
135
124
|
end # Array
|
136
125
|
|
137
126
|
class IdentifiedTypeCode < CORBA::TypeCode
|
138
|
-
|
139
127
|
def initialize(id)
|
140
128
|
CORBA::TypeCode.register_id_type(id.to_s, self)
|
141
129
|
end
|
142
|
-
|
143
130
|
end # IdentifiedTypeCode
|
144
131
|
|
145
132
|
class Alias < IdentifiedTypeCode
|
146
|
-
|
147
133
|
def initialize(*args)
|
148
134
|
if CORBA::Native::TypeCode === args.first
|
149
135
|
@tc_ = args.first
|
@@ -152,6 +138,7 @@ module R2CORBA
|
|
152
138
|
else
|
153
139
|
id, name, orig_tc, type = args
|
154
140
|
raise ArgumentError, 'expected CORBA::TypeCode' unless orig_tc.is_a?(CORBA::TypeCode)
|
141
|
+
|
155
142
|
begin
|
156
143
|
@tc_ = CORBA::Native::TypeCode.create_tc(TK_ALIAS, id.to_s, name.to_s, orig_tc.tc_)
|
157
144
|
rescue ::NativeException
|
@@ -161,11 +148,9 @@ module R2CORBA
|
|
161
148
|
super(id)
|
162
149
|
end
|
163
150
|
end
|
164
|
-
|
165
151
|
end # Alias
|
166
152
|
|
167
153
|
class Valuetype < IdentifiedTypeCode
|
168
|
-
|
169
154
|
def initialize(*args)
|
170
155
|
if CORBA::Native::TypeCode === args.first
|
171
156
|
@tc_ = args.first
|
@@ -179,6 +164,7 @@ module R2CORBA
|
|
179
164
|
id, name, modifier, base, members_, type_ = args
|
180
165
|
raise ArgumentError, 'expected CORBA::Typecode' unless base.nil? || base.is_a?(CORBA::TypeCode)
|
181
166
|
raise ArgumentError, 'expected members Array' unless members_.is_a?(::Array) || type_.nil?
|
167
|
+
|
182
168
|
if type_.nil? && !members_.is_a?(::Array)
|
183
169
|
type_ = members_
|
184
170
|
members_ = []
|
@@ -206,11 +192,9 @@ module R2CORBA
|
|
206
192
|
CORBA::Exception.native2r($!)
|
207
193
|
end
|
208
194
|
end
|
209
|
-
|
210
195
|
end # Valuetype
|
211
196
|
|
212
197
|
class Eventtype < Valuetype
|
213
|
-
|
214
198
|
protected
|
215
199
|
|
216
200
|
def _create_tc(id, name, modifier, base, members)
|
@@ -223,11 +207,9 @@ module R2CORBA
|
|
223
207
|
CORBA::Exception.native2r($!)
|
224
208
|
end
|
225
209
|
end
|
226
|
-
|
227
210
|
end # Eventtype
|
228
211
|
|
229
212
|
class Valuebox < IdentifiedTypeCode
|
230
|
-
|
231
213
|
def initialize(*args)
|
232
214
|
if CORBA::Native::TypeCode === args.first
|
233
215
|
@tc_ = args.first
|
@@ -236,6 +218,7 @@ module R2CORBA
|
|
236
218
|
else
|
237
219
|
id, name, boxed_tc, type = args
|
238
220
|
raise ArgumentError, 'expected CORBA::TypeCode' unless boxed_tc.is_a?(CORBA::TypeCode)
|
221
|
+
|
239
222
|
begin
|
240
223
|
@tc_ = CORBA::Native::TypeCode.create_tc(TK_VALUE_BOX, id.to_s, name.to_s, boxed_tc.tc_)
|
241
224
|
rescue ::NativeException
|
@@ -247,11 +230,9 @@ module R2CORBA
|
|
247
230
|
CORBA::ORB._check_value_factory(@type::Factory) if @type < CORBA::Portable::BoxedValueBase
|
248
231
|
end
|
249
232
|
end
|
250
|
-
|
251
233
|
end # Valuebox
|
252
234
|
|
253
235
|
class ObjectRef < IdentifiedTypeCode
|
254
|
-
|
255
236
|
def initialize(*args)
|
256
237
|
if CORBA::Native::TypeCode === args.first
|
257
238
|
@tc_ = args.first
|
@@ -268,11 +249,9 @@ module R2CORBA
|
|
268
249
|
super(id)
|
269
250
|
end
|
270
251
|
end
|
271
|
-
|
272
252
|
end # ObjectRef
|
273
253
|
|
274
254
|
class AbstractInterface < IdentifiedTypeCode
|
275
|
-
|
276
255
|
def initialize(*args)
|
277
256
|
if CORBA::Native::TypeCode === args.first
|
278
257
|
@tc_ = args.first
|
@@ -289,11 +268,9 @@ module R2CORBA
|
|
289
268
|
super(id)
|
290
269
|
end
|
291
270
|
end
|
292
|
-
|
293
271
|
end # AbstractInterface
|
294
272
|
|
295
273
|
class Struct < IdentifiedTypeCode
|
296
|
-
|
297
274
|
def initialize(*args)
|
298
275
|
if CORBA::Native::TypeCode === args.first
|
299
276
|
@tc_ = args.first
|
@@ -306,6 +283,7 @@ module R2CORBA
|
|
306
283
|
else
|
307
284
|
id, name, members_, type_ = args
|
308
285
|
raise ArgumentError, 'expected members Array' unless members_.is_a?(::Array) || type_.nil?
|
286
|
+
|
309
287
|
if type_.nil? && !members_.is_a?(::Array)
|
310
288
|
type_ = members_
|
311
289
|
members_ = []
|
@@ -313,7 +291,7 @@ module R2CORBA
|
|
313
291
|
@type = type_
|
314
292
|
@members = []
|
315
293
|
members_.each { |n, tc| add_member(n, tc) }
|
316
|
-
n_members = @members.collect {|n, tc| [n.to_s
|
294
|
+
n_members = @members.collect { |n, tc| [n.to_s, tc.tc_] }
|
317
295
|
@tc_ = _create_tc(id, name, n_members)
|
318
296
|
super(id)
|
319
297
|
end
|
@@ -328,11 +306,9 @@ module R2CORBA
|
|
328
306
|
CORBA::Exception.native2r($!)
|
329
307
|
end
|
330
308
|
end
|
331
|
-
|
332
309
|
end # Struct
|
333
310
|
|
334
311
|
class Except < Struct
|
335
|
-
|
336
312
|
protected
|
337
313
|
|
338
314
|
def _create_tc(id, name, members)
|
@@ -342,11 +318,9 @@ module R2CORBA
|
|
342
318
|
CORBA::Exception.native2r($!)
|
343
319
|
end
|
344
320
|
end
|
345
|
-
|
346
321
|
end # Except
|
347
322
|
|
348
323
|
class Union < IdentifiedTypeCode
|
349
|
-
|
350
324
|
def initialize(*args)
|
351
325
|
if CORBA::Native::TypeCode === args.first
|
352
326
|
@tc_ = args.first
|
@@ -369,6 +343,7 @@ module R2CORBA
|
|
369
343
|
id, name, switchtype_, members_, type_, implicit_default_ = args
|
370
344
|
raise ::CORBA::BAD_PARAM unless members_.is_a? ::Array
|
371
345
|
raise ::CORBA::BAD_PARAM unless switchtype_.is_a?(CORBA::TypeCode)
|
346
|
+
|
372
347
|
@type = type_
|
373
348
|
@implicit_default = implicit_default_
|
374
349
|
@switchtype = switchtype_.resolved_tc
|
@@ -400,21 +375,20 @@ module R2CORBA
|
|
400
375
|
CORBA::Exception.native2r($!)
|
401
376
|
end
|
402
377
|
end
|
403
|
-
|
404
378
|
end # Union
|
405
379
|
|
406
380
|
class Enum < IdentifiedTypeCode
|
407
|
-
|
408
381
|
def initialize(*args)
|
409
382
|
if CORBA::Native::TypeCode === args.first
|
410
383
|
@tc_ = args.first
|
411
384
|
@range = (0..@tc_.member_count).freeze
|
412
|
-
@members = @range.to_a.collect {|i| @tc_.member_name(i) }
|
385
|
+
@members = @range.to_a.collect { |i| @tc_.member_name(i) }
|
413
386
|
super(@tc_.id)
|
414
387
|
else
|
415
388
|
id, name, members_ = args
|
416
389
|
raise CORBA::BAD_PARAM unless members_.is_a? ::Array
|
417
|
-
|
390
|
+
|
391
|
+
@members = members_.collect { |m| m.to_s }
|
418
392
|
@range = (0...@members.size).freeze
|
419
393
|
begin
|
420
394
|
@tc_ = CORBA::Native::TypeCode.create_tc(TK_ENUM, id.to_s, name.to_s, @members)
|
@@ -424,7 +398,6 @@ module R2CORBA
|
|
424
398
|
super(id)
|
425
399
|
end
|
426
400
|
end
|
427
|
-
|
428
401
|
end # Enum
|
429
402
|
|
430
403
|
def TypeCode.get_primitive_tc(kind)
|
@@ -432,9 +405,7 @@ module R2CORBA
|
|
432
405
|
end
|
433
406
|
|
434
407
|
# final initialization
|
435
|
-
self._init
|
436
|
-
|
408
|
+
self._init
|
437
409
|
end # TypeCode
|
438
|
-
|
439
410
|
end ## module CORBA
|
440
411
|
end ## module R2CORBA
|
data/lib/corba/cbase/Values.rb
CHANGED
@@ -56,7 +56,6 @@ module R2CORBA
|
|
56
56
|
|
57
57
|
module Portable
|
58
58
|
class ValueFactoryBase
|
59
|
-
|
60
59
|
def self.inherited(value_factory_base)
|
61
60
|
# value_factory_base is the <valuetype>Factory base class
|
62
61
|
# generated from IDL
|
@@ -69,9 +68,8 @@ module R2CORBA
|
|
69
68
|
|
70
69
|
def self._check_factory
|
71
70
|
f = self._lookup_value_factory(self.value_id)
|
72
|
-
self._register_value_factory(self.value_id
|
71
|
+
self._register_value_factory(self.value_id, self.new) if f.nil?
|
73
72
|
end
|
74
|
-
|
75
73
|
end # ValueFactoryBase
|
76
74
|
|
77
75
|
module CustomValueBase
|
@@ -124,7 +122,6 @@ module R2CORBA
|
|
124
122
|
end
|
125
123
|
end
|
126
124
|
end
|
127
|
-
|
128
125
|
end # Portable
|
129
126
|
end # CORBA
|
130
127
|
end # R2CORBA
|
@@ -13,7 +13,6 @@
|
|
13
13
|
# import all java CORBA exceptions into the R2CORBA::CORBA namespace
|
14
14
|
module R2CORBA
|
15
15
|
module CORBA
|
16
|
-
|
17
16
|
class Exception
|
18
17
|
def self.native2r(nex)
|
19
18
|
raise nex
|
@@ -59,7 +58,6 @@ module R2CORBA
|
|
59
58
|
self.class::Id
|
60
59
|
end
|
61
60
|
end
|
62
|
-
|
63
61
|
end # CORBA
|
64
62
|
end # R2CORBA
|
65
63
|
|
data/lib/corba/cbase/poa.rb
CHANGED
@@ -10,8 +10,8 @@
|
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
11
|
#--------------------------------------------------------------------
|
12
12
|
|
13
|
-
require 'corba/common/Servant
|
14
|
-
require 'corba/idl/POAC
|
13
|
+
require 'corba/common/Servant'
|
14
|
+
require 'corba/idl/POAC'
|
15
15
|
require 'corba/idl/IORTableC'
|
16
16
|
|
17
17
|
begin
|
data/lib/corba/cbase/policies.rb
CHANGED
@@ -19,12 +19,11 @@ rescue LoadError
|
|
19
19
|
end
|
20
20
|
|
21
21
|
module R2CORBA
|
22
|
-
|
23
22
|
module CORBA
|
24
|
-
|
25
23
|
module ORB
|
26
24
|
def create_policy(type, val)
|
27
25
|
raise CORBA::BAD_PARAM.new('Any expected', 0, CORBA::COMPLETED_NO) unless CORBA::Any === val
|
26
|
+
|
28
27
|
begin
|
29
28
|
self.orb_.create_policy(type.to_i, val)
|
30
29
|
rescue ::NativeException
|
@@ -35,7 +34,8 @@ module R2CORBA
|
|
35
34
|
|
36
35
|
module Object
|
37
36
|
def _get_policy(policy_type)
|
38
|
-
raise CORBA::INV_OBJREF.new if self._is_nil?
|
37
|
+
raise CORBA::INV_OBJREF.new if self._is_nil?
|
38
|
+
|
39
39
|
begin
|
40
40
|
pol = self.objref_._get_policy(policy_type)
|
41
41
|
rescue ::NativeException
|
@@ -45,7 +45,8 @@ module R2CORBA
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def _set_policy_overrides(policies, set_add)
|
48
|
-
raise CORBA::INV_OBJREF.new if self._is_nil?
|
48
|
+
raise CORBA::INV_OBJREF.new if self._is_nil?
|
49
|
+
|
49
50
|
begin
|
50
51
|
CORBA::Object._wrap_native(self.objref_._set_policy_overrides(policies, set_add))
|
51
52
|
rescue ::NativeException
|
@@ -54,7 +55,8 @@ module R2CORBA
|
|
54
55
|
end
|
55
56
|
|
56
57
|
def _get_policy_overrides(types)
|
57
|
-
raise CORBA::INV_OBJREF.new if self._is_nil?
|
58
|
+
raise CORBA::INV_OBJREF.new if self._is_nil?
|
59
|
+
|
58
60
|
begin
|
59
61
|
self.objref_._get_policy_overrides(types)
|
60
62
|
rescue ::NativeException
|
@@ -63,7 +65,8 @@ module R2CORBA
|
|
63
65
|
end
|
64
66
|
|
65
67
|
def _validate_connection(inconsistent_policies)
|
66
|
-
raise CORBA::INV_OBJREF.new if self._is_nil?
|
68
|
+
raise CORBA::INV_OBJREF.new if self._is_nil?
|
69
|
+
|
67
70
|
begin
|
68
71
|
self.objref_._validate_connection(inconsistent_policies)
|
69
72
|
rescue ::NativeException
|
@@ -71,7 +74,5 @@ module R2CORBA
|
|
71
74
|
end
|
72
75
|
end
|
73
76
|
end # Object
|
74
|
-
|
75
77
|
end # CORBA
|
76
|
-
|
77
78
|
end # R2CORBA
|
data/lib/corba/cbase/require.rb
CHANGED
data/lib/corba/cmds/base.rb
CHANGED
@@ -14,14 +14,13 @@ require 'optparse'
|
|
14
14
|
|
15
15
|
module R2CORBA
|
16
16
|
module Commands
|
17
|
-
|
18
17
|
@@commands = Hash.new do |hash, key|
|
19
18
|
$stderr.puts "Unknown command #{key} specified."
|
20
19
|
exit(1)
|
21
20
|
end
|
22
21
|
|
23
22
|
@@options = {
|
24
|
-
:
|
23
|
+
verbose: false
|
25
24
|
}
|
26
25
|
|
27
26
|
def self.register(cmdid, cmdhandler)
|