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::NameVisitor;
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
9
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
49
|
|
11
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2989
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '2.60';
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# builds $node->{c_name}
|
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->{key} = 'c_name';
|
24
|
0
|
|
|
|
|
|
$self->{symbtab} = $parser->YYData->{symbtab};
|
25
|
0
|
|
|
|
|
|
return $self;
|
26
|
|
|
|
|
|
|
}
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub _get_defn {
|
29
|
0
|
|
|
0
|
|
|
my $self = shift;
|
30
|
0
|
|
|
|
|
|
my ($defn) = @_;
|
31
|
0
|
0
|
|
|
|
|
if (ref $defn) {
|
32
|
0
|
|
|
|
|
|
return $defn;
|
33
|
|
|
|
|
|
|
}
|
34
|
|
|
|
|
|
|
else {
|
35
|
0
|
|
|
|
|
|
return $self->{symbtab}->Lookup($defn);
|
36
|
|
|
|
|
|
|
}
|
37
|
|
|
|
|
|
|
}
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
#
|
40
|
|
|
|
|
|
|
# See 1.2 Scoped Names
|
41
|
|
|
|
|
|
|
#
|
42
|
|
|
|
|
|
|
sub _get_name {
|
43
|
0
|
|
|
0
|
|
|
my $self = shift;
|
44
|
0
|
|
|
|
|
|
my ($node) = @_;
|
45
|
0
|
|
|
|
|
|
my $name = $node->{full};
|
46
|
0
|
|
|
|
|
|
$name =~ s/^:://;
|
47
|
0
|
|
|
|
|
|
$name =~ s/::/_/g;
|
48
|
0
|
|
|
|
|
|
return $name;
|
49
|
|
|
|
|
|
|
}
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
#
|
52
|
|
|
|
|
|
|
# 3.5 OMG IDL Specification
|
53
|
|
|
|
|
|
|
#
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub visitSpecification {
|
56
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
57
|
0
|
|
|
|
|
|
my ($node) = @_;
|
58
|
0
|
0
|
|
|
|
|
if (exists $node->{list_import}) {
|
59
|
0
|
|
|
|
|
|
foreach (@{$node->{list_import}}) {
|
|
0
|
|
|
|
|
|
|
60
|
0
|
|
|
|
|
|
$_->visit($self);
|
61
|
|
|
|
|
|
|
}
|
62
|
|
|
|
|
|
|
}
|
63
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) {
|
|
0
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
65
|
|
|
|
|
|
|
}
|
66
|
|
|
|
|
|
|
}
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
#
|
69
|
|
|
|
|
|
|
# 3.6 Import Declaration
|
70
|
|
|
|
|
|
|
#
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub visitImport {
|
73
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
74
|
0
|
|
|
|
|
|
my ($node) = @_;
|
75
|
0
|
|
|
|
|
|
foreach (@{$node->{list_decl}}) {
|
|
0
|
|
|
|
|
|
|
76
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
77
|
|
|
|
|
|
|
}
|
78
|
|
|
|
|
|
|
}
|
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
#
|
81
|
|
|
|
|
|
|
# 3.7 Module Declaration
|
82
|
|
|
|
|
|
|
#
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub visitModules {
|
85
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
86
|
0
|
|
|
|
|
|
my ($node) = @_;
|
87
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
88
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) {
|
|
0
|
|
|
|
|
|
|
89
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
90
|
|
|
|
|
|
|
}
|
91
|
|
|
|
|
|
|
}
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
#
|
94
|
|
|
|
|
|
|
# 3.8 Interface Declaration
|
95
|
|
|
|
|
|
|
#
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub visitBaseInterface {
|
98
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
99
|
0
|
|
|
|
|
|
my ($node) = @_;
|
100
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
101
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
102
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) {
|
|
0
|
|
|
|
|
|
|
103
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self);
|
104
|
|
|
|
|
|
|
}
|
105
|
|
|
|
|
|
|
}
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
sub visitForwardBaseInterface {
|
108
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
109
|
0
|
|
|
|
|
|
my ($node) = @_;
|
110
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
111
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
112
|
|
|
|
|
|
|
}
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
#
|
115
|
|
|
|
|
|
|
# 3.9 Value Declaration
|
116
|
|
|
|
|
|
|
#
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub visitStateMember {
|
119
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
120
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
121
|
0
|
|
|
|
|
|
my ($node) = @_;
|
122
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
123
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self);
|
124
|
|
|
|
|
|
|
}
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub visitInitializer {
|
127
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
128
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
129
|
0
|
|
|
|
|
|
my ($node) = @_;
|
130
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $node->{idf};
|
131
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) {
|
|
0
|
|
|
|
|
|
|
132
|
0
|
|
|
|
|
|
$_->visit($self); # parameter
|
133
|
|
|
|
|
|
|
}
|
134
|
|
|
|
|
|
|
}
|
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
#
|
137
|
|
|
|
|
|
|
# 3.10 Constant Declaration
|
138
|
|
|
|
|
|
|
#
|
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
sub visitConstant {
|
141
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
142
|
0
|
|
|
|
|
|
my ($node) = @_;
|
143
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
144
|
|
|
|
|
|
|
}
|
145
|
|
|
|
|
|
|
|
146
|
0
|
|
|
0
|
0
|
|
sub visitExpression {
|
147
|
|
|
|
|
|
|
# empty
|
148
|
|
|
|
|
|
|
}
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
#
|
151
|
|
|
|
|
|
|
# 3.11 Type Declaration
|
152
|
|
|
|
|
|
|
#
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
sub visitTypeDeclarator {
|
155
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
156
|
0
|
|
|
|
|
|
my ($node) = @_;
|
157
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
158
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self);
|
159
|
|
|
|
|
|
|
}
|
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
sub visitNativeType {
|
162
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
163
|
0
|
|
|
|
|
|
my ($node) = @_;
|
164
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $node->{idf};
|
165
|
|
|
|
|
|
|
}
|
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
#
|
168
|
|
|
|
|
|
|
# 3.11.1 Basic Types
|
169
|
|
|
|
|
|
|
#
|
170
|
|
|
|
|
|
|
# See 1.7 Mapping for Basic Data Types
|
171
|
|
|
|
|
|
|
#
|
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub visitBasicType {
|
174
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
175
|
0
|
|
|
|
|
|
my ($node) = @_;
|
176
|
0
|
|
|
|
|
|
my $name = $node->{value};
|
177
|
0
|
|
|
|
|
|
$name =~ s/ /_/g;
|
178
|
0
|
|
|
|
|
|
$node->{$self->{key}} = 'CORBA_' . $name;
|
179
|
|
|
|
|
|
|
}
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
#
|
182
|
|
|
|
|
|
|
# 3.11.2 Constructed Types
|
183
|
|
|
|
|
|
|
#
|
184
|
|
|
|
|
|
|
# 3.11.2.1 Structures
|
185
|
|
|
|
|
|
|
#
|
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
sub visitStructType {
|
188
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
189
|
0
|
|
|
|
|
|
my ($node) = @_;
|
190
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
191
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
192
|
0
|
|
|
|
|
|
foreach (@{$node->{list_member}}) {
|
|
0
|
|
|
|
|
|
|
193
|
0
|
|
|
|
|
|
$self->_get_defn($_)->visit($self); # member
|
194
|
|
|
|
|
|
|
}
|
195
|
|
|
|
|
|
|
}
|
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
sub visitMember {
|
198
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
199
|
0
|
|
|
|
|
|
my ($node) = @_;
|
200
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $node->{idf};
|
201
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self);
|
202
|
|
|
|
|
|
|
}
|
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
# 3.11.2.2 Discriminated Unions
|
205
|
|
|
|
|
|
|
#
|
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
sub visitUnionType {
|
208
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
209
|
0
|
|
|
|
|
|
my ($node) = @_;
|
210
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
211
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
212
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self);
|
213
|
0
|
|
|
|
|
|
foreach (@{$node->{list_expr}}) {
|
|
0
|
|
|
|
|
|
|
214
|
0
|
|
|
|
|
|
$_->visit($self); # case
|
215
|
|
|
|
|
|
|
}
|
216
|
|
|
|
|
|
|
}
|
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
sub visitCase {
|
219
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
220
|
0
|
|
|
|
|
|
my ($node) = @_;
|
221
|
0
|
|
|
|
|
|
foreach (@{$node->{list_label}}) {
|
|
0
|
|
|
|
|
|
|
222
|
0
|
|
|
|
|
|
$_->visit($self); # default or expression
|
223
|
|
|
|
|
|
|
}
|
224
|
0
|
|
|
|
|
|
$node->{element}->visit($self);
|
225
|
|
|
|
|
|
|
}
|
226
|
|
|
|
|
|
|
|
227
|
0
|
|
|
0
|
0
|
|
sub visitDefault {
|
228
|
|
|
|
|
|
|
# empty
|
229
|
|
|
|
|
|
|
}
|
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
sub visitElement {
|
232
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
233
|
0
|
|
|
|
|
|
my ($node) = @_;
|
234
|
0
|
|
|
|
|
|
$self->_get_defn($node->{value})->visit($self); # member
|
235
|
|
|
|
|
|
|
}
|
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
# 3.11.2.4 Enumerations
|
238
|
|
|
|
|
|
|
#
|
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
sub visitEnumType {
|
241
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
242
|
0
|
|
|
|
|
|
my ($node) = @_;
|
243
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
244
|
0
|
|
|
|
|
|
foreach (@{$node->{list_expr}}) {
|
|
0
|
|
|
|
|
|
|
245
|
0
|
|
|
|
|
|
$_->visit($self); # enum
|
246
|
|
|
|
|
|
|
}
|
247
|
|
|
|
|
|
|
}
|
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
sub visitEnum {
|
250
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
251
|
0
|
|
|
|
|
|
my ($node) = @_;
|
252
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
253
|
|
|
|
|
|
|
}
|
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
#
|
256
|
|
|
|
|
|
|
# 3.11.3 Template Types
|
257
|
|
|
|
|
|
|
#
|
258
|
|
|
|
|
|
|
# See 1.11 Mapping for Sequence Types
|
259
|
|
|
|
|
|
|
#
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub visitSequenceType {
|
262
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
263
|
0
|
|
|
|
|
|
my ($node) = @_;
|
264
|
0
|
|
|
|
|
|
my $type = $self->_get_defn($node->{type});
|
265
|
0
|
|
0
|
|
|
|
while ( $type->isa('TypeDeclarator')
|
266
|
|
|
|
|
|
|
and ! exists $type->{array_size} ) {
|
267
|
0
|
|
|
|
|
|
$type = $self->_get_defn($type->{type});
|
268
|
|
|
|
|
|
|
}
|
269
|
0
|
|
|
|
|
|
$type->visit($self);
|
270
|
0
|
|
|
|
|
|
my $name = $type->{$self->{key}};
|
271
|
0
|
|
|
|
|
|
$name =~ s/^CORBA_//;
|
272
|
0
|
|
|
|
|
|
$node->{$self->{key}} = 'CORBA_sequence_' . $name;
|
273
|
|
|
|
|
|
|
}
|
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
#
|
276
|
|
|
|
|
|
|
# See 1.12 Mapping for Strings
|
277
|
|
|
|
|
|
|
#
|
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
sub visitStringType {
|
280
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
281
|
0
|
|
|
|
|
|
my ($node) = @_;
|
282
|
0
|
|
|
|
|
|
$node->{$self->{key}} = 'CORBA_string';
|
283
|
|
|
|
|
|
|
}
|
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
#
|
286
|
|
|
|
|
|
|
# See 1.13 Mapping for Wide Strings
|
287
|
|
|
|
|
|
|
#
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
sub visitWideStringType {
|
290
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
291
|
0
|
|
|
|
|
|
my ($node) = @_;
|
292
|
0
|
|
|
|
|
|
$node->{$self->{key}} = 'CORBA_wstring';
|
293
|
|
|
|
|
|
|
}
|
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
#
|
296
|
|
|
|
|
|
|
# See 1.14 Mapping for Fixed
|
297
|
|
|
|
|
|
|
#
|
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
sub visitFixedPtType {
|
300
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
301
|
0
|
|
|
|
|
|
my ($node) = @_;
|
302
|
0
|
|
|
|
|
|
my $name = 'CORBA_fixed_' . $node->{d}->{value} . '_' . $node->{s}->{value};
|
303
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $name;
|
304
|
|
|
|
|
|
|
}
|
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
sub visitFixedPtConstType {
|
307
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
308
|
0
|
|
|
|
|
|
my ($node) = @_;
|
309
|
0
|
|
|
|
|
|
my $name = 'CORBA_fixed';
|
310
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $name;
|
311
|
|
|
|
|
|
|
}
|
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
#
|
314
|
|
|
|
|
|
|
# 3.12 Exception Declaration
|
315
|
|
|
|
|
|
|
#
|
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
sub visitException {
|
318
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
319
|
0
|
|
|
|
|
|
my ($node) = @_;
|
320
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
321
|
0
|
|
|
|
|
|
foreach (@{$node->{list_member}}) {
|
|
0
|
|
|
|
|
|
|
322
|
0
|
|
|
|
|
|
$self->_get_defn($_)->visit($self); # member
|
323
|
|
|
|
|
|
|
}
|
324
|
|
|
|
|
|
|
}
|
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
#
|
327
|
|
|
|
|
|
|
# 3.13 Operation Declaration
|
328
|
|
|
|
|
|
|
#
|
329
|
|
|
|
|
|
|
# See 1.4 Inheritance and Operation Names
|
330
|
|
|
|
|
|
|
#
|
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
sub visitOperation {
|
333
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
334
|
0
|
|
|
|
|
|
my ($node) = @_;
|
335
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $node->{idf};
|
336
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self);
|
337
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) {
|
|
0
|
|
|
|
|
|
|
338
|
0
|
|
|
|
|
|
$_->visit($self); # parameter
|
339
|
|
|
|
|
|
|
}
|
340
|
|
|
|
|
|
|
}
|
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
sub visitParameter {
|
343
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
344
|
0
|
|
|
|
|
|
my ($node) = @_;
|
345
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $node->{idf};
|
346
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self);
|
347
|
|
|
|
|
|
|
}
|
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
sub visitVoidType {
|
350
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
351
|
0
|
|
|
|
|
|
my ($node) = @_;
|
352
|
0
|
|
|
|
|
|
$node->{$self->{key}} = 'void';
|
353
|
|
|
|
|
|
|
}
|
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
#
|
356
|
|
|
|
|
|
|
# 3.14 Attribute Declaration
|
357
|
|
|
|
|
|
|
#
|
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
sub visitAttribute {
|
360
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
361
|
0
|
|
|
|
|
|
my ($node) = @_;
|
362
|
0
|
|
|
|
|
|
$node->{_get}->visit($self);
|
363
|
0
|
0
|
|
|
|
|
$node->{_set}->visit($self) if (exists $node->{_set});
|
364
|
|
|
|
|
|
|
}
|
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
#
|
367
|
|
|
|
|
|
|
# 3.15 Repository Identity Related Declarations
|
368
|
|
|
|
|
|
|
#
|
369
|
|
|
|
|
|
|
|
370
|
0
|
|
|
0
|
0
|
|
sub visitTypeId {
|
371
|
|
|
|
|
|
|
# empty
|
372
|
|
|
|
|
|
|
}
|
373
|
|
|
|
|
|
|
|
374
|
0
|
|
|
0
|
0
|
|
sub visitTypePrefix {
|
375
|
|
|
|
|
|
|
# empty
|
376
|
|
|
|
|
|
|
}
|
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
#
|
379
|
|
|
|
|
|
|
# 3.17 Component Declaration
|
380
|
|
|
|
|
|
|
#
|
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
sub visitProvides {
|
383
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
384
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
385
|
0
|
|
|
|
|
|
my ($node) = @_;
|
386
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
387
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
388
|
|
|
|
|
|
|
}
|
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
sub visitUses {
|
391
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
392
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
393
|
0
|
|
|
|
|
|
my ($node) = @_;
|
394
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
395
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
396
|
|
|
|
|
|
|
}
|
397
|
|
|
|
|
|
|
|
398
|
|
|
|
|
|
|
sub visitPublishes {
|
399
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
400
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
401
|
0
|
|
|
|
|
|
my ($node) = @_;
|
402
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
403
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
404
|
|
|
|
|
|
|
}
|
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
sub visitEmits {
|
407
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
408
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
409
|
0
|
|
|
|
|
|
my ($node) = @_;
|
410
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
411
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
412
|
|
|
|
|
|
|
}
|
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
sub visitConsumes {
|
415
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
416
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
417
|
0
|
|
|
|
|
|
my ($node) = @_;
|
418
|
0
|
0
|
|
|
|
|
return if (exists $node->{$self->{key}});
|
419
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $self->_get_name($node);
|
420
|
|
|
|
|
|
|
}
|
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
#
|
423
|
|
|
|
|
|
|
# 3.18 Home Declaration
|
424
|
|
|
|
|
|
|
#
|
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
sub visitFactory {
|
427
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
428
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
429
|
0
|
|
|
|
|
|
my ($node) = @_;
|
430
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $node->{idf};
|
431
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) {
|
|
0
|
|
|
|
|
|
|
432
|
0
|
|
|
|
|
|
$_->visit($self); # parameter
|
433
|
|
|
|
|
|
|
}
|
434
|
|
|
|
|
|
|
}
|
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
sub visitFinder {
|
437
|
|
|
|
|
|
|
# C mapping is aligned with CORBA 2.1
|
438
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
439
|
0
|
|
|
|
|
|
my ($node) = @_;
|
440
|
0
|
|
|
|
|
|
$node->{$self->{key}} = $node->{idf};
|
441
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) {
|
|
0
|
|
|
|
|
|
|
442
|
0
|
|
|
|
|
|
$_->visit($self); # parameter
|
443
|
|
|
|
|
|
|
}
|
444
|
|
|
|
|
|
|
}
|
445
|
|
|
|
|
|
|
|
446
|
|
|
|
|
|
|
1;
|
447
|
|
|
|
|
|
|
|