Lines 49-55
Link Here
|
49 |
|
49 |
|
50 |
void |
50 |
void |
51 |
IDLType::writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
51 |
IDLType::writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
52 |
IDLTypedef const *activeTypedef = NULL) const{ |
52 |
IDLTypedef const *activeTypedef ) const{ |
53 |
string typespec,dcl; |
53 |
string typespec,dcl; |
54 |
getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef); |
54 |
getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef); |
55 |
ostr |
55 |
ostr |
Lines 64-70
Link Here
|
64 |
|
64 |
|
65 |
void |
65 |
void |
66 |
IDLType::writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
66 |
IDLType::writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
67 |
IDLTypedef const *activeTypedef = NULL) const{ |
67 |
IDLTypedef const *activeTypedef ) const{ |
68 |
string typespec,dcl; |
68 |
string typespec,dcl; |
69 |
getCPPStubDeclarator(IDL_PARAM_IN,"param",typespec,dcl,activeTypedef); |
69 |
getCPPStubDeclarator(IDL_PARAM_IN,"param",typespec,dcl,activeTypedef); |
70 |
ostr |
70 |
ostr |
Lines 82-88
Link Here
|
82 |
|
82 |
|
83 |
void |
83 |
void |
84 |
IDLType::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
84 |
IDLType::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
85 |
IDLTypedef const *activeTypedef = NULL) const{ |
85 |
IDLTypedef const *activeTypedef ) const{ |
86 |
} |
86 |
} |
87 |
|
87 |
|
88 |
IDLType const & |
88 |
IDLType const & |
Lines 118-147
Link Here
|
118 |
|
118 |
|
119 |
// misc stuff |
119 |
// misc stuff |
120 |
void getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
120 |
void getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
121 |
IDLTypedef const *activeTypedef = NULL) const { |
121 |
IDLTypedef const *activeTypedef ) const { |
122 |
throw IDLExVoid(); |
122 |
throw IDLExVoid(); |
123 |
} |
123 |
} |
124 |
void writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
124 |
void writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
125 |
IDLElement &dest,IDLScope const &scope, |
125 |
IDLElement &dest,IDLScope const &scope, |
126 |
IDLTypedef const *activeTypedef = NULL) const { |
126 |
IDLTypedef const *activeTypedef ) const { |
127 |
throw IDLExVoid(); |
127 |
throw IDLExVoid(); |
128 |
} |
128 |
} |
129 |
|
129 |
|
130 |
// struct / exception stuff |
130 |
// struct / exception stuff |
131 |
void getCPPStructCtorDeclarator(string const &id,string &typespec, string &dcl, |
131 |
void getCPPStructCtorDeclarator(string const &id,string &typespec, string &dcl, |
132 |
IDLTypedef const *activeTypedef = NULL) const { |
132 |
IDLTypedef const *activeTypedef ) const { |
133 |
throw IDLExVoid(); |
133 |
throw IDLExVoid(); |
134 |
} |
134 |
} |
135 |
void writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
135 |
void writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
136 |
IDLTypedef const *activeTypedef = NULL) const { |
136 |
IDLTypedef const *activeTypedef ) const { |
137 |
throw IDLExVoid(); |
137 |
throw IDLExVoid(); |
138 |
} |
138 |
} |
139 |
void writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
139 |
void writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
140 |
IDLTypedef const *activeTypedef = NULL) const { |
140 |
IDLTypedef const *activeTypedef ) const { |
141 |
throw IDLExVoid(); |
141 |
throw IDLExVoid(); |
142 |
} |
142 |
} |
143 |
void writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
143 |
void writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
144 |
IDLTypedef const *activeTypedef = NULL) const { |
144 |
IDLTypedef const *activeTypedef ) const { |
145 |
throw IDLExVoid(); |
145 |
throw IDLExVoid(); |
146 |
} |
146 |
} |
147 |
|
147 |
|
Lines 158-225
Link Here
|
158 |
} |
158 |
} |
159 |
void writeCPPStubMarshalCode(IDL_param_attr attr,string const &id, |
159 |
void writeCPPStubMarshalCode(IDL_param_attr attr,string const &id, |
160 |
ostream &ostr, Indent &indent, |
160 |
ostream &ostr, Indent &indent, |
161 |
IDLTypedef const *activeTypedef = NULL) const { |
161 |
IDLTypedef const *activeTypedef ) const { |
162 |
throw IDLExVoid(); |
162 |
throw IDLExVoid(); |
163 |
} |
163 |
} |
164 |
string getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
164 |
string getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
165 |
IDLTypedef const *activeTypedef = NULL) const { |
165 |
IDLTypedef const *activeTypedef ) const { |
166 |
throw IDLExVoid(); |
166 |
throw IDLExVoid(); |
167 |
} |
167 |
} |
168 |
void writeCPPStubDemarshalCode(IDL_param_attr attr,string const &id, |
168 |
void writeCPPStubDemarshalCode(IDL_param_attr attr,string const &id, |
169 |
ostream &ostr,Indent &indent, |
169 |
ostream &ostr,Indent &indent, |
170 |
IDLTypedef const *activeTypedef = NULL) const { |
170 |
IDLTypedef const *activeTypedef ) const { |
171 |
throw IDLExVoid(); |
171 |
throw IDLExVoid(); |
172 |
} |
172 |
} |
173 |
|
173 |
|
174 |
// stub return stuff |
174 |
// stub return stuff |
175 |
void getCPPStubReturnDeclarator(string const &id,string &typespec, string &dcl, |
175 |
void getCPPStubReturnDeclarator(string const &id,string &typespec, string &dcl, |
176 |
IDLTypedef const *activeTypedef = NULL) const { |
176 |
IDLTypedef const *activeTypedef ) const { |
177 |
typespec = "void"; |
177 |
typespec = "void"; |
178 |
dcl = id; |
178 |
dcl = id; |
179 |
} |
179 |
} |
180 |
void writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
180 |
void writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
181 |
IDLTypedef const *activeTypedef = NULL) const { |
181 |
IDLTypedef const *activeTypedef ) const { |
182 |
} |
182 |
} |
183 |
string getCPPStubReturnAssignment() const { |
183 |
string getCPPStubReturnAssignment() const { |
184 |
return ""; |
184 |
return ""; |
185 |
} |
185 |
} |
186 |
void writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
186 |
void writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
187 |
IDLTypedef const *activeTypedef = NULL) const { |
187 |
IDLTypedef const *activeTypedef ) const { |
188 |
} |
188 |
} |
189 |
|
189 |
|
190 |
// skel stuff |
190 |
// skel stuff |
191 |
void getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
191 |
void getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
192 |
IDLTypedef const *activeTypedef = NULL) const { |
192 |
IDLTypedef const *activeTypedef ) const { |
193 |
throw IDLExVoid(); |
193 |
throw IDLExVoid(); |
194 |
} |
194 |
} |
195 |
void writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
195 |
void writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
196 |
IDLTypedef const *activeTypedef = NULL) const { |
196 |
IDLTypedef const *activeTypedef ) const { |
197 |
throw IDLExVoid(); |
197 |
throw IDLExVoid(); |
198 |
} |
198 |
} |
199 |
string getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
199 |
string getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
200 |
IDLTypedef const *activeTypedef = NULL) const { |
200 |
IDLTypedef const *activeTypedef ) const { |
201 |
throw IDLExVoid(); |
201 |
throw IDLExVoid(); |
202 |
} |
202 |
} |
203 |
void writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
203 |
void writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
204 |
IDLTypedef const *activeTypedef = NULL) const { |
204 |
IDLTypedef const *activeTypedef ) const { |
205 |
throw IDLExVoid(); |
205 |
throw IDLExVoid(); |
206 |
} |
206 |
} |
207 |
|
207 |
|
208 |
// skel return stuff |
208 |
// skel return stuff |
209 |
void getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
209 |
void getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
210 |
IDLTypedef const *activeTypedef = NULL) const { |
210 |
IDLTypedef const *activeTypedef ) const { |
211 |
typespec = "void"; |
211 |
typespec = "void"; |
212 |
dcl = id; |
212 |
dcl = id; |
213 |
} |
213 |
} |
214 |
void writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
214 |
void writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
215 |
IDLTypedef const *activeTypedef = NULL) const { |
215 |
IDLTypedef const *activeTypedef ) const { |
216 |
} |
216 |
} |
217 |
string getCPPSkelReturnAssignment(bool passthru, |
217 |
string getCPPSkelReturnAssignment(bool passthru, |
218 |
IDLTypedef const *activeTypedef = NULL) const { |
218 |
IDLTypedef const *activeTypedef ) const { |
219 |
return ""; |
219 |
return ""; |
220 |
} |
220 |
} |
221 |
void writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
221 |
void writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
222 |
IDLTypedef const *activeTypedef = NULL) const { |
222 |
IDLTypedef const *activeTypedef ) const { |
223 |
} |
223 |
} |
224 |
string getInvalidReturn() const { |
224 |
string getInvalidReturn() const { |
225 |
return "return;"; |
225 |
return "return;"; |
Lines 245-257
Link Here
|
245 |
|
245 |
|
246 |
// misc stuff |
246 |
// misc stuff |
247 |
void getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
247 |
void getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
248 |
IDLTypedef const *activeTypedef = NULL) const { |
248 |
IDLTypedef const *activeTypedef ) const { |
249 |
typespec = IDL_CORBA_NS "::String_mgr"; |
249 |
typespec = IDL_CORBA_NS "::String_mgr"; |
250 |
dcl = id; |
250 |
dcl = id; |
251 |
} |
251 |
} |
252 |
void writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
252 |
void writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
253 |
IDLElement &dest,IDLScope const &scope, |
253 |
IDLElement &dest,IDLScope const &scope, |
254 |
IDLTypedef const *activeTypedef = NULL) const { |
254 |
IDLTypedef const *activeTypedef ) const { |
255 |
ostr |
255 |
ostr |
256 |
<< indent << "typedef char *" << ' ' |
256 |
<< indent << "typedef char *" << ' ' |
257 |
<< dest.getCPPIdentifier() << ';' << endl; |
257 |
<< dest.getCPPIdentifier() << ';' << endl; |
Lines 263-283
Link Here
|
263 |
|
263 |
|
264 |
// struct / exception stuff |
264 |
// struct / exception stuff |
265 |
void getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
265 |
void getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
266 |
IDLTypedef const *activeTypedef = NULL) const { |
266 |
IDLTypedef const *activeTypedef ) const { |
267 |
typespec = "char const"; |
267 |
typespec = "char const"; |
268 |
dcl = "*_par_" + id; |
268 |
dcl = "*_par_" + id; |
269 |
} |
269 |
} |
270 |
void writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
270 |
void writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
271 |
IDLTypedef const *activeTypedef = NULL) const { |
271 |
IDLTypedef const *activeTypedef ) const { |
272 |
ostr << indent << id << " = _par_" << id << ';' << endl; |
272 |
ostr << indent << id << " = _par_" << id << ';' << endl; |
273 |
} |
273 |
} |
274 |
void writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
274 |
void writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
275 |
IDLTypedef const *activeTypedef = NULL) const { |
275 |
IDLTypedef const *activeTypedef ) const { |
276 |
ostr << indent << "_cstruct." << id |
276 |
ostr << indent << "_cstruct." << id |
277 |
<< " = " IDL_CORBA_NS "::string_dup("<< id << ");" << endl; |
277 |
<< " = " IDL_CORBA_NS "::string_dup("<< id << ");" << endl; |
278 |
} |
278 |
} |
279 |
void writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
279 |
void writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
280 |
IDLTypedef const *activeTypedef = NULL) const { |
280 |
IDLTypedef const *activeTypedef ) const { |
281 |
ostr << indent << id |
281 |
ostr << indent << id |
282 |
<< " = " IDL_CORBA_NS "::string_dup(_cstruct." << id << ");" << endl; |
282 |
<< " = " IDL_CORBA_NS "::string_dup(_cstruct." << id << ");" << endl; |
283 |
} |
283 |
} |
Lines 285-291
Link Here
|
285 |
|
285 |
|
286 |
void |
286 |
void |
287 |
writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
287 |
writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
288 |
IDLTypedef const *activeTypedef = NULL) const{ |
288 |
IDLTypedef const *activeTypedef ) const{ |
289 |
ostr |
289 |
ostr |
290 |
<< indent << "void " << id << "(char const *param){" << endl; |
290 |
<< indent << "void " << id << "(char const *param){" << endl; |
291 |
ostr |
291 |
ostr |
Lines 321-327
Link Here
|
321 |
|
321 |
|
322 |
void |
322 |
void |
323 |
writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
323 |
writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
324 |
IDLTypedef const *activeTypedef = NULL) const{ |
324 |
IDLTypedef const *activeTypedef ) const{ |
325 |
ostr |
325 |
ostr |
326 |
<< indent << "char const *" << id << "() const {" << endl; |
326 |
<< indent << "char const *" << id << "() const {" << endl; |
327 |
ostr |
327 |
ostr |
Lines 357-363
Link Here
|
357 |
} |
357 |
} |
358 |
} |
358 |
} |
359 |
string getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
359 |
string getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
360 |
IDLTypedef const *activeTypedef = NULL) const { |
360 |
IDLTypedef const *activeTypedef ) const { |
361 |
switch (attr) { |
361 |
switch (attr) { |
362 |
case IDL_PARAM_INOUT: |
362 |
case IDL_PARAM_INOUT: |
363 |
return "&"+id; |
363 |
return "&"+id; |
Lines 370-418
Link Here
|
370 |
|
370 |
|
371 |
// stub return stuff |
371 |
// stub return stuff |
372 |
void getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
372 |
void getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
373 |
IDLTypedef const *activeTypedef = NULL) const { |
373 |
IDLTypedef const *activeTypedef ) const { |
374 |
typespec = "char"; |
374 |
typespec = "char"; |
375 |
dcl = "*" + id; |
375 |
dcl = "*" + id; |
376 |
} |
376 |
} |
377 |
void writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
377 |
void writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
378 |
IDLTypedef const *activeTypedef = NULL) const { |
378 |
IDLTypedef const *activeTypedef ) const { |
379 |
ostr << indent << "char *_retval = NULL;" << endl; |
379 |
ostr << indent << "char *_retval = NULL;" << endl; |
380 |
} |
380 |
} |
381 |
string getCPPStubReturnAssignment() const { |
381 |
string getCPPStubReturnAssignment() const { |
382 |
return "_retval = "; |
382 |
return "_retval = "; |
383 |
} |
383 |
} |
384 |
void writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
384 |
void writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
385 |
IDLTypedef const *activeTypedef = NULL) const { |
385 |
IDLTypedef const *activeTypedef ) const { |
386 |
ostr << indent << "return _retval;" << endl; |
386 |
ostr << indent << "return _retval;" << endl; |
387 |
} |
387 |
} |
388 |
|
388 |
|
389 |
// skel stuff |
389 |
// skel stuff |
390 |
void getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
390 |
void getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
391 |
IDLTypedef const *activeTypedef = NULL) const { |
391 |
IDLTypedef const *activeTypedef ) const { |
392 |
typespec = attr == IDL_PARAM_IN ? "char const" : "char"; |
392 |
typespec = attr == IDL_PARAM_IN ? "char const" : "char"; |
393 |
dcl = attr == IDL_PARAM_IN ? "*"+id : "**"+id; |
393 |
dcl = attr == IDL_PARAM_IN ? "*"+id : "**"+id; |
394 |
} |
394 |
} |
395 |
string getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
395 |
string getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
396 |
IDLTypedef const *activeTypedef = NULL) const { |
396 |
IDLTypedef const *activeTypedef ) const { |
397 |
return attr == IDL_PARAM_IN ? id : "*"+id; |
397 |
return attr == IDL_PARAM_IN ? id : "*"+id; |
398 |
} |
398 |
} |
399 |
|
399 |
|
400 |
// skel return stuff |
400 |
// skel return stuff |
401 |
void getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
401 |
void getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
402 |
IDLTypedef const *activeTypedef = NULL) const { |
402 |
IDLTypedef const *activeTypedef ) const { |
403 |
typespec = "char"; |
403 |
typespec = "char"; |
404 |
dcl = "*"+id; |
404 |
dcl = "*"+id; |
405 |
} |
405 |
} |
406 |
void writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
406 |
void writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
407 |
IDLTypedef const *activeTypedef = NULL) const { |
407 |
IDLTypedef const *activeTypedef ) const { |
408 |
ostr << indent << "char *_retval = NULL;" << endl; |
408 |
ostr << indent << "char *_retval = NULL;" << endl; |
409 |
} |
409 |
} |
410 |
string getCPPSkelReturnAssignment(bool passthru, |
410 |
string getCPPSkelReturnAssignment(bool passthru, |
411 |
IDLTypedef const *activeTypedef = NULL) const { |
411 |
IDLTypedef const *activeTypedef ) const { |
412 |
return "_retval = "; |
412 |
return "_retval = "; |
413 |
} |
413 |
} |
414 |
void writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
414 |
void writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
415 |
IDLTypedef const *activeTypedef = NULL) const { |
415 |
IDLTypedef const *activeTypedef ) const { |
416 |
ostr << indent << "return _retval;" << endl; |
416 |
ostr << indent << "return _retval;" << endl; |
417 |
} |
417 |
} |
418 |
string getInvalidReturn() const { |
418 |
string getInvalidReturn() const { |
Lines 523-534
Link Here
|
523 |
return true; |
523 |
return true; |
524 |
} |
524 |
} |
525 |
void getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
525 |
void getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
526 |
IDLTypedef const *activeTypedef = NULL) const { |
526 |
IDLTypedef const *activeTypedef ) const { |
527 |
typespec = "const " + getTypeName() + "&"; |
527 |
typespec = "const " + getTypeName() + "&"; |
528 |
dcl = "_par_" + id; |
528 |
dcl = "_par_" + id; |
529 |
} |
529 |
} |
530 |
void writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
530 |
void writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
531 |
IDLTypedef const *activeTypedef = NULL) const { |
531 |
IDLTypedef const *activeTypedef ) const { |
532 |
ostr << indent << id << " = _par_" << id << ';' << endl; |
532 |
ostr << indent << id << " = _par_" << id << ';' << endl; |
533 |
} |
533 |
} |
534 |
void getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
534 |
void getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
Lines 549-555
Link Here
|
549 |
} |
549 |
} |
550 |
} |
550 |
} |
551 |
string getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
551 |
string getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
552 |
IDLTypedef const *activeTypedef = NULL) const { |
552 |
IDLTypedef const *activeTypedef ) const { |
553 |
string retval; |
553 |
string retval; |
554 |
switch (attr) { |
554 |
switch (attr) { |
555 |
case IDL_PARAM_IN: |
555 |
case IDL_PARAM_IN: |
Lines 565-590
Link Here
|
565 |
|
565 |
|
566 |
// stub return stuff |
566 |
// stub return stuff |
567 |
void getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
567 |
void getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
568 |
IDLTypedef const *activeTypedef = NULL) const { |
568 |
IDLTypedef const *activeTypedef ) const { |
569 |
typespec = IDL_CORBA_NS "::Any"; |
569 |
typespec = IDL_CORBA_NS "::Any"; |
570 |
dcl = "*" + id; |
570 |
dcl = "*" + id; |
571 |
} |
571 |
} |
572 |
void writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
572 |
void writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
573 |
IDLTypedef const *activeTypedef = NULL) const { |
573 |
IDLTypedef const *activeTypedef ) const { |
574 |
ostr << indent << "CORBA_any *_retval = NULL;" << endl; |
574 |
ostr << indent << "CORBA_any *_retval = NULL;" << endl; |
575 |
} |
575 |
} |
576 |
string getCPPStubReturnAssignment() const { |
576 |
string getCPPStubReturnAssignment() const { |
577 |
return "_retval = "; |
577 |
return "_retval = "; |
578 |
} |
578 |
} |
579 |
void writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
579 |
void writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
580 |
IDLTypedef const *activeTypedef = NULL) const { |
580 |
IDLTypedef const *activeTypedef ) const { |
581 |
ostr << indent << "return " |
581 |
ostr << indent << "return " |
582 |
<< idlGetCast("_retval", IDL_CORBA_NS "::Any*" ) << ";" << endl; |
582 |
<< idlGetCast("_retval", IDL_CORBA_NS "::Any*" ) << ";" << endl; |
583 |
} |
583 |
} |
584 |
|
584 |
|
585 |
// skel stuff |
585 |
// skel stuff |
586 |
void getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
586 |
void getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
587 |
IDLTypedef const *activeTypedef = NULL) const { |
587 |
IDLTypedef const *activeTypedef ) const { |
588 |
switch( attr ) { |
588 |
switch( attr ) { |
589 |
case IDL_PARAM_IN: |
589 |
case IDL_PARAM_IN: |
590 |
typespec = "const CORBA_any"; |
590 |
typespec = "const CORBA_any"; |
Lines 600-606
Link Here
|
600 |
} |
600 |
} |
601 |
} |
601 |
} |
602 |
string getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
602 |
string getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
603 |
IDLTypedef const *activeTypedef = NULL) const { |
603 |
IDLTypedef const *activeTypedef ) const { |
604 |
switch(attr) { |
604 |
switch(attr) { |
605 |
case IDL_PARAM_IN: |
605 |
case IDL_PARAM_IN: |
606 |
return idlGetCast("*"+id, "const " IDL_CORBA_NS "::Any&"); |
606 |
return idlGetCast("*"+id, "const " IDL_CORBA_NS "::Any&"); |
Lines 613-632
Link Here
|
613 |
|
613 |
|
614 |
// skel return stuff |
614 |
// skel return stuff |
615 |
void getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
615 |
void getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
616 |
IDLTypedef const *activeTypedef = NULL) const { |
616 |
IDLTypedef const *activeTypedef ) const { |
617 |
typespec = "CORBA_any"; |
617 |
typespec = "CORBA_any"; |
618 |
dcl = "*"+id; |
618 |
dcl = "*"+id; |
619 |
} |
619 |
} |
620 |
void writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
620 |
void writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
621 |
IDLTypedef const *activeTypedef = NULL) const { |
621 |
IDLTypedef const *activeTypedef ) const { |
622 |
ostr << indent << IDL_CORBA_NS "::Any *_retval = NULL;" << endl; |
622 |
ostr << indent << IDL_CORBA_NS "::Any *_retval = NULL;" << endl; |
623 |
} |
623 |
} |
624 |
string getCPPSkelReturnAssignment(bool passthru, |
624 |
string getCPPSkelReturnAssignment(bool passthru, |
625 |
IDLTypedef const *activeTypedef = NULL) const { |
625 |
IDLTypedef const *activeTypedef ) const { |
626 |
return "_retval = "; |
626 |
return "_retval = "; |
627 |
} |
627 |
} |
628 |
void writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
628 |
void writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
629 |
IDLTypedef const *activeTypedef = NULL) const { |
629 |
IDLTypedef const *activeTypedef ) const { |
630 |
ostr << indent << "return " |
630 |
ostr << indent << "return " |
631 |
<< idlGetCast( "_retval", "CORBA_any*") << ";" << endl; |
631 |
<< idlGetCast( "_retval", "CORBA_any*") << ";" << endl; |
632 |
} |
632 |
} |
Lines 712-718
Link Here
|
712 |
|
712 |
|
713 |
void |
713 |
void |
714 |
IDLArray::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
714 |
IDLArray::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
715 |
IDLTypedef const *activeTypedef = NULL) const { |
715 |
IDLTypedef const *activeTypedef ) const { |
716 |
if( activeTypedef ) { |
716 |
if( activeTypedef ) { |
717 |
typespec = activeTypedef->getQualifiedCPPIdentifier(activeTypedef->getRootScope()); |
717 |
typespec = activeTypedef->getQualifiedCPPIdentifier(activeTypedef->getRootScope()); |
718 |
dcl = id; |
718 |
dcl = id; |
Lines 730-736
Link Here
|
730 |
void |
730 |
void |
731 |
IDLArray::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
731 |
IDLArray::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
732 |
IDLElement &dest,IDLScope const &scope, |
732 |
IDLElement &dest,IDLScope const &scope, |
733 |
IDLTypedef const *activeTypedef = NULL) const { |
733 |
IDLTypedef const *activeTypedef ) const { |
734 |
|
734 |
|
735 |
string typespec,dcl,str_static=""; |
735 |
string typespec,dcl,str_static=""; |
736 |
m_elementType.getCPPMemberDeclarator("",typespec,dcl); |
736 |
m_elementType.getCPPMemberDeclarator("",typespec,dcl); |
Lines 858-864
Link Here
|
858 |
|
858 |
|
859 |
void |
859 |
void |
860 |
IDLArray::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
860 |
IDLArray::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
861 |
IDLTypedef const *activeTypedef = NULL) const { |
861 |
IDLTypedef const *activeTypedef ) const { |
862 |
getCPPMemberDeclarator(id, typespec, dcl, activeTypedef); |
862 |
getCPPMemberDeclarator(id, typespec, dcl, activeTypedef); |
863 |
typespec = "const " + typespec; |
863 |
typespec = "const " + typespec; |
864 |
dcl = "_par_" + dcl; |
864 |
dcl = "_par_" + dcl; |
Lines 866-872
Link Here
|
866 |
|
866 |
|
867 |
void |
867 |
void |
868 |
IDLArray::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
868 |
IDLArray::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
869 |
IDLTypedef const *activeTypedef = NULL) const { |
869 |
IDLTypedef const *activeTypedef ) const { |
870 |
if(activeTypedef) { |
870 |
if(activeTypedef) { |
871 |
ostr |
871 |
ostr |
872 |
<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy(" |
872 |
<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy(" |
Lines 878-884
Link Here
|
878 |
|
878 |
|
879 |
void |
879 |
void |
880 |
IDLArray::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
880 |
IDLArray::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
881 |
IDLTypedef const *activeTypedef = NULL) const { |
881 |
IDLTypedef const *activeTypedef ) const { |
882 |
if( activeTypedef ) { |
882 |
if( activeTypedef ) { |
883 |
ostr |
883 |
ostr |
884 |
<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy(" |
884 |
<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy(" |
Lines 895-901
Link Here
|
895 |
|
895 |
|
896 |
void |
896 |
void |
897 |
IDLArray::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
897 |
IDLArray::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
898 |
IDLTypedef const *activeTypedef = NULL) const { |
898 |
IDLTypedef const *activeTypedef ) const { |
899 |
if( activeTypedef ) { |
899 |
if( activeTypedef ) { |
900 |
ostr |
900 |
ostr |
901 |
<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy(" |
901 |
<< indent << activeTypedef->getQualifiedCPPIdentifier() << "_copy(" |
Lines 915-921
Link Here
|
915 |
|
915 |
|
916 |
void |
916 |
void |
917 |
IDLArray::writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
917 |
IDLArray::writeUnionModifiers(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
918 |
IDLTypedef const *activeTypedef = NULL) const{ |
918 |
IDLTypedef const *activeTypedef ) const{ |
919 |
string typespec,dcl; |
919 |
string typespec,dcl; |
920 |
getCPPStubDeclarator(IDL_PARAM_IN,"param",typespec,dcl,activeTypedef); |
920 |
getCPPStubDeclarator(IDL_PARAM_IN,"param",typespec,dcl,activeTypedef); |
921 |
ostr |
921 |
ostr |
Lines 935-941
Link Here
|
935 |
|
935 |
|
936 |
void |
936 |
void |
937 |
IDLArray::writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
937 |
IDLArray::writeUnionAccessors(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
938 |
IDLTypedef const *activeTypedef = NULL) const{ |
938 |
IDLTypedef const *activeTypedef ) const{ |
939 |
string typespec,dcl; |
939 |
string typespec,dcl; |
940 |
g_assert(activeTypedef); |
940 |
g_assert(activeTypedef); |
941 |
getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef); |
941 |
getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef); |
Lines 951-957
Link Here
|
951 |
|
951 |
|
952 |
void |
952 |
void |
953 |
IDLArray::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
953 |
IDLArray::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
954 |
IDLTypedef const *activeTypedef = NULL) const{ |
954 |
IDLTypedef const *activeTypedef ) const{ |
955 |
string typespec,dcl; |
955 |
string typespec,dcl; |
956 |
g_assert(activeTypedef); |
956 |
g_assert(activeTypedef); |
957 |
getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef); |
957 |
getCPPStubDeclarator(IDL_PARAM_IN,"",typespec,dcl,activeTypedef); |
Lines 969-975
Link Here
|
969 |
// stub stuff |
969 |
// stub stuff |
970 |
void |
970 |
void |
971 |
IDLArray::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
971 |
IDLArray::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
972 |
IDLTypedef const *activeTypedef=NULL) const { |
972 |
IDLTypedef const *activeTypedef) const { |
973 |
typespec = attr == IDL_PARAM_IN ? "const " : ""; |
973 |
typespec = attr == IDL_PARAM_IN ? "const " : ""; |
974 |
typespec += activeTypedef ? |
974 |
typespec += activeTypedef ? |
975 |
activeTypedef->getQualifiedCPPIdentifier() : getTypeName(); |
975 |
activeTypedef->getQualifiedCPPIdentifier() : getTypeName(); |
Lines 980-986
Link Here
|
980 |
|
980 |
|
981 |
void |
981 |
void |
982 |
IDLArray::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
982 |
IDLArray::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
983 |
IDLTypedef const *activeTypedef = NULL) const { |
983 |
IDLTypedef const *activeTypedef ) const { |
984 |
g_assert(activeTypedef); |
984 |
g_assert(activeTypedef); |
985 |
typespec = attr == IDL_PARAM_IN ? "const " : ""; |
985 |
typespec = attr == IDL_PARAM_IN ? "const " : ""; |
986 |
typespec += activeTypedef->getNSScopedCTypeName(); |
986 |
typespec += activeTypedef->getNSScopedCTypeName(); |
Lines 993-999
Link Here
|
993 |
|
993 |
|
994 |
void |
994 |
void |
995 |
IDLArray::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
995 |
IDLArray::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
996 |
IDLTypedef const *activeTypedef = NULL) const { |
996 |
IDLTypedef const *activeTypedef ) const { |
997 |
g_assert(activeTypedef); |
997 |
g_assert(activeTypedef); |
998 |
typespec = activeTypedef->getQualifiedCPPIdentifier() + "_slice"; |
998 |
typespec = activeTypedef->getQualifiedCPPIdentifier() + "_slice"; |
999 |
dcl = "*" + id; |
999 |
dcl = "*" + id; |
Lines 1001-1007
Link Here
|
1001 |
|
1001 |
|
1002 |
void |
1002 |
void |
1003 |
IDLArray::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
1003 |
IDLArray::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
1004 |
IDLTypedef const *activeTypedef = NULL) const { |
1004 |
IDLTypedef const *activeTypedef ) const { |
1005 |
g_assert(activeTypedef); |
1005 |
g_assert(activeTypedef); |
1006 |
typespec = activeTypedef->getNSScopedCTypeName() + "_slice"; |
1006 |
typespec = activeTypedef->getNSScopedCTypeName() + "_slice"; |
1007 |
dcl = "*" + id; |
1007 |
dcl = "*" + id; |
Lines 1010-1016
Link Here
|
1010 |
|
1010 |
|
1011 |
string |
1011 |
string |
1012 |
IDLArray::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
1012 |
IDLArray::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
1013 |
IDLTypedef const *activeTypedef = NULL) const { |
1013 |
IDLTypedef const *activeTypedef ) const { |
1014 |
string typespec,dcl; |
1014 |
string typespec,dcl; |
1015 |
getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef); |
1015 |
getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef); |
1016 |
|
1016 |
|
Lines 1026-1032
Link Here
|
1026 |
|
1026 |
|
1027 |
string |
1027 |
string |
1028 |
IDLArray::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
1028 |
IDLArray::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
1029 |
IDLTypedef const *activeTypedef = NULL) const { |
1029 |
IDLTypedef const *activeTypedef ) const { |
1030 |
string typespec,dcl; |
1030 |
string typespec,dcl; |
1031 |
getCPPStubDeclarator(attr,"",typespec,dcl,activeTypedef); |
1031 |
getCPPStubDeclarator(attr,"",typespec,dcl,activeTypedef); |
1032 |
string term; |
1032 |
string term; |
Lines 1088-1094
Link Here
|
1088 |
void |
1088 |
void |
1089 |
IDLInterface::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
1089 |
IDLInterface::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
1090 |
IDLElement &dest,IDLScope const &scope, |
1090 |
IDLElement &dest,IDLScope const &scope, |
1091 |
IDLTypedef const *activeTypedef = NULL) const { |
1091 |
IDLTypedef const *activeTypedef ) const { |
1092 |
string id = dest.getCPPIdentifier(); |
1092 |
string id = dest.getCPPIdentifier(); |
1093 |
ostr |
1093 |
ostr |
1094 |
<< indent << "typedef " << getCPPIdentifier() << ' ' << id << ';' << endl |
1094 |
<< indent << "typedef " << getCPPIdentifier() << ' ' << id << ';' << endl |
Lines 1124-1130
Link Here
|
1124 |
|
1124 |
|
1125 |
void |
1125 |
void |
1126 |
IDLInterface::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
1126 |
IDLInterface::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
1127 |
IDLTypedef const *activeTypedef = NULL) const { |
1127 |
IDLTypedef const *activeTypedef ) const { |
1128 |
ostr |
1128 |
ostr |
1129 |
<< indent << IDL_IMPL_NS "::release_guarded(_cstruct." << id << ");" << endl |
1129 |
<< indent << IDL_IMPL_NS "::release_guarded(_cstruct." << id << ");" << endl |
1130 |
<< indent << "_cstruct." << id << " = " |
1130 |
<< indent << "_cstruct." << id << " = " |
Lines 1136-1142
Link Here
|
1136 |
|
1136 |
|
1137 |
void |
1137 |
void |
1138 |
IDLInterface::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
1138 |
IDLInterface::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
1139 |
IDLTypedef const *activeTypedef = NULL) const { |
1139 |
IDLTypedef const *activeTypedef ) const { |
1140 |
ostr |
1140 |
ostr |
1141 |
<< id << " = " |
1141 |
<< id << " = " |
1142 |
<< getQualifiedCPPCast(IDL_IMPL_NS "::duplicate_guarded(_cstruct."+id+")") |
1142 |
<< getQualifiedCPPCast(IDL_IMPL_NS "::duplicate_guarded(_cstruct."+id+")") |
Lines 1148-1154
Link Here
|
1148 |
|
1148 |
|
1149 |
void |
1149 |
void |
1150 |
IDLInterface::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1150 |
IDLInterface::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1151 |
IDLTypedef const *activeTypedef=NULL) const { |
1151 |
IDLTypedef const *activeTypedef) const { |
1152 |
dcl = id; |
1152 |
dcl = id; |
1153 |
|
1153 |
|
1154 |
switch (attr) { |
1154 |
switch (attr) { |
Lines 1169-1175
Link Here
|
1169 |
|
1169 |
|
1170 |
string |
1170 |
string |
1171 |
IDLInterface::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
1171 |
IDLInterface::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
1172 |
IDLTypedef const *activeTypedef = NULL) const { |
1172 |
IDLTypedef const *activeTypedef ) const { |
1173 |
string ctype = getNSScopedCTypeName(); |
1173 |
string ctype = getNSScopedCTypeName(); |
1174 |
|
1174 |
|
1175 |
switch (attr) { |
1175 |
switch (attr) { |
Lines 1186-1192
Link Here
|
1186 |
|
1186 |
|
1187 |
void |
1187 |
void |
1188 |
IDLInterface::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
1188 |
IDLInterface::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
1189 |
IDLTypedef const *activeTypedef = NULL) const { |
1189 |
IDLTypedef const *activeTypedef ) const { |
1190 |
// must return stub ptr and not ptr in order to work when smart pointers are used |
1190 |
// must return stub ptr and not ptr in order to work when smart pointers are used |
1191 |
ostr |
1191 |
ostr |
1192 |
<< indent << "return reinterpret_cast< " << getQualifiedCPPStub() << " *>(_retval);" << endl; |
1192 |
<< indent << "return reinterpret_cast< " << getQualifiedCPPStub() << " *>(_retval);" << endl; |
Lines 1196-1202
Link Here
|
1196 |
|
1196 |
|
1197 |
void |
1197 |
void |
1198 |
IDLInterface::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1198 |
IDLInterface::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1199 |
IDLTypedef const *activeTypedef = NULL) const { |
1199 |
IDLTypedef const *activeTypedef ) const { |
1200 |
typespec = getNSScopedCTypeName(); |
1200 |
typespec = getNSScopedCTypeName(); |
1201 |
|
1201 |
|
1202 |
switch (attr) { |
1202 |
switch (attr) { |
Lines 1217-1223
Link Here
|
1217 |
|
1217 |
|
1218 |
void |
1218 |
void |
1219 |
IDLInterface::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1219 |
IDLInterface::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1220 |
IDLTypedef const *activeTypedef = NULL) const { |
1220 |
IDLTypedef const *activeTypedef ) const { |
1221 |
switch (attr) { |
1221 |
switch (attr) { |
1222 |
case IDL_PARAM_IN: |
1222 |
case IDL_PARAM_IN: |
1223 |
ostr |
1223 |
ostr |
Lines 1245-1251
Link Here
|
1245 |
|
1245 |
|
1246 |
void |
1246 |
void |
1247 |
IDLInterface::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1247 |
IDLInterface::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1248 |
IDLTypedef const *activeTypedef = NULL) const { |
1248 |
IDLTypedef const *activeTypedef ) const { |
1249 |
string ptrname = " _" + id + "_ptr"; |
1249 |
string ptrname = " _" + id + "_ptr"; |
1250 |
switch (attr) { |
1250 |
switch (attr) { |
1251 |
case IDL_PARAM_INOUT: |
1251 |
case IDL_PARAM_INOUT: |
Lines 1260-1266
Link Here
|
1260 |
|
1260 |
|
1261 |
void |
1261 |
void |
1262 |
IDLInterface::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
1262 |
IDLInterface::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
1263 |
IDLTypedef const *activeTypedef = NULL) const { |
1263 |
IDLTypedef const *activeTypedef ) const { |
1264 |
if (passthru) |
1264 |
if (passthru) |
1265 |
ostr << indent << "return _retval;" << endl; |
1265 |
ostr << indent << "return _retval;" << endl; |
1266 |
else { |
1266 |
else { |
Lines 1364-1370
Link Here
|
1364 |
return "CORBA::Object"; |
1364 |
return "CORBA::Object"; |
1365 |
} |
1365 |
} |
1366 |
|
1366 |
|
1367 |
virtual string getQualifiedCPPStub(IDLScope const *up_to = NULL) const { |
1367 |
virtual string getQualifiedCPPStub(IDLScope const *up_to ) const { |
1368 |
// fixme - doesn't do the scope thing |
1368 |
// fixme - doesn't do the scope thing |
1369 |
return "CORBA::Object"; |
1369 |
return "CORBA::Object"; |
1370 |
} |
1370 |
} |
Lines 1383-1398
Link Here
|
1383 |
return "CORBA::Object_out"; |
1383 |
return "CORBA::Object_out"; |
1384 |
} |
1384 |
} |
1385 |
|
1385 |
|
1386 |
virtual string getQualifiedCPP_ptr(IDLScope const *up_to = NULL) const { |
1386 |
virtual string getQualifiedCPP_ptr(IDLScope const *up_to ) const { |
1387 |
return "CORBA::Object_ptr"; |
1387 |
return "CORBA::Object_ptr"; |
1388 |
} |
1388 |
} |
1389 |
virtual string getQualifiedCPP_var(IDLScope const *up_to = NULL) const { |
1389 |
virtual string getQualifiedCPP_var(IDLScope const *up_to ) const { |
1390 |
return "CORBA::Object_var"; |
1390 |
return "CORBA::Object_var"; |
1391 |
} |
1391 |
} |
1392 |
virtual string getQualifiedCPP_mgr(IDLScope const *up_to = NULL) const { |
1392 |
virtual string getQualifiedCPP_mgr(IDLScope const *up_to ) const { |
1393 |
return "CORBA::Object_mgr"; |
1393 |
return "CORBA::Object_mgr"; |
1394 |
} |
1394 |
} |
1395 |
virtual string getQualifiedCPP_out(IDLScope const *up_to = NULL) const { |
1395 |
virtual string getQualifiedCPP_out(IDLScope const *up_to ) const { |
1396 |
return "CORBA::Object_out"; |
1396 |
return "CORBA::Object_out"; |
1397 |
} |
1397 |
} |
1398 |
|
1398 |
|
Lines 1431-1437
Link Here
|
1431 |
return "CORBA::TypeCode"; |
1431 |
return "CORBA::TypeCode"; |
1432 |
} |
1432 |
} |
1433 |
|
1433 |
|
1434 |
virtual string getQualifiedCPPStub(IDLScope const *up_to = NULL) const { |
1434 |
virtual string getQualifiedCPPStub(IDLScope const *up_to ) const { |
1435 |
// fixme - doesn't do the scope thing |
1435 |
// fixme - doesn't do the scope thing |
1436 |
return "CORBA::TypeCode"; |
1436 |
return "CORBA::TypeCode"; |
1437 |
} |
1437 |
} |
Lines 1450-1471
Link Here
|
1450 |
return "CORBA::TypeCode_out"; |
1450 |
return "CORBA::TypeCode_out"; |
1451 |
} |
1451 |
} |
1452 |
|
1452 |
|
1453 |
virtual string getQualifiedCPP_ptr(IDLScope const *up_to = NULL) const { |
1453 |
virtual string getQualifiedCPP_ptr(IDLScope const *up_to ) const { |
1454 |
return "CORBA::TypeCode_ptr"; |
1454 |
return "CORBA::TypeCode_ptr"; |
1455 |
} |
1455 |
} |
1456 |
virtual string getQualifiedCPP_var(IDLScope const *up_to = NULL) const { |
1456 |
virtual string getQualifiedCPP_var(IDLScope const *up_to ) const { |
1457 |
return "CORBA::TypeCode_var"; |
1457 |
return "CORBA::TypeCode_var"; |
1458 |
} |
1458 |
} |
1459 |
virtual string getQualifiedCPP_mgr(IDLScope const *up_to = NULL) const { |
1459 |
virtual string getQualifiedCPP_mgr(IDLScope const *up_to ) const { |
1460 |
return "CORBA::TypeCode_mgr"; |
1460 |
return "CORBA::TypeCode_mgr"; |
1461 |
} |
1461 |
} |
1462 |
virtual string getQualifiedCPP_out(IDLScope const *up_to = NULL) const { |
1462 |
virtual string getQualifiedCPP_out(IDLScope const *up_to ) const { |
1463 |
return "CORBA::TypeCode_out"; |
1463 |
return "CORBA::TypeCode_out"; |
1464 |
} |
1464 |
} |
1465 |
|
1465 |
|
1466 |
void |
1466 |
void |
1467 |
writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
1467 |
writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
1468 |
IDLTypedef const *activeTypedef = NULL) const { |
1468 |
IDLTypedef const *activeTypedef ) const { |
1469 |
ostr << indent << "return reinterpret_cast< " << getNSScopedCTypeName() << ">(_retval);" << endl; |
1469 |
ostr << indent << "return reinterpret_cast< " << getNSScopedCTypeName() << ">(_retval);" << endl; |
1470 |
} |
1470 |
} |
1471 |
|
1471 |
|
Lines 1517-1523
Link Here
|
1517 |
|
1517 |
|
1518 |
void |
1518 |
void |
1519 |
IDLStruct::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
1519 |
IDLStruct::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
1520 |
IDLTypedef const *activeTypedef = NULL) const { |
1520 |
IDLTypedef const *activeTypedef ) const { |
1521 |
typespec = getQualifiedCPPIdentifier(getRootScope()); |
1521 |
typespec = getQualifiedCPPIdentifier(getRootScope()); |
1522 |
dcl = id; |
1522 |
dcl = id; |
1523 |
}; |
1523 |
}; |
Lines 1525-1531
Link Here
|
1525 |
void |
1525 |
void |
1526 |
IDLStruct::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
1526 |
IDLStruct::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
1527 |
IDLElement &dest,IDLScope const &scope, |
1527 |
IDLElement &dest,IDLScope const &scope, |
1528 |
IDLTypedef const *activeTypedef = NULL) const { |
1528 |
IDLTypedef const *activeTypedef ) const { |
1529 |
ostr |
1529 |
ostr |
1530 |
<< indent << "typedef " << getQualifiedCPPIdentifier() |
1530 |
<< indent << "typedef " << getQualifiedCPPIdentifier() |
1531 |
<< " " << dest.getCPPIdentifier() << ";" << endl; |
1531 |
<< " " << dest.getCPPIdentifier() << ";" << endl; |
Lines 1544-1575
Link Here
|
1544 |
|
1544 |
|
1545 |
void |
1545 |
void |
1546 |
IDLStruct::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
1546 |
IDLStruct::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
1547 |
IDLTypedef const *activeTypedef = NULL) const { |
1547 |
IDLTypedef const *activeTypedef ) const { |
1548 |
ORBITCPP_NYI("struct getCPPStructCtorDeclarator"); |
1548 |
ORBITCPP_NYI("struct getCPPStructCtorDeclarator"); |
1549 |
} |
1549 |
} |
1550 |
|
1550 |
|
1551 |
void |
1551 |
void |
1552 |
IDLStruct::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
1552 |
IDLStruct::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
1553 |
IDLTypedef const *activeTypedef = NULL) const { |
1553 |
IDLTypedef const *activeTypedef ) const { |
1554 |
ORBITCPP_NYI("struct writeCPPStructCtor"); |
1554 |
ORBITCPP_NYI("struct writeCPPStructCtor"); |
1555 |
} |
1555 |
} |
1556 |
|
1556 |
|
1557 |
void |
1557 |
void |
1558 |
IDLStruct::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
1558 |
IDLStruct::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
1559 |
IDLTypedef const *activeTypedef = NULL) const { |
1559 |
IDLTypedef const *activeTypedef ) const { |
1560 |
ORBITCPP_NYI("struct writeCPPStructPacker"); |
1560 |
ORBITCPP_NYI("struct writeCPPStructPacker"); |
1561 |
} |
1561 |
} |
1562 |
|
1562 |
|
1563 |
void |
1563 |
void |
1564 |
IDLStruct::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
1564 |
IDLStruct::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
1565 |
IDLTypedef const *activeTypedef = NULL) const { |
1565 |
IDLTypedef const *activeTypedef ) const { |
1566 |
ORBITCPP_NYI("struct writeCPPStructUnpacker"); |
1566 |
ORBITCPP_NYI("struct writeCPPStructUnpacker"); |
1567 |
} |
1567 |
} |
1568 |
|
1568 |
|
1569 |
|
1569 |
|
1570 |
void |
1570 |
void |
1571 |
IDLStruct::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
1571 |
IDLStruct::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
1572 |
IDLTypedef const *activeTypedef = NULL) const{ |
1572 |
IDLTypedef const *activeTypedef ) const{ |
1573 |
ostr |
1573 |
ostr |
1574 |
<< indent << getQualifiedCPPIdentifier() << " &" << id << "() {" << endl; |
1574 |
<< indent << getQualifiedCPPIdentifier() << " &" << id << "() {" << endl; |
1575 |
ostr |
1575 |
ostr |
Lines 1581-1587
Link Here
|
1581 |
|
1581 |
|
1582 |
|
1582 |
|
1583 |
void IDLStruct::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1583 |
void IDLStruct::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1584 |
IDLTypedef const *activeTypedef=NULL) const { |
1584 |
IDLTypedef const *activeTypedef) const { |
1585 |
dcl = id; |
1585 |
dcl = id; |
1586 |
|
1586 |
|
1587 |
string name = activeTypedef ? |
1587 |
string name = activeTypedef ? |
Lines 1603-1609
Link Here
|
1603 |
|
1603 |
|
1604 |
string |
1604 |
string |
1605 |
IDLStruct::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
1605 |
IDLStruct::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
1606 |
IDLTypedef const *activeTypedef = NULL) const { |
1606 |
IDLTypedef const *activeTypedef ) const { |
1607 |
|
1607 |
|
1608 |
string typespec,dcl; |
1608 |
string typespec,dcl; |
1609 |
getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef); |
1609 |
getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef); |
Lines 1623-1629
Link Here
|
1623 |
|
1623 |
|
1624 |
void |
1624 |
void |
1625 |
IDLStruct::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
1625 |
IDLStruct::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
1626 |
IDLTypedef const *activeTypedef = NULL) const { |
1626 |
IDLTypedef const *activeTypedef ) const { |
1627 |
typespec = getQualifiedCPPIdentifier(); |
1627 |
typespec = getQualifiedCPPIdentifier(); |
1628 |
if(isVariableLength()) |
1628 |
if(isVariableLength()) |
1629 |
dcl = "*" + id; |
1629 |
dcl = "*" + id; |
Lines 1633-1639
Link Here
|
1633 |
|
1633 |
|
1634 |
void |
1634 |
void |
1635 |
IDLStruct::writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
1635 |
IDLStruct::writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
1636 |
IDLTypedef const *activeTypedef = NULL) const { |
1636 |
IDLTypedef const *activeTypedef ) const { |
1637 |
|
1637 |
|
1638 |
ostr |
1638 |
ostr |
1639 |
<< indent << getNSScopedCTypeName(); |
1639 |
<< indent << getNSScopedCTypeName(); |
Lines 1651-1657
Link Here
|
1651 |
|
1651 |
|
1652 |
void |
1652 |
void |
1653 |
IDLStruct::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
1653 |
IDLStruct::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
1654 |
IDLTypedef const *activeTypedef = NULL) const { |
1654 |
IDLTypedef const *activeTypedef ) const { |
1655 |
ostr << indent << "return reinterpret_cast< " << getQualifiedCPPIdentifier(); |
1655 |
ostr << indent << "return reinterpret_cast< " << getQualifiedCPPIdentifier(); |
1656 |
if(isVariableLength()) |
1656 |
if(isVariableLength()) |
1657 |
ostr << "*"; |
1657 |
ostr << "*"; |
Lines 1663-1669
Link Here
|
1663 |
|
1663 |
|
1664 |
void |
1664 |
void |
1665 |
IDLStruct::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1665 |
IDLStruct::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
1666 |
IDLTypedef const *activeTypedef = NULL) const { |
1666 |
IDLTypedef const *activeTypedef ) const { |
1667 |
typespec = getNSScopedCTypeName(); |
1667 |
typespec = getNSScopedCTypeName(); |
1668 |
|
1668 |
|
1669 |
switch (attr) { |
1669 |
switch (attr) { |
Lines 1688-1694
Link Here
|
1688 |
|
1688 |
|
1689 |
void |
1689 |
void |
1690 |
IDLStruct::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1690 |
IDLStruct::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1691 |
IDLTypedef const *activeTypedef = NULL) const { |
1691 |
IDLTypedef const *activeTypedef ) const { |
1692 |
// no demarshalling code required |
1692 |
// no demarshalling code required |
1693 |
} |
1693 |
} |
1694 |
|
1694 |
|
Lines 1697-1703
Link Here
|
1697 |
|
1697 |
|
1698 |
string |
1698 |
string |
1699 |
IDLStruct::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
1699 |
IDLStruct::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
1700 |
IDLTypedef const *activeTypedef = NULL) const { |
1700 |
IDLTypedef const *activeTypedef ) const { |
1701 |
string typespec,dcl; |
1701 |
string typespec,dcl; |
1702 |
getCPPStubDeclarator(attr,"",typespec,dcl); |
1702 |
getCPPStubDeclarator(attr,"",typespec,dcl); |
1703 |
|
1703 |
|
Lines 1718-1731
Link Here
|
1718 |
|
1718 |
|
1719 |
void |
1719 |
void |
1720 |
IDLStruct::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1720 |
IDLStruct::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
1721 |
IDLTypedef const *activeTypedef = NULL) const { |
1721 |
IDLTypedef const *activeTypedef ) const { |
1722 |
// no marshalling code required |
1722 |
// no marshalling code required |
1723 |
} |
1723 |
} |
1724 |
|
1724 |
|
1725 |
|
1725 |
|
1726 |
void |
1726 |
void |
1727 |
IDLStruct::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
1727 |
IDLStruct::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
1728 |
IDLTypedef const *activeTypedef = NULL) const { |
1728 |
IDLTypedef const *activeTypedef ) const { |
1729 |
typespec = getNSScopedCTypeName(); |
1729 |
typespec = getNSScopedCTypeName(); |
1730 |
if (isVariableLength()) |
1730 |
if (isVariableLength()) |
1731 |
dcl = "*" + id; |
1731 |
dcl = "*" + id; |
Lines 1735-1741
Link Here
|
1735 |
|
1735 |
|
1736 |
void |
1736 |
void |
1737 |
IDLStruct::writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
1737 |
IDLStruct::writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
1738 |
IDLTypedef const *activeTypedef = NULL) const { |
1738 |
IDLTypedef const *activeTypedef ) const { |
1739 |
ostr << indent << getQualifiedCPPIdentifier(); |
1739 |
ostr << indent << getQualifiedCPPIdentifier(); |
1740 |
if (isVariableLength()) |
1740 |
if (isVariableLength()) |
1741 |
ostr << " *_retval = NULL;" << endl; |
1741 |
ostr << " *_retval = NULL;" << endl; |
Lines 1745-1757
Link Here
|
1745 |
|
1745 |
|
1746 |
string |
1746 |
string |
1747 |
IDLStruct::getCPPSkelReturnAssignment(bool passthru, |
1747 |
IDLStruct::getCPPSkelReturnAssignment(bool passthru, |
1748 |
IDLTypedef const *activeTypedef = NULL) const { |
1748 |
IDLTypedef const *activeTypedef ) const { |
1749 |
return "_retval = "; |
1749 |
return "_retval = "; |
1750 |
} |
1750 |
} |
1751 |
|
1751 |
|
1752 |
void |
1752 |
void |
1753 |
IDLStruct::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
1753 |
IDLStruct::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
1754 |
IDLTypedef const *activeTypedef = NULL) const { |
1754 |
IDLTypedef const *activeTypedef ) const { |
1755 |
ostr << indent << "return reinterpret_cast< " |
1755 |
ostr << indent << "return reinterpret_cast< " |
1756 |
<< getNSScopedCTypeName(); |
1756 |
<< getNSScopedCTypeName(); |
1757 |
|
1757 |
|
Lines 1824-1830
Link Here
|
1824 |
|
1824 |
|
1825 |
void |
1825 |
void |
1826 |
IDLSequence::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
1826 |
IDLSequence::getCPPMemberDeclarator(string const &id,string &typespec,string &dcl, |
1827 |
IDLTypedef const *activeTypedef = NULL) const { |
1827 |
IDLTypedef const *activeTypedef ) const { |
1828 |
if(activeTypedef) |
1828 |
if(activeTypedef) |
1829 |
typespec = activeTypedef->getQualifiedCPPIdentifier(activeTypedef->getRootScope()); |
1829 |
typespec = activeTypedef->getQualifiedCPPIdentifier(activeTypedef->getRootScope()); |
1830 |
else |
1830 |
else |
Lines 1869-1875
Link Here
|
1869 |
void |
1869 |
void |
1870 |
IDLSequence::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
1870 |
IDLSequence::writeTypedef(ostream &ostr,Indent &indent,IDLCompilerState &state, |
1871 |
IDLElement &dest,IDLScope const &scope, |
1871 |
IDLElement &dest,IDLScope const &scope, |
1872 |
IDLTypedef const *activeTypedef = NULL) const { |
1872 |
IDLTypedef const *activeTypedef ) const { |
1873 |
if (activeTypedef == NULL) { // if this isn't a typedef of a typedef... |
1873 |
if (activeTypedef == NULL) { // if this isn't a typedef of a typedef... |
1874 |
string id = getCPPType(); |
1874 |
string id = getCPPType(); |
1875 |
ostr |
1875 |
ostr |
Lines 1954-1960
Link Here
|
1954 |
|
1954 |
|
1955 |
void |
1955 |
void |
1956 |
IDLSequence::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
1956 |
IDLSequence::getCPPStructCtorDeclarator(string const &id,string &typespec,string &dcl, |
1957 |
IDLTypedef const *activeTypedef = NULL) const { |
1957 |
IDLTypedef const *activeTypedef ) const { |
1958 |
getCPPMemberDeclarator(id, typespec, dcl, activeTypedef); |
1958 |
getCPPMemberDeclarator(id, typespec, dcl, activeTypedef); |
1959 |
typespec = "const " + typespec; |
1959 |
typespec = "const " + typespec; |
1960 |
dcl = "&_par_" + dcl; |
1960 |
dcl = "&_par_" + dcl; |
Lines 1962-1974
Link Here
|
1962 |
|
1962 |
|
1963 |
void |
1963 |
void |
1964 |
IDLSequence::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
1964 |
IDLSequence::writeCPPStructCtor(ostream &ostr,Indent &indent,string const &id, |
1965 |
IDLTypedef const *activeTypedef = NULL) const { |
1965 |
IDLTypedef const *activeTypedef ) const { |
1966 |
ostr << indent << id << " = _par_" << id << ';' << endl; |
1966 |
ostr << indent << id << " = _par_" << id << ';' << endl; |
1967 |
} |
1967 |
} |
1968 |
|
1968 |
|
1969 |
void |
1969 |
void |
1970 |
IDLSequence::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
1970 |
IDLSequence::writeCPPStructPacker(ostream &ostr,Indent &indent,string const &id, |
1971 |
IDLTypedef const *activeTypedef = NULL) const { |
1971 |
IDLTypedef const *activeTypedef ) const { |
1972 |
string type; |
1972 |
string type; |
1973 |
if( activeTypedef ) |
1973 |
if( activeTypedef ) |
1974 |
type = activeTypedef->getQualifiedCPPIdentifier(); |
1974 |
type = activeTypedef->getQualifiedCPPIdentifier(); |
Lines 1982-1988
Link Here
|
1982 |
|
1982 |
|
1983 |
void |
1983 |
void |
1984 |
IDLSequence::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
1984 |
IDLSequence::writeCPPStructUnpacker(ostream &ostr,Indent &indent,string const &id, |
1985 |
IDLTypedef const *activeTypedef = NULL) const { |
1985 |
IDLTypedef const *activeTypedef ) const { |
1986 |
string type; |
1986 |
string type; |
1987 |
if( activeTypedef ) |
1987 |
if( activeTypedef ) |
1988 |
type = activeTypedef->getQualifiedCPPIdentifier(); |
1988 |
type = activeTypedef->getQualifiedCPPIdentifier(); |
Lines 2000-2006
Link Here
|
2000 |
|
2000 |
|
2001 |
void |
2001 |
void |
2002 |
IDLSequence::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
2002 |
IDLSequence::writeUnionReferents(ostream &ostr,Indent &indent, string const &id, string const &discriminatorVal, |
2003 |
IDLTypedef const *activeTypedef = NULL) const{ |
2003 |
IDLTypedef const *activeTypedef ) const{ |
2004 |
|
2004 |
|
2005 |
g_assert(activeTypedef); //activeTypedef cannot be null for sequences |
2005 |
g_assert(activeTypedef); //activeTypedef cannot be null for sequences |
2006 |
ostr |
2006 |
ostr |
Lines 2014-2020
Link Here
|
2014 |
|
2014 |
|
2015 |
|
2015 |
|
2016 |
void IDLSequence::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
2016 |
void IDLSequence::getCPPStubDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
2017 |
IDLTypedef const* activeTypedef=NULL) const { |
2017 |
IDLTypedef const* activeTypedef) const { |
2018 |
dcl = id; |
2018 |
dcl = id; |
2019 |
|
2019 |
|
2020 |
g_assert(activeTypedef); //activeTypedef cannot be null for sequences |
2020 |
g_assert(activeTypedef); //activeTypedef cannot be null for sequences |
Lines 2036-2042
Link Here
|
2036 |
|
2036 |
|
2037 |
string |
2037 |
string |
2038 |
IDLSequence::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
2038 |
IDLSequence::getCPPStubParameterTerm(IDL_param_attr attr,string const &id, |
2039 |
IDLTypedef const *activeTypedef = NULL) const { |
2039 |
IDLTypedef const *activeTypedef ) const { |
2040 |
|
2040 |
|
2041 |
string typespec,dcl, retval; |
2041 |
string typespec,dcl, retval; |
2042 |
getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef); |
2042 |
getCSkelDeclarator(attr,"",typespec,dcl,activeTypedef); |
Lines 2057-2063
Link Here
|
2057 |
|
2057 |
|
2058 |
void |
2058 |
void |
2059 |
IDLSequence::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
2059 |
IDLSequence::getCPPStubReturnDeclarator(string const &id,string &typespec,string &dcl, |
2060 |
IDLTypedef const *activeTypedef = NULL) const { |
2060 |
IDLTypedef const *activeTypedef ) const { |
2061 |
typespec = activeTypedef->getQualifiedCPPIdentifier(); |
2061 |
typespec = activeTypedef->getQualifiedCPPIdentifier(); |
2062 |
if (isVariableLength()) |
2062 |
if (isVariableLength()) |
2063 |
dcl = "*" + id; |
2063 |
dcl = "*" + id; |
Lines 2067-2073
Link Here
|
2067 |
|
2067 |
|
2068 |
void |
2068 |
void |
2069 |
IDLSequence::writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
2069 |
IDLSequence::writeCPPStubReturnPrepCode(ostream &ostr,Indent &indent, |
2070 |
IDLTypedef const *activeTypedef = NULL) const { |
2070 |
IDLTypedef const *activeTypedef ) const { |
2071 |
|
2071 |
|
2072 |
ostr |
2072 |
ostr |
2073 |
<< indent << activeTypedef->getNSScopedCTypeName(); |
2073 |
<< indent << activeTypedef->getNSScopedCTypeName(); |
Lines 2085-2091
Link Here
|
2085 |
|
2085 |
|
2086 |
void |
2086 |
void |
2087 |
IDLSequence::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
2087 |
IDLSequence::writeCPPStubReturnDemarshalCode(ostream &ostr,Indent &indent, |
2088 |
IDLTypedef const *activeTypedef = NULL) const { |
2088 |
IDLTypedef const *activeTypedef ) const { |
2089 |
ostr << indent << "return reinterpret_cast< " << activeTypedef->getQualifiedCPPIdentifier(); |
2089 |
ostr << indent << "return reinterpret_cast< " << activeTypedef->getQualifiedCPPIdentifier(); |
2090 |
if(isVariableLength()) |
2090 |
if(isVariableLength()) |
2091 |
ostr << "*"; |
2091 |
ostr << "*"; |
Lines 2097-2103
Link Here
|
2097 |
|
2097 |
|
2098 |
void |
2098 |
void |
2099 |
IDLSequence::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
2099 |
IDLSequence::getCSkelDeclarator(IDL_param_attr attr,string const &id,string &typespec,string &dcl, |
2100 |
IDLTypedef const *activeTypedef = NULL) const { |
2100 |
IDLTypedef const *activeTypedef ) const { |
2101 |
typespec = activeTypedef->getNSScopedCTypeName(); |
2101 |
typespec = activeTypedef->getNSScopedCTypeName(); |
2102 |
|
2102 |
|
2103 |
switch (attr) { |
2103 |
switch (attr) { |
Lines 2119-2131
Link Here
|
2119 |
|
2119 |
|
2120 |
void |
2120 |
void |
2121 |
IDLSequence::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
2121 |
IDLSequence::writeCPPSkelDemarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
2122 |
IDLTypedef const *activeTypedef = NULL) const { |
2122 |
IDLTypedef const *activeTypedef ) const { |
2123 |
// no demarshalling code required |
2123 |
// no demarshalling code required |
2124 |
} |
2124 |
} |
2125 |
|
2125 |
|
2126 |
string |
2126 |
string |
2127 |
IDLSequence::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
2127 |
IDLSequence::getCPPSkelParameterTerm(IDL_param_attr attr,string const &id, |
2128 |
IDLTypedef const *activeTypedef = NULL) const { |
2128 |
IDLTypedef const *activeTypedef ) const { |
2129 |
string typespec,dcl; |
2129 |
string typespec,dcl; |
2130 |
getCPPStubDeclarator(attr,"",typespec,dcl,activeTypedef); |
2130 |
getCPPStubDeclarator(attr,"",typespec,dcl,activeTypedef); |
2131 |
|
2131 |
|
Lines 2146-2166
Link Here
|
2146 |
|
2146 |
|
2147 |
void |
2147 |
void |
2148 |
IDLSequence::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
2148 |
IDLSequence::writeCPPSkelMarshalCode(IDL_param_attr attr,string const &id,ostream &ostr,Indent &indent, |
2149 |
IDLTypedef const *activeTypedef = NULL) const { |
2149 |
IDLTypedef const *activeTypedef ) const { |
2150 |
// no marshalling code required |
2150 |
// no marshalling code required |
2151 |
} |
2151 |
} |
2152 |
|
2152 |
|
2153 |
|
2153 |
|
2154 |
void |
2154 |
void |
2155 |
IDLSequence::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
2155 |
IDLSequence::getCSkelReturnDeclarator(string const &id,string &typespec,string &dcl, |
2156 |
IDLTypedef const *activeTypedef = NULL) const { |
2156 |
IDLTypedef const *activeTypedef ) const { |
2157 |
typespec = activeTypedef->getNSScopedCTypeName(); |
2157 |
typespec = activeTypedef->getNSScopedCTypeName(); |
2158 |
dcl = "*" + id; |
2158 |
dcl = "*" + id; |
2159 |
} |
2159 |
} |
2160 |
|
2160 |
|
2161 |
void |
2161 |
void |
2162 |
IDLSequence::writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
2162 |
IDLSequence::writeCPPSkelReturnPrepCode(ostream &ostr,Indent &indent,bool passthru, |
2163 |
IDLTypedef const *activeTypedef = NULL) const { |
2163 |
IDLTypedef const *activeTypedef ) const { |
2164 |
ostr << indent << activeTypedef->getQualifiedCPPIdentifier(); |
2164 |
ostr << indent << activeTypedef->getQualifiedCPPIdentifier(); |
2165 |
if(isVariableLength()) |
2165 |
if(isVariableLength()) |
2166 |
ostr << " *_retval = NULL;" << endl; |
2166 |
ostr << " *_retval = NULL;" << endl; |
Lines 2170-2182
Link Here
|
2170 |
|
2170 |
|
2171 |
string |
2171 |
string |
2172 |
IDLSequence::getCPPSkelReturnAssignment(bool passthru, |
2172 |
IDLSequence::getCPPSkelReturnAssignment(bool passthru, |
2173 |
IDLTypedef const *activeTypedef = NULL) const { |
2173 |
IDLTypedef const *activeTypedef ) const { |
2174 |
return "_retval = "; |
2174 |
return "_retval = "; |
2175 |
} |
2175 |
} |
2176 |
|
2176 |
|
2177 |
void |
2177 |
void |
2178 |
IDLSequence::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
2178 |
IDLSequence::writeCPPSkelReturnMarshalCode(ostream &ostr,Indent &indent,bool passthru, |
2179 |
IDLTypedef const *activeTypedef = NULL) const { |
2179 |
IDLTypedef const *activeTypedef ) const { |
2180 |
ostr << indent << "return reinterpret_cast< " |
2180 |
ostr << indent << "return reinterpret_cast< " |
2181 |
<< activeTypedef->getNSScopedCTypeName() |
2181 |
<< activeTypedef->getNSScopedCTypeName() |
2182 |
<< "*>(_retval);" << endl; |
2182 |
<< "*>(_retval);" << endl; |
Lines 2208-2214
Link Here
|
2208 |
|
2208 |
|
2209 |
// IDLUnion ------------------------------------------------------------- |
2209 |
// IDLUnion ------------------------------------------------------------- |
2210 |
IDLUnion::IDLUnion(string const &id,IDL_tree node, |
2210 |
IDLUnion::IDLUnion(string const &id,IDL_tree node, |
2211 |
IDLType const &discriminatorType, IDLScope *parentscope = NULL) |
2211 |
IDLType const &discriminatorType, IDLScope *parentscope) |
2212 |
: IDLStruct(id,node,parentscope),m_discriminatorType(discriminatorType) { |
2212 |
: IDLStruct(id,node,parentscope),m_discriminatorType(discriminatorType) { |
2213 |
} |
2213 |
} |
2214 |
|
2214 |
|