line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
#
|
3
|
|
|
|
|
|
|
# Interface Definition Language (OMG IDL CORBA v3.0)
|
4
|
|
|
|
|
|
|
#
|
5
|
|
|
|
|
|
|
# C Language Mapping Specification, New Edition June 1999
|
6
|
|
|
|
|
|
|
#
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package CORBA::C::TypeVisitor;
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
11
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
1948
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '2.61';
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# builds $node->{c_arg}
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new {
|
18
|
0
|
|
|
0
|
0
|
|
my $proto = shift;
|
19
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto;
|
20
|
0
|
|
|
|
|
|
my $self = {};
|
21
|
0
|
|
|
|
|
|
bless $self, $class;
|
22
|
0
|
|
|
|
|
|
my ($parser) = @_;
|
23
|
0
|
|
|
|
|
|
$self->{srcname} = $parser->YYData->{srcname};
|
24
|
0
|
|
|
|
|
|
$self->{symbtab} = $parser->YYData->{symbtab};
|
25
|
0
|
|
|
|
|
|
return $self;
|
26
|
|
|
|
|
|
|
}
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _get_type {
|
29
|
0
|
|
|
0
|
|
|
my $self = shift;
|
30
|
0
|
|
|
|
|
|
my ($type) = @_;
|
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
if (ref $type) {
|
33
|
0
|
|
|
|
|
|
return $type;
|
34
|
|
|
|
|
|
|
}
|
35
|
|
|
|
|
|
|
else {
|
36
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($type);
|
37
|
|
|
|
|
|
|
}
|
38
|
|
|
|
|
|
|
}
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _get_c_arg {
|
41
|
0
|
|
|
0
|
|
|
my $self = shift;
|
42
|
0
|
|
|
|
|
|
my ($type, $v_name, $attr) = @_;
|
43
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
my $t_name = $type->{c_name};
|
45
|
0
|
|
|
|
|
|
return $t_name . $self->_get_name_attr($type, $attr) . $v_name;
|
46
|
|
|
|
|
|
|
}
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
#
|
49
|
|
|
|
|
|
|
# See 1.21 Summary of Argument/Result Passing
|
50
|
|
|
|
|
|
|
#
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub _get_name_attr {
|
53
|
0
|
|
|
0
|
|
|
my $self = shift;
|
54
|
0
|
|
|
|
|
|
my ($node, $attr) = @_;
|
55
|
|
|
|
|
|
|
|
56
|
0
|
0
|
0
|
|
|
|
if ( $node->isa('BasicType')
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
57
|
|
|
|
|
|
|
or $node->isa('EnumType') ) {
|
58
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
59
|
0
|
|
|
|
|
|
return q{ };
|
60
|
|
|
|
|
|
|
}
|
61
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
62
|
0
|
|
|
|
|
|
return ' * ';
|
63
|
|
|
|
|
|
|
}
|
64
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
65
|
0
|
|
|
|
|
|
return ' * ';
|
66
|
|
|
|
|
|
|
}
|
67
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
68
|
0
|
|
|
|
|
|
return q{};
|
69
|
|
|
|
|
|
|
}
|
70
|
|
|
|
|
|
|
}
|
71
|
|
|
|
|
|
|
elsif ( $node->isa('FixedPtType') ) {
|
72
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
73
|
0
|
|
|
|
|
|
return ' * ';
|
74
|
|
|
|
|
|
|
}
|
75
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
76
|
0
|
|
|
|
|
|
return ' * ';
|
77
|
|
|
|
|
|
|
}
|
78
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
79
|
0
|
|
|
|
|
|
return ' * ';
|
80
|
|
|
|
|
|
|
}
|
81
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
82
|
0
|
|
|
|
|
|
return q{};
|
83
|
|
|
|
|
|
|
}
|
84
|
|
|
|
|
|
|
}
|
85
|
|
|
|
|
|
|
elsif ( $node->isa('BaseInterface')
|
86
|
|
|
|
|
|
|
or $node->isa('ForwardBaseInterface') ) {
|
87
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
88
|
0
|
|
|
|
|
|
return q{ };
|
89
|
|
|
|
|
|
|
}
|
90
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
91
|
0
|
|
|
|
|
|
return ' * ';
|
92
|
|
|
|
|
|
|
}
|
93
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
94
|
0
|
|
|
|
|
|
return ' * ';
|
95
|
|
|
|
|
|
|
}
|
96
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
97
|
0
|
|
|
|
|
|
return q{};
|
98
|
|
|
|
|
|
|
}
|
99
|
|
|
|
|
|
|
}
|
100
|
|
|
|
|
|
|
elsif ( $node->isa('StructType')
|
101
|
|
|
|
|
|
|
or $node->isa('UnionType') ) {
|
102
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
103
|
0
|
|
|
|
|
|
return ' * ';
|
104
|
|
|
|
|
|
|
}
|
105
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
106
|
0
|
|
|
|
|
|
return ' * ';
|
107
|
|
|
|
|
|
|
}
|
108
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
109
|
0
|
0
|
|
|
|
|
if (defined $node->{length}) { # variable
|
110
|
0
|
|
|
|
|
|
return ' ** ';
|
111
|
|
|
|
|
|
|
}
|
112
|
|
|
|
|
|
|
else {
|
113
|
0
|
|
|
|
|
|
return ' * ';
|
114
|
|
|
|
|
|
|
}
|
115
|
|
|
|
|
|
|
}
|
116
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
117
|
0
|
0
|
|
|
|
|
if (defined $node->{length}) { # variable
|
118
|
0
|
|
|
|
|
|
return ' *';
|
119
|
|
|
|
|
|
|
}
|
120
|
|
|
|
|
|
|
else {
|
121
|
0
|
|
|
|
|
|
return q{};
|
122
|
|
|
|
|
|
|
}
|
123
|
|
|
|
|
|
|
}
|
124
|
|
|
|
|
|
|
}
|
125
|
|
|
|
|
|
|
elsif ( $node->isa('SequenceType') ) {
|
126
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
127
|
0
|
|
|
|
|
|
return ' * ';
|
128
|
|
|
|
|
|
|
}
|
129
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
130
|
0
|
|
|
|
|
|
return ' * ';
|
131
|
|
|
|
|
|
|
}
|
132
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
133
|
0
|
|
|
|
|
|
return ' ** ';
|
134
|
|
|
|
|
|
|
}
|
135
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
136
|
0
|
|
|
|
|
|
return ' *';
|
137
|
|
|
|
|
|
|
}
|
138
|
|
|
|
|
|
|
}
|
139
|
|
|
|
|
|
|
elsif ( $node->isa('StringType')
|
140
|
|
|
|
|
|
|
or $node->isa('WideStringType') ) {
|
141
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
142
|
0
|
|
|
|
|
|
return q{ };
|
143
|
|
|
|
|
|
|
}
|
144
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
145
|
0
|
|
|
|
|
|
return ' * ';
|
146
|
|
|
|
|
|
|
}
|
147
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
148
|
0
|
|
|
|
|
|
return ' * ';
|
149
|
|
|
|
|
|
|
}
|
150
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
151
|
0
|
|
|
|
|
|
return q{};
|
152
|
|
|
|
|
|
|
}
|
153
|
|
|
|
|
|
|
}
|
154
|
|
|
|
|
|
|
elsif ( $node->isa('TypeDeclarator') ) {
|
155
|
0
|
0
|
|
|
|
|
if (exists $node->{array_size}) {
|
156
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
157
|
0
|
|
|
|
|
|
return q{ };
|
158
|
|
|
|
|
|
|
}
|
159
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
160
|
0
|
|
|
|
|
|
return q{ };
|
161
|
|
|
|
|
|
|
}
|
162
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
163
|
0
|
0
|
|
|
|
|
if (defined $node->{length}) { # variable
|
164
|
0
|
|
|
|
|
|
return '_slice ** ';
|
165
|
|
|
|
|
|
|
}
|
166
|
|
|
|
|
|
|
else {
|
167
|
0
|
|
|
|
|
|
return q{ };
|
168
|
|
|
|
|
|
|
}
|
169
|
|
|
|
|
|
|
}
|
170
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
171
|
0
|
|
|
|
|
|
return '_slice *';
|
172
|
|
|
|
|
|
|
}
|
173
|
|
|
|
|
|
|
}
|
174
|
|
|
|
|
|
|
else {
|
175
|
0
|
|
|
|
|
|
my $type = $node->{type};
|
176
|
0
|
0
|
|
|
|
|
unless (ref $type) {
|
177
|
0
|
|
|
|
|
|
$type = $self->{symbtab}->Lookup($type);
|
178
|
|
|
|
|
|
|
}
|
179
|
0
|
|
|
|
|
|
return $self->_get_name_attr($type, $attr);
|
180
|
|
|
|
|
|
|
}
|
181
|
|
|
|
|
|
|
}
|
182
|
|
|
|
|
|
|
elsif ( $node->isa('NativeType') ) {
|
183
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
184
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
185
|
0
|
|
|
|
|
|
return q{ };
|
186
|
|
|
|
|
|
|
}
|
187
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
188
|
0
|
|
|
|
|
|
return ' * ';
|
189
|
|
|
|
|
|
|
}
|
190
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
191
|
0
|
|
|
|
|
|
return ' * ';
|
192
|
|
|
|
|
|
|
}
|
193
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
194
|
0
|
|
|
|
|
|
return q{};
|
195
|
|
|
|
|
|
|
}
|
196
|
|
|
|
|
|
|
else {
|
197
|
0
|
|
|
|
|
|
warn caller()," NativeType : ERROR_INTERNAL $attr \n";
|
198
|
|
|
|
|
|
|
}
|
199
|
|
|
|
|
|
|
}
|
200
|
|
|
|
|
|
|
elsif ( $node->isa('AnyType') ) {
|
201
|
0
|
0
|
|
|
|
|
if ( $attr eq 'in' ) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
202
|
0
|
|
|
|
|
|
return ' * ';
|
203
|
|
|
|
|
|
|
}
|
204
|
|
|
|
|
|
|
elsif ( $attr eq 'inout' ) {
|
205
|
0
|
|
|
|
|
|
return ' * ';
|
206
|
|
|
|
|
|
|
}
|
207
|
|
|
|
|
|
|
elsif ( $attr eq 'out' ) {
|
208
|
0
|
|
|
|
|
|
return ' ** ';
|
209
|
|
|
|
|
|
|
}
|
210
|
|
|
|
|
|
|
elsif ( $attr eq 'return' ) {
|
211
|
0
|
|
|
|
|
|
return ' *';
|
212
|
|
|
|
|
|
|
}
|
213
|
|
|
|
|
|
|
}
|
214
|
|
|
|
|
|
|
elsif ( $node->isa('VoidType') ) {
|
215
|
0
|
0
|
|
|
|
|
if ($attr eq 'return') {
|
216
|
0
|
|
|
|
|
|
return q{};
|
217
|
|
|
|
|
|
|
}
|
218
|
|
|
|
|
|
|
}
|
219
|
|
|
|
|
|
|
else {
|
220
|
0
|
|
|
|
|
|
my $class = ref $node;
|
221
|
0
|
|
|
|
|
|
warn "Please implement '$class' in '_get_name_attr'.\n";
|
222
|
0
|
|
|
|
|
|
return;
|
223
|
|
|
|
|
|
|
}
|
224
|
0
|
|
|
|
|
|
my $class = ref $node;
|
225
|
0
|
|
|
|
|
|
warn "_get_name_attr : ERROR_INTERNAL $class $attr \n";
|
226
|
|
|
|
|
|
|
}
|
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
#
|
229
|
|
|
|
|
|
|
# 3.5 OMG IDL Specification
|
230
|
|
|
|
|
|
|
#
|
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
sub visitSpecification {
|
233
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
234
|
0
|
|
|
|
|
|
my ($node) = @_;
|
235
|
0
|
0
|
|
|
|
|
if (exists $node->{list_import}) {
|
236
|
0
|
|
|
|
|
|
foreach (@{$node->{list_import}}) {
|
|
0
|
|
|
|
|
|
|
237
|
0
|
|
|
|
|
|
$_->visit($self);
|
238
|
|
|
|
|
|
|
}
|
239
|
|
|
|
|
|
|
}
|
240
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) {
|
|
0
|
|
|
|
|
|
|
241
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
242
|
|
|
|
|
|
|
}
|
243
|
|
|
|
|
|
|
}
|
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
#
|
246
|
|
|
|
|
|
|
# 3.6 Import Declaration
|
247
|
|
|
|
|
|
|
#
|
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
sub visitImport {
|
250
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
251
|
0
|
|
|
|
|
|
my ($node) = @_;
|
252
|
0
|
|
|
|
|
|
foreach (@{$node->{list_decl}}) {
|
|
0
|
|
|
|
|
|
|
253
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
254
|
|
|
|
|
|
|
}
|
255
|
|
|
|
|
|
|
}
|
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
#
|
258
|
|
|
|
|
|
|
# 3.7 Module Declaration
|
259
|
|
|
|
|
|
|
#
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub visitModules {
|
262
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
263
|
0
|
|
|
|
|
|
my ($node) = @_;
|
264
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) {
|
|
0
|
|
|
|
|
|
|
265
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
266
|
|
|
|
|
|
|
}
|
267
|
|
|
|
|
|
|
}
|
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
#
|
270
|
|
|
|
|
|
|
# 3.8 Interface Declaration
|
271
|
|
|
|
|
|
|
#
|
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
sub visitBaseInterface {
|
274
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
275
|
0
|
|
|
|
|
|
my ($node) = @_;
|
276
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) {
|
|
0
|
|
|
|
|
|
|
277
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
278
|
|
|
|
|
|
|
}
|
279
|
|
|
|
|
|
|
}
|
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
#
|
282
|
|
|
|
|
|
|
# 3.9 Value Declaration
|
283
|
|
|
|
|
|
|
#
|
284
|
|
|
|
|
|
|
|
285
|
0
|
|
|
0
|
0
|
|
sub visitStateMember {
|
286
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
287
|
|
|
|
|
|
|
}
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
sub visitInitializer {
|
290
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
291
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
292
|
0
|
|
|
|
|
|
my ($node) = @_;
|
293
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { # parameter
|
|
0
|
|
|
|
|
|
|
294
|
0
|
|
|
|
|
|
my $type = $self->_get_type($_->{type});
|
295
|
0
|
|
|
|
|
|
$_->{c_arg} = $self->_get_c_arg($type, $_->{c_name}, $_->{attr});
|
296
|
|
|
|
|
|
|
}
|
297
|
|
|
|
|
|
|
}
|
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
#
|
300
|
|
|
|
|
|
|
# 3.10 Constant Declaration
|
301
|
|
|
|
|
|
|
#
|
302
|
|
|
|
|
|
|
|
303
|
0
|
|
|
0
|
0
|
|
sub visitConstant {
|
304
|
|
|
|
|
|
|
# empty
|
305
|
|
|
|
|
|
|
}
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
#
|
308
|
|
|
|
|
|
|
# 3.11 Type Declaration
|
309
|
|
|
|
|
|
|
#
|
310
|
|
|
|
|
|
|
|
311
|
0
|
|
|
0
|
0
|
|
sub visitTypeDeclarator {
|
312
|
|
|
|
|
|
|
# empty
|
313
|
|
|
|
|
|
|
}
|
314
|
|
|
|
|
|
|
|
315
|
0
|
|
|
0
|
0
|
|
sub visitNativeType {
|
316
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
317
|
|
|
|
|
|
|
}
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
#
|
320
|
|
|
|
|
|
|
# 3.11.2 Constructed Types
|
321
|
|
|
|
|
|
|
#
|
322
|
|
|
|
|
|
|
|
323
|
0
|
|
|
0
|
0
|
|
sub visitStructType {
|
324
|
|
|
|
|
|
|
# empty
|
325
|
|
|
|
|
|
|
}
|
326
|
|
|
|
|
|
|
|
327
|
0
|
|
|
0
|
0
|
|
sub visitUnionType {
|
328
|
|
|
|
|
|
|
# empty
|
329
|
|
|
|
|
|
|
}
|
330
|
|
|
|
|
|
|
|
331
|
0
|
|
|
0
|
0
|
|
sub visitEnumType {
|
332
|
|
|
|
|
|
|
# empty
|
333
|
|
|
|
|
|
|
}
|
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
#
|
336
|
|
|
|
|
|
|
# 3.12 Exception Declaration
|
337
|
|
|
|
|
|
|
#
|
338
|
|
|
|
|
|
|
|
339
|
0
|
|
|
0
|
0
|
|
sub visitException {
|
340
|
|
|
|
|
|
|
# empty
|
341
|
|
|
|
|
|
|
}
|
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
#
|
344
|
|
|
|
|
|
|
# 3.13 Operation Declaration
|
345
|
|
|
|
|
|
|
#
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
sub visitOperation {
|
348
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
349
|
0
|
|
|
|
|
|
my ($node) = @_;
|
350
|
0
|
|
|
|
|
|
my $type = $self->_get_type($node->{type});
|
351
|
0
|
|
|
|
|
|
$node->{c_arg} = $self->_get_c_arg($type, q{}, 'return');
|
352
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { # parameter
|
|
0
|
|
|
|
|
|
|
353
|
0
|
|
|
|
|
|
$type = $self->_get_type($_->{type});
|
354
|
0
|
|
|
|
|
|
$_->{c_arg} = $self->_get_c_arg($type, $_->{c_name}, $_->{attr});
|
355
|
|
|
|
|
|
|
}
|
356
|
|
|
|
|
|
|
}
|
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
#
|
359
|
|
|
|
|
|
|
# 3.14 Attribute Declaration
|
360
|
|
|
|
|
|
|
#
|
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
sub visitAttribute {
|
363
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
364
|
0
|
|
|
|
|
|
my ($node) = @_;
|
365
|
0
|
|
|
|
|
|
$node->{_get}->visit($self);
|
366
|
0
|
0
|
|
|
|
|
$node->{_set}->visit($self) if (exists $node->{_set});
|
367
|
|
|
|
|
|
|
}
|
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
#
|
370
|
|
|
|
|
|
|
# 3.15 Repository Identity Related Declarations
|
371
|
|
|
|
|
|
|
#
|
372
|
|
|
|
|
|
|
|
373
|
0
|
|
|
0
|
0
|
|
sub visitTypeId {
|
374
|
|
|
|
|
|
|
# empty
|
375
|
|
|
|
|
|
|
}
|
376
|
|
|
|
|
|
|
|
377
|
0
|
|
|
0
|
0
|
|
sub visitTypePrefix {
|
378
|
|
|
|
|
|
|
# empty
|
379
|
|
|
|
|
|
|
}
|
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
#
|
382
|
|
|
|
|
|
|
# 3.16 Event Declaration
|
383
|
|
|
|
|
|
|
#
|
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
#
|
386
|
|
|
|
|
|
|
# 3.17 Component Declaration
|
387
|
|
|
|
|
|
|
#
|
388
|
|
|
|
|
|
|
|
389
|
0
|
|
|
0
|
0
|
|
sub visitProvides {
|
390
|
|
|
|
|
|
|
# empty
|
391
|
|
|
|
|
|
|
}
|
392
|
|
|
|
|
|
|
|
393
|
0
|
|
|
0
|
0
|
|
sub visitUses {
|
394
|
|
|
|
|
|
|
# empty
|
395
|
|
|
|
|
|
|
}
|
396
|
|
|
|
|
|
|
|
397
|
0
|
|
|
0
|
0
|
|
sub visitPublishes {
|
398
|
|
|
|
|
|
|
# empty
|
399
|
|
|
|
|
|
|
}
|
400
|
|
|
|
|
|
|
|
401
|
0
|
|
|
0
|
0
|
|
sub visitEmits {
|
402
|
|
|
|
|
|
|
# empty
|
403
|
|
|
|
|
|
|
}
|
404
|
|
|
|
|
|
|
|
405
|
0
|
|
|
0
|
0
|
|
sub visitConsumes {
|
406
|
|
|
|
|
|
|
# empty
|
407
|
|
|
|
|
|
|
}
|
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
#
|
410
|
|
|
|
|
|
|
# 3.18 Home Declaration
|
411
|
|
|
|
|
|
|
#
|
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
sub visitFactory {
|
414
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
415
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
416
|
0
|
|
|
|
|
|
my ($node) = @_;
|
417
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { # parameter
|
|
0
|
|
|
|
|
|
|
418
|
0
|
|
|
|
|
|
my $type = $self->_get_type($_->{type});
|
419
|
0
|
|
|
|
|
|
$_->{c_arg} = $self->_get_c_arg($type, $_->{c_name}, $_->{attr});
|
420
|
|
|
|
|
|
|
}
|
421
|
|
|
|
|
|
|
}
|
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
sub visitFinder {
|
424
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
425
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
426
|
0
|
|
|
|
|
|
my ($node) = @_;
|
427
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { # parameter
|
|
0
|
|
|
|
|
|
|
428
|
0
|
|
|
|
|
|
my $type = $self->_get_type($_->{type});
|
429
|
0
|
|
|
|
|
|
$_->{c_arg} = $self->_get_c_arg($type, $_->{c_name}, $_->{attr});
|
430
|
|
|
|
|
|
|
}
|
431
|
|
|
|
|
|
|
}
|
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
1;
|
434
|
|
|
|
|
|
|
|