r2corba 1.5.1-universal-java → 1.6.1-universal-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +5 -5
- data/README.rdoc +62 -0
- data/THANKS +4 -4
- data/lib/corba/cbase/IORMap.rb +0 -1
- data/lib/corba/cbase/ORB.rb +26 -24
- data/lib/corba/cbase/Request.rb +4 -5
- data/lib/corba/cbase/Streams.rb +2 -3
- data/lib/corba/cbase/Stub.rb +0 -1
- data/lib/corba/cbase/Typecode.rb +6 -7
- data/lib/corba/cbase/Values.rb +4 -3
- data/lib/corba/cbase/exception.rb +6 -5
- data/lib/corba/cbase/poa.rb +1 -2
- data/lib/corba/cbase/policies.rb +3 -4
- data/lib/corba/cbase/post_require.rb +1 -2
- data/lib/corba/cbase/require.rb +10 -2
- data/lib/corba/cmds/base.rb +1 -2
- data/lib/corba/cmds/test.rb +0 -1
- data/lib/corba/common/Any.rb +3 -3
- data/lib/corba/common/IDL.rb +6 -10
- data/lib/corba/common/ORB.rb +22 -23
- data/lib/corba/common/Object.rb +18 -15
- data/lib/corba/common/Request.rb +1 -2
- data/lib/corba/common/Servant.rb +4 -5
- data/lib/corba/common/Struct.rb +1 -2
- data/lib/corba/common/Stub.rb +6 -7
- data/lib/corba/common/Typecode.rb +91 -65
- data/lib/corba/common/Union.rb +6 -2
- data/lib/corba/common/Values.rb +2 -2
- data/lib/corba/common/const.rb +2 -3
- data/lib/corba/common/exception.rb +2 -2
- data/lib/corba/common/require.rb +8 -1
- data/lib/corba/common/version.rb +3 -4
- data/lib/corba/idl/BiDirPolicyC.rb +2 -3
- data/lib/corba/idl/CosNamingC.rb +4 -5
- data/lib/corba/idl/CosNamingS.rb +2 -3
- data/lib/corba/idl/IDL.rb +1 -2
- data/lib/corba/idl/IORTable.pidl +0 -1
- data/lib/corba/idl/MessagingC.rb +2 -3
- data/lib/corba/idl/POAC.rb +10 -11
- data/lib/corba/idl/TAO_Ext.pidl +0 -1
- data/lib/corba/idl/r2c_orb.rb +5 -6
- data/lib/corba/idl/require.rb +0 -1
- data/lib/corba/jbase/Any.rb +29 -28
- data/lib/corba/jbase/IORMap.rb +1 -2
- data/lib/corba/jbase/ORB.rb +5 -6
- data/lib/corba/jbase/Object.rb +13 -14
- data/lib/corba/jbase/Request.rb +9 -10
- data/lib/corba/jbase/Servant.rb +11 -12
- data/lib/corba/jbase/ServerRequest.rb +8 -9
- data/lib/corba/jbase/Streams.rb +68 -5
- data/lib/corba/jbase/Stub.rb +0 -1
- data/lib/corba/jbase/Typecode.rb +17 -17
- data/lib/corba/jbase/Values.rb +2 -1
- data/lib/corba/jbase/exception.rb +2 -2
- data/lib/corba/jbase/poa.rb +21 -22
- data/lib/corba/jbase/policies.rb +33 -34
- data/lib/corba/jbase/post_require.rb +0 -1
- data/lib/corba/jbase/require.rb +5 -2
- data/lib/corba/naming.rb +0 -1
- data/lib/corba/naming_service.rb +0 -1
- data/lib/corba/poa.rb +1 -2
- data/lib/corba/policies.rb +1 -2
- data/lib/corba/require.rb +2 -3
- data/lib/corba/svcs/ins/cos_naming.rb +74 -68
- data/lib/corba/svcs/ins/ins.rb +58 -59
- data/lib/corba/svcs/ins/naming_service.rb +9 -10
- data/lib/corba.rb +1 -2
- data/lib/ridlbe/ruby/config.rb +78 -74
- data/lib/ridlbe/ruby/orb.pidlc +0 -0
- data/lib/ridlbe/ruby/require.rb +0 -1
- data/lib/ridlbe/ruby/walker.rb +311 -288
- data/mkrf_conf_bingem.rb +4 -6
- data/rakelib/bin.rake +2 -3
- data/rakelib/bin.rb +4 -5
- data/rakelib/build.rake +22 -22
- data/rakelib/config.rake +2 -3
- data/rakelib/config.rb +32 -34
- data/rakelib/gem.rake +53 -38
- data/rakelib/gem.rb +9 -10
- data/rakelib/package.rake +2 -3
- data/rakelib/test.rake +0 -1
- data/test/BiDirectional/Test.idl +0 -1
- data/test/BiDirectional/client.rb +18 -19
- data/test/BiDirectional/run_test.rb +11 -12
- data/test/BiDirectional/server.rb +21 -23
- data/test/CORBA_Services/Naming/BindingIterator/Test.idl +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -18
- data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -20
- data/test/CORBA_Services/Naming/Corbaname/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -16
- data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Corbaname/server.rb +27 -28
- data/test/CORBA_Services/Naming/Simple/Test.idl +0 -1
- data/test/CORBA_Services/Naming/Simple/client.rb +16 -17
- data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -14
- data/test/CORBA_Services/Naming/Simple/server.rb +19 -20
- data/test/Collocation/Diamond.idl +0 -1
- data/test/Collocation/run_test.rb +10 -11
- data/test/Collocation/test.rb +27 -21
- data/test/Connect_Timeout/Test.idl +0 -1
- data/test/Connect_Timeout/client.rb +16 -18
- data/test/Connect_Timeout/run_test.rb +10 -11
- data/test/DII/Test.idl +0 -1
- data/test/DII/client.rb +30 -31
- data/test/DII/run_test.rb +11 -12
- data/test/DII/server.rb +16 -17
- data/test/DSI/Test.idl +0 -1
- data/test/DSI/client.rb +16 -17
- data/test/DSI/run_test.rb +11 -12
- data/test/DSI/server.rb +17 -18
- data/test/Exceptions/Test.idl +0 -1
- data/test/Exceptions/client.rb +22 -23
- data/test/Exceptions/run_test.rb +11 -12
- data/test/Exceptions/server.rb +16 -17
- data/test/Hello/Test.idl +0 -1
- data/test/Hello/client.rb +16 -17
- data/test/Hello/run_test.rb +11 -12
- data/test/Hello/server.rb +17 -18
- data/test/IDL_Test/Test.idl +4 -1
- data/test/IDL_Test/client.rb +24 -23
- data/test/IDL_Test/run_test.rb +11 -12
- data/test/IDL_Test/server.rb +23 -19
- data/test/IORMap/Test.idl +0 -1
- data/test/IORMap/client.rb +14 -15
- data/test/IORMap/run_test.rb +11 -12
- data/test/IORMap/server.rb +23 -24
- data/test/IORTable/Test.idl +0 -1
- data/test/IORTable/client.rb +14 -15
- data/test/IORTable/run_test.rb +11 -12
- data/test/IORTable/server.rb +23 -24
- data/test/Implicit_Conversion/Test.idl +0 -1
- data/test/Implicit_Conversion/client.rb +20 -18
- data/test/Implicit_Conversion/run_test.rb +11 -12
- data/test/Implicit_Conversion/server.rb +16 -17
- data/test/Multi_Threading/Multiple_ORB/Test.idl +0 -1
- data/test/Multi_Threading/Multiple_ORB/client.rb +14 -15
- data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -13
- data/test/Multi_Threading/Multiple_ORB/server.rb +17 -18
- data/test/Multi_Threading/Simple/Test.idl +0 -1
- data/test/Multi_Threading/Simple/client.rb +17 -18
- data/test/Multi_Threading/Simple/run_test.rb +11 -12
- data/test/Multi_Threading/Simple/server.rb +17 -18
- data/test/Multi_Threading/Threads/Test.idl +0 -4
- data/test/Multi_Threading/Threads/client.rb +23 -26
- data/test/Multi_Threading/Threads/run_test.rb +11 -12
- data/test/Multi_Threading/Threads/server.rb +19 -22
- data/test/Multi_Threading/Threads/watchdog.rb +16 -16
- data/test/Multiple_Servant_Interfaces/Test.idl +0 -1
- data/test/Multiple_Servant_Interfaces/client.rb +14 -15
- data/test/Multiple_Servant_Interfaces/run_test.rb +11 -12
- data/test/Multiple_Servant_Interfaces/server.rb +18 -19
- data/test/Nil/Test.idl +0 -1
- data/test/Nil/run_test.rb +10 -11
- data/test/Nil/test.rb +22 -20
- data/test/OBV/AbstractInterface/client.rb +14 -15
- data/test/OBV/AbstractInterface/run_test.rb +11 -12
- data/test/OBV/AbstractInterface/server.rb +20 -20
- data/test/OBV/AbstractInterface/test.idl +0 -1
- data/test/OBV/Custom/OBV_impl.rb +2 -1
- data/test/OBV/Custom/client.rb +14 -15
- data/test/OBV/Custom/run_test.rb +11 -12
- data/test/OBV/Custom/server.rb +16 -17
- data/test/OBV/Simple/OBV_impl.rb +1 -1
- data/test/OBV/Simple/client.rb +14 -15
- data/test/OBV/Simple/run_test.rb +11 -12
- data/test/OBV/Simple/server.rb +16 -17
- data/test/OBV/Simple_Event/Event_impl.rb +1 -1
- data/test/OBV/Simple_Event/client.rb +14 -15
- data/test/OBV/Simple_Event/run_test.rb +11 -12
- data/test/OBV/Simple_Event/server.rb +16 -17
- data/test/OBV/Supports/client.rb +19 -20
- data/test/OBV/Supports/run_test.rb +11 -12
- data/test/OBV/Supports/server.rb +15 -16
- data/test/OBV/Supports/supports.idl +0 -1
- data/test/OBV/Supports/supports_impl.rb +3 -1
- data/test/OBV/Tree/client.rb +14 -15
- data/test/OBV/Tree/run_test.rb +11 -12
- data/test/OBV/Tree/server.rb +19 -20
- data/test/OBV/Tree/test.idl +0 -1
- data/test/OBV/Truncatable/Extra.idl +0 -1
- data/test/OBV/Truncatable/Truncatable_impl.rb +1 -2
- data/test/OBV/Truncatable/client.rb +57 -58
- data/test/OBV/Truncatable/run_test.rb +11 -12
- data/test/OBV/Truncatable/server.rb +15 -16
- data/test/OBV/ValueBox/client.rb +154 -154
- data/test/OBV/ValueBox/run_test.rb +11 -12
- data/test/OBV/ValueBox/server.rb +42 -42
- data/test/Object/Test.idl +0 -1
- data/test/Object/client.rb +15 -16
- data/test/Object/run_test.rb +11 -12
- data/test/Object/server.rb +19 -20
- data/test/POA/run_test.rb +10 -11
- data/test/POA/test.rb +17 -18
- data/test/Param_Test/client.rb +53 -54
- data/test/Param_Test/run_test.rb +11 -12
- data/test/Param_Test/server.rb +60 -61
- data/test/Performance/Simple/Test.idl +0 -1
- data/test/Performance/Simple/client.rb +16 -17
- data/test/Performance/Simple/run_test.rb +11 -12
- data/test/Performance/Simple/server.rb +16 -17
- data/test/Policies/Test.idl +0 -1
- data/test/Policies/run_test.rb +10 -11
- data/test/Policies/test.rb +23 -25
- data/test/Timeout/client.rb +21 -22
- data/test/Timeout/run_test.rb +11 -12
- data/test/Timeout/server.rb +19 -20
- data/test/Timeout/test.idl +0 -1
- data/test/lib/assert.rb +0 -2
- data/test/lib/test.rb +29 -25
- data/test/test_runner.rb +22 -24
- metadata +27 -64
- data/README +0 -62
- data/jacorb/lib/antlr-2.7.2.jar +0 -0
- data/jacorb/lib/jacorb-3.5.jar +0 -0
- data/jacorb/lib/jacorb-omgapi-3.5.jar +0 -0
- data/jacorb/lib/jacorb-services-3.5.jar +0 -0
- data/jacorb/lib/slf4j-api-1.7.6.jar +0 -0
- data/jacorb/lib/slf4j-jdk14-1.7.6.jar +0 -0
- data/test/BiDirectional/server.ior +0 -1
- data/test/CORBA_Services/Naming/BindingIterator/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/corbaname.ior +0 -1
- data/test/CORBA_Services/Naming/Corbaname/ins.ior +0 -1
- data/test/CORBA_Services/Naming/Simple/ins.ior +0 -1
- data/test/DII/server.ior +0 -1
- data/test/DSI/server.ior +0 -1
- data/test/Exceptions/server.ior +0 -1
- data/test/Hello/gateway.ior +0 -1
- data/test/IDL_Test/server.ior +0 -1
- data/test/IORMap/server.ior +0 -1
- data/test/IORTable/server.ior +0 -0
- data/test/Implicit_Conversion/server.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server0.ior +0 -1
- data/test/Multi_Threading/Multiple_ORB/server1.ior +0 -1
- data/test/Multi_Threading/Simple/server.ior +0 -1
- data/test/Multi_Threading/Threads/server.ior +0 -1
- data/test/Multi_Threading/Threads/watchdog.ior +0 -1
- data/test/Multiple_Servant_Interfaces/server.ior +0 -1
- data/test/OBV/AbstractInterface/server.ior +0 -1
- data/test/OBV/Custom/server.ior +0 -1
- data/test/OBV/Simple/server.ior +0 -1
- data/test/OBV/Simple_Event/server.ior +0 -1
- data/test/OBV/Supports/server.ior +0 -1
- data/test/OBV/Tree/server.ior +0 -1
- data/test/OBV/Truncatable/server.ior +0 -1
- data/test/OBV/ValueBox/server.ior +0 -1
- data/test/Object/server.ior +0 -1
- data/test/Param_Test/server.ior +0 -1
- data/test/Performance/Simple/server.ior +0 -1
- data/test/Timeout/server.ior +0 -1
- data/test/test.log +0 -20
- data/test/test2.log +0 -5000
@@ -8,7 +8,6 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
13
|
require 'corba'
|
@@ -28,7 +27,7 @@ module R2CORBA
|
|
28
27
|
|
29
28
|
def initialize(options = {})
|
30
29
|
@options = OPTIONS.merge(options)
|
31
|
-
raise
|
30
|
+
raise 'nr. of threads must >= 1' if @options[:threads] < 1
|
32
31
|
end
|
33
32
|
|
34
33
|
def setup
|
@@ -36,7 +35,7 @@ module R2CORBA
|
|
36
35
|
#
|
37
36
|
if defined?(JRUBY_VERSION)
|
38
37
|
@options[:orbprop]['jacorb.poa.thread_pool_min'] = @options[:threads]
|
39
|
-
@options[:orbprop]['jacorb.poa.thread_pool_max'] = @options[:threads]*4
|
38
|
+
@options[:orbprop]['jacorb.poa.thread_pool_max'] = @options[:threads] * 4
|
40
39
|
if @options[:debug] > 0
|
41
40
|
@options[:orbprop]['jacorb.log.default.verbosity'] = case
|
42
41
|
when @options[:debug] < 2
|
@@ -93,9 +92,9 @@ module R2CORBA
|
|
93
92
|
end
|
94
93
|
|
95
94
|
def run
|
96
|
-
STDERR.puts
|
97
|
-
if
|
98
|
-
STDERR.puts
|
95
|
+
STDERR.puts 'INS - starting service run' if @options[:verbose]
|
96
|
+
if defined?(JRUBY_VERSION) or !R2CORBA::TAO::RUBY_THREAD_SUPPORT
|
97
|
+
STDERR.puts 'INS - running ORB' if @options[:verbose]
|
99
98
|
@orb.run
|
100
99
|
else
|
101
100
|
STDERR.puts "INS - starting #{@options[:threads]} ORB threads" if @options[:verbose]
|
@@ -103,16 +102,16 @@ module R2CORBA
|
|
103
102
|
@options[:threads].times do
|
104
103
|
@threads << Thread.new(@orb) { |orb| orb.run }
|
105
104
|
end
|
106
|
-
STDERR.puts
|
105
|
+
STDERR.puts 'INS - joining ORB threads' if @options[:verbose]
|
107
106
|
@threads.each { |t| t.join }
|
108
107
|
end
|
109
|
-
STDERR.puts
|
108
|
+
STDERR.puts 'INS - service run ended' if @options[:verbose]
|
110
109
|
end
|
111
110
|
|
112
111
|
def shutdown
|
113
|
-
STDERR.puts
|
112
|
+
STDERR.puts 'INS - shutting down ORB' if @options[:verbose]
|
114
113
|
@orb.shutdown if @orb
|
115
|
-
STDERR.puts
|
114
|
+
STDERR.puts 'INS - shutdown finished' if @options[:verbose]
|
116
115
|
end
|
117
116
|
end
|
118
117
|
end
|
data/lib/corba.rb
CHANGED
@@ -8,9 +8,8 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
|
-
require
|
13
|
+
require 'corba/require.rb'
|
15
14
|
|
16
15
|
include R2CORBA
|
data/lib/ridlbe/ruby/config.rb
CHANGED
@@ -8,21 +8,23 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
13
|
module IDL
|
15
14
|
|
16
15
|
class StrOStream
|
17
16
|
def initialize()
|
18
|
-
@str =
|
17
|
+
@str = ''
|
19
18
|
end
|
19
|
+
|
20
20
|
def clear
|
21
|
-
@str =
|
21
|
+
@str = ''
|
22
22
|
end
|
23
|
+
|
23
24
|
def to_s
|
24
25
|
@str
|
25
26
|
end
|
27
|
+
|
26
28
|
def <<(s)
|
27
29
|
@str << s
|
28
30
|
end
|
@@ -32,7 +34,7 @@ module IDL
|
|
32
34
|
private
|
33
35
|
def RIDL.merge_params(params)
|
34
36
|
opts = IDL::OPTIONS.dup
|
35
|
-
params.each do |k,v|
|
37
|
+
params.each do |k, v|
|
36
38
|
case opts[k]
|
37
39
|
when Array
|
38
40
|
opts[k] = opts[k] + (Array === v ? v : [v])
|
@@ -44,6 +46,7 @@ module IDL
|
|
44
46
|
end
|
45
47
|
opts
|
46
48
|
end
|
49
|
+
|
47
50
|
def RIDL.parse0(src, params)
|
48
51
|
params = merge_params(params)
|
49
52
|
IDL.verbose_level = params[:verbose]
|
@@ -51,15 +54,16 @@ module IDL
|
|
51
54
|
parser.parse(src)
|
52
55
|
s = ::IDL::StrOStream.new
|
53
56
|
s.clear
|
54
|
-
IDL::Ruby.process_input(parser,params,s)
|
57
|
+
IDL::Ruby.process_input(parser, params, s)
|
55
58
|
s
|
56
59
|
end
|
60
|
+
|
57
61
|
def RIDL.parse(src, params)
|
58
62
|
s = parse0(src, params)
|
59
63
|
s.to_s
|
60
64
|
end
|
61
65
|
public
|
62
|
-
def RIDL.eval(src, params={})
|
66
|
+
def RIDL.eval(src, params = {})
|
63
67
|
params[:idl_eval] = true
|
64
68
|
params[:expand_includes] = true
|
65
69
|
params[:client_stubs] = true if params[:client_stubs].nil?
|
@@ -68,16 +72,18 @@ module IDL
|
|
68
72
|
Kernel.eval(s.to_s, ::TOPLEVEL_BINDING)
|
69
73
|
s = nil
|
70
74
|
end
|
75
|
+
|
71
76
|
def RIDL.fparse(fname, params = {})
|
72
77
|
params[:client_stubs] = true if params[:client_stubs].nil?
|
73
78
|
params[:stubs_only] ||= false
|
74
|
-
f = File.open(fname,
|
79
|
+
f = File.open(fname, 'r')
|
75
80
|
self.parse(f, params)
|
76
81
|
ensure
|
77
82
|
f.close
|
78
83
|
end
|
84
|
+
|
79
85
|
def RIDL.feval(fname, params = {})
|
80
|
-
File.open(fname,
|
86
|
+
File.open(fname, 'r') { |io| self.eval(io, params) }
|
81
87
|
end
|
82
88
|
end # module RIDL
|
83
89
|
|
@@ -109,7 +115,7 @@ module IDL
|
|
109
115
|
# ruby specific option switches
|
110
116
|
|
111
117
|
unless ridl_params[:preprocess] # same switch defined for IDL preprocessing mode
|
112
|
-
optlist.for_switch
|
118
|
+
optlist.for_switch '--output=FILE', :type => String,
|
113
119
|
:description => ['Specifies filename to generate output in.',
|
114
120
|
'Default: File.basename(idlfile, \'.idl\')+<postfix>+<ext>'] do |swcfg|
|
115
121
|
swcfg.on_exec do |arg, params|
|
@@ -120,23 +126,23 @@ module IDL
|
|
120
126
|
end
|
121
127
|
|
122
128
|
optlist.for_switch '-o PATH', :type => String,
|
123
|
-
:description => [
|
124
|
-
|
129
|
+
:description => ['Specifies output directory.',
|
130
|
+
'Default: ./'] do |swcfg|
|
125
131
|
swcfg.on_exec do |arg, params|
|
126
132
|
params[:outputdir] = arg
|
127
133
|
end
|
128
134
|
end
|
129
135
|
optlist.for_switch '--stubs-only',
|
130
|
-
:description => [
|
131
|
-
|
136
|
+
:description => ['Only generate client stubs, no servant code.',
|
137
|
+
'Default: off'] do |swcfg|
|
132
138
|
swcfg.on_exec do |arg, params|
|
133
139
|
params[:client_stubs] = true
|
134
140
|
params[:stubs_only] = true
|
135
141
|
end
|
136
142
|
end
|
137
143
|
optlist.for_switch '--no-stubs',
|
138
|
-
:description => [
|
139
|
-
|
144
|
+
:description => ['Do not generate client stubs, only servant code.',
|
145
|
+
'Default: off'] do |swcfg|
|
140
146
|
swcfg.on_exec do |arg, params|
|
141
147
|
params[:client_stubs] = false
|
142
148
|
params[:stubs_only] = false
|
@@ -160,29 +166,29 @@ module IDL
|
|
160
166
|
end
|
161
167
|
|
162
168
|
optlist.for_switch '--skel-directory=PATH', :type => String,
|
163
|
-
:description => [
|
164
|
-
|
169
|
+
:description => ['Specifies output directory for servant files.',
|
170
|
+
'Default: outputdir or ./'] do |swcfg|
|
165
171
|
swcfg.on_exec do |arg, params|
|
166
172
|
params[:skel_outputdir] = arg
|
167
173
|
end
|
168
174
|
end
|
169
175
|
optlist.for_switch '--expand-includes',
|
170
|
-
:description => [
|
171
|
-
|
176
|
+
:description => ['Generate code for included IDL inline.',
|
177
|
+
'Default: off'] do |swcfg|
|
172
178
|
swcfg.on_exec do |arg, params|
|
173
179
|
params[:expand_includes] = true
|
174
180
|
end
|
175
181
|
end
|
176
182
|
optlist.for_switch '--no-libinit',
|
177
|
-
:description => [
|
178
|
-
|
183
|
+
:description => ['Do not generate library initialization code as preamble.',
|
184
|
+
'Default: on'] do |swcfg|
|
179
185
|
swcfg.on_exec do |arg, params|
|
180
186
|
params[:libinit] = false
|
181
187
|
end
|
182
188
|
end
|
183
189
|
optlist.for_switch '--interface-as-class=INTF', :type => String,
|
184
|
-
:description => [
|
185
|
-
|
190
|
+
:description => ['Generate a Ruby class for interface INTF instead of a module in client stubs.',
|
191
|
+
'Default: module'] do |swcfg|
|
186
192
|
swcfg.on_exec do |arg, params|
|
187
193
|
params[:class_interfaces] << arg
|
188
194
|
end
|
@@ -195,7 +201,7 @@ module IDL
|
|
195
201
|
# in options - initialized option hash
|
196
202
|
#
|
197
203
|
becfg.on_process_input do |parser, options|
|
198
|
-
IDL::Ruby.process_input(parser,options)
|
204
|
+
IDL::Ruby.process_input(parser, options)
|
199
205
|
end # becfg.on_process_input
|
200
206
|
|
201
207
|
end # Backend.configure
|
@@ -206,7 +212,7 @@ module IDL
|
|
206
212
|
|
207
213
|
# determine output file path for client stub code
|
208
214
|
unless fixed_output || options[:idlfile].nil?
|
209
|
-
options[:output] = options[:outputdir]+'/'+File.basename(options[:idlfile], '.idl')+options[:stub_pfx]+'.rb'
|
215
|
+
options[:output] = options[:outputdir] + '/' + File.basename(options[:idlfile], '.idl') + options[:stub_pfx] + '.rb'
|
210
216
|
end
|
211
217
|
# generate client stubs if requested
|
212
218
|
if options[:client_stubs]
|
@@ -232,7 +238,7 @@ module IDL
|
|
232
238
|
options[:srv_output] = if fixed_output
|
233
239
|
options[:output]
|
234
240
|
else
|
235
|
-
options[:outputdir]+'/'+File.basename(options[:idlfile], '.idl')+options[:srv_pfx]+'.rb'
|
241
|
+
options[:outputdir] + '/' + File.basename(options[:idlfile], '.idl') + options[:srv_pfx] + '.rb'
|
236
242
|
end
|
237
243
|
if fixed_output && options[:client_stubs]
|
238
244
|
co
|
@@ -255,28 +261,45 @@ module IDL
|
|
255
261
|
|
256
262
|
module LeafMixin
|
257
263
|
|
258
|
-
RESERVED_RUBY_CONST =
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
264
|
+
RESERVED_RUBY_CONST = %w(Array Bignum Binding Class Continuation Dir Exception FalseClass File
|
265
|
+
Fixnum Float Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Process
|
266
|
+
Range Regexp String Struct Symbol Thread ThreadGroup Time TrueClass UnboundMethod Comparable
|
267
|
+
Enumerable Errno FileTest GC Kernel Marshal Math ObjectSpace Signal)
|
268
|
+
|
269
|
+
RESERVED_RUBY_MEMBER = %w(untaint id instance_variable_get inspect taint public_methods
|
270
|
+
__send__ to_a display instance_eval extend clone protected_methods hash freeze type
|
271
|
+
instance_variable_set methods instance_variables to_s method dup private_methods object_id
|
272
|
+
send __id__ singleton_methods proc readline global_variables singleton_method_removed callcc
|
273
|
+
syscall fail untrace_var load srand puts catch chomp initialize_copy format scan print abort
|
274
|
+
fork gsub trap test select initialize method_missing lambda readlines local_variables
|
275
|
+
singleton_method_undefined system open caller eval set_trace_func require rand
|
276
|
+
singleton_method_added throw gets binding raise warn getc exec trace_var irb_binding at_exit
|
277
|
+
split putc loop chop sprintf p remove_instance_variable exit printf sleep sub autoload)
|
278
|
+
|
279
|
+
def ruby_lm_name
|
280
|
+
unless @lm_name
|
281
|
+
ret = @name.checked_name.dup
|
282
|
+
case self
|
283
|
+
when IDL::AST::Port,
|
284
|
+
IDL::AST::StateMember,
|
285
|
+
IDL::AST::Initializer,
|
286
|
+
IDL::AST::Parameter,
|
287
|
+
IDL::AST::Operation,
|
288
|
+
IDL::AST::Attribute,
|
289
|
+
IDL::AST::Member,
|
290
|
+
IDL::AST::UnionMember
|
291
|
+
# member names
|
292
|
+
ret = ret[0, 1].downcase + ret[1, ret.size].to_s
|
293
|
+
ret = 'r_' + ret if IDL::Ruby::LeafMixin::RESERVED_RUBY_MEMBER.include?(ret)
|
294
|
+
else
|
295
|
+
# class/module names
|
296
|
+
ret = ret[0, 1].upcase + ret[1, ret.size].to_s
|
297
|
+
is_scoped = @enclosure && !@enclosure.scopes.empty?
|
298
|
+
ret = 'R_' + ret if !is_scoped && IDL::Ruby::LeafMixin::RESERVED_RUBY_CONST.include?(ret)
|
299
|
+
end
|
300
|
+
@lm_name = ret
|
301
|
+
end
|
302
|
+
@lm_name
|
280
303
|
end
|
281
304
|
|
282
305
|
def rubyname
|
@@ -286,43 +309,24 @@ module IDL
|
|
286
309
|
def scoped_rubyname
|
287
310
|
scoped_lm_name
|
288
311
|
end
|
289
|
-
|
290
|
-
module ClassMethods
|
291
|
-
def mk_name(nm, is_scoped)
|
292
|
-
ret = nm.dup
|
293
|
-
case self::NAMETYPE
|
294
|
-
when :class
|
295
|
-
ret = ret[0,1].upcase + ret[1,ret.size].to_s
|
296
|
-
ret = 'R_'+ret if !is_scoped && IDL::Ruby::LeafMixin::RESERVED_RUBY_CONST.include?(ret)
|
297
|
-
when :member
|
298
|
-
ret = ret[0,1].downcase + ret[1,ret.size].to_s
|
299
|
-
ret = 'r_'+ret if IDL::Ruby::LeafMixin::RESERVED_RUBY_MEMBER.include?(ret)
|
300
|
-
else
|
301
|
-
raise RuntimeError,
|
302
|
-
"invalid nametype for #{self.class}: #{self::NAMETYPE}"
|
303
|
-
end
|
304
|
-
ret
|
305
|
-
end
|
306
|
-
end
|
307
312
|
end # module LeafMixin
|
308
313
|
|
309
314
|
IDL::AST::Leaf.class_eval do
|
310
315
|
include LeafMixin
|
316
|
+
|
317
|
+
alias :base_lm_name :lm_name
|
318
|
+
alias :lm_name :ruby_lm_name
|
311
319
|
end
|
312
320
|
|
313
321
|
module ScannerMixin
|
314
322
|
|
315
|
-
RUBYKW =
|
316
|
-
|
317
|
-
|
318
|
-
'BEGIN', 'break', 'do', 'false', 'next', 'rescue', 'then', 'when',
|
319
|
-
'END', 'case', 'else', 'for', 'nil', 'retry', 'true', 'while',
|
320
|
-
'alias', 'class', 'elsif', 'if', 'not', 'return', 'undef', 'yield',
|
321
|
-
].collect! { |w| w.to_sym }
|
323
|
+
RUBYKW = %w(__FILE__ and def end in or self unless __LINE__ begin defined? ensure module redo
|
324
|
+
super until BEGIN break do false next rescue then when END case else for nil retry true while
|
325
|
+
alias class elsif if not return undef yield).collect! { |w| w.to_sym }
|
322
326
|
|
323
327
|
def chk_identifier(ident)
|
324
328
|
# prefix Ruby keywords with 'r_'
|
325
|
-
RUBYKW.include?(ident.to_sym) ? 'r_'+ident : ident
|
329
|
+
RUBYKW.include?(ident.to_sym) ? 'r_' + ident : ident
|
326
330
|
end
|
327
331
|
|
328
332
|
end # module ScannerMixin
|
data/lib/ridlbe/ruby/orb.pidlc
CHANGED
Binary file
|
data/lib/ridlbe/ruby/require.rb
CHANGED
@@ -8,7 +8,6 @@
|
|
8
8
|
# included with this program.
|
9
9
|
#
|
10
10
|
# Copyright (c) Remedy IT Expertise BV
|
11
|
-
# Chamber of commerce Rotterdam nr.276339, The Netherlands
|
12
11
|
#--------------------------------------------------------------------
|
13
12
|
|
14
13
|
(Dir.glob(File.join(File.dirname(__FILE__), '*.rb')) - [__FILE__]).each do |f|
|