Changeset 50751 in vbox
- Timestamp:
- Mar 12, 2014 4:14:41 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Main/idl/apiwrap-server.xsl (modified) (24 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/apiwrap-server.xsl
r50183 r50751 216 216 <xsl:param name="type"/> 217 217 <xsl:param name="dir"/> 218 <xsl:param name="mod"/> 218 219 219 220 <!-- get C++ glue type from IDL type from table in typemap-shared.inc.xsl --> … … 250 251 </xsl:otherwise> 251 252 </xsl:choose> 253 <xsl:if test="$mod='ptr'"> 254 <xsl:text> *</xsl:text> 255 </xsl:if> 252 256 </xsl:template> 253 257 … … 255 259 <xsl:param name="type"/> 256 260 <xsl:param name="dir"/> 261 <xsl:param name="mod"/> 257 262 <xsl:param name="safearray"/> 258 263 … … 298 303 </xsl:otherwise> 299 304 </xsl:choose> 305 <xsl:if test="$mod='ptr'"> 306 <xsl:text> *</xsl:text> 307 </xsl:if> 300 308 </xsl:template> 301 309 … … 303 311 <xsl:param name="type"/> 304 312 <xsl:param name="dir"/> 313 <xsl:param name="mod"/> 305 314 <xsl:param name="safearray"/> 306 <xsl:param name=" mod"/>315 <xsl:param name="isref"/> 307 316 308 317 <!-- get C format string for IDL type from table in typemap-shared.inc.xsl --> 309 318 <xsl:variable name="wrapfmt" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluefmt"/> 310 319 <xsl:choose> 311 <xsl:when test="$mod=' ref' and $dir!='in'">320 <xsl:when test="$mod='ptr' or ($isref='yes' and $dir!='in')"> 312 321 <xsl:text>%p</xsl:text> 313 322 </xsl:when> … … 335 344 </xsl:template> 336 345 346 <!-- - - - - - - - - - - - - - - - - - - - - - - 347 templates for handling entire interfaces and their contents 348 - - - - - - - - - - - - - - - - - - - - - - --> 349 350 <xsl:template name="emitInterface"> 351 <xsl:param name="iface"/> 352 353 <xsl:call-template name="emitHeader"> 354 <xsl:with-param name="iface" select="$iface"/> 355 </xsl:call-template> 356 357 <xsl:call-template name="emitCode"> 358 <xsl:with-param name="iface" select="$iface"/> 359 </xsl:call-template> 360 </xsl:template> 361 337 362 <xsl:template match="attribute/@type | param/@type" mode="public"> 338 363 <xsl:param name="dir"/> … … 342 367 <xsl:with-param name="type" select="."/> 343 368 <xsl:with-param name="dir" select="$dir"/> 369 <xsl:with-param name="mod" select="../@mod"/> 344 370 </xsl:call-template> 345 371 </xsl:variable> … … 389 415 <xsl:with-param name="type" select="."/> 390 416 <xsl:with-param name="dir" select="$dir"/> 417 <xsl:with-param name="mod" select="../@mod"/> 391 418 <xsl:with-param name="safearray" select="../@safearray"/> 392 419 </xsl:call-template> … … 447 474 <xsl:template match="attribute/@type | param/@type" mode="logparamtext"> 448 475 <xsl:param name="dir"/> 449 <xsl:param name=" mod"/>450 451 <xsl:if test="$ mod!='ref' and ($dir='out' or $dir='ret')">476 <xsl:param name="isref"/> 477 478 <xsl:if test="$isref!='yes' and ($dir='out' or $dir='ret')"> 452 479 <xsl:text>*</xsl:text> 453 480 </xsl:if> … … 460 487 <xsl:with-param name="type" select="."/> 461 488 <xsl:with-param name="dir" select="$dir"/> 489 <xsl:with-param name="mod" select="../@mod"/> 462 490 <xsl:with-param name="safearray" select="../@safearray"/> 463 <xsl:with-param name=" mod" select="$mod"/>491 <xsl:with-param name="isref" select="$isref"/> 464 492 </xsl:call-template> 465 493 </xsl:template> … … 467 495 <xsl:template match="attribute/@type | param/@type" mode="logparamval"> 468 496 <xsl:param name="dir"/> 469 <xsl:param name=" mod"/>470 471 <xsl:choose> 472 <xsl:when test="../@safearray='yes' and $ mod!='ref'">497 <xsl:param name="isref"/> 498 499 <xsl:choose> 500 <xsl:when test="../@safearray='yes' and $isref!='yes'"> 473 501 <xsl:text>ComSafeArraySize(</xsl:text> 474 <xsl:if test="$ mod!='ref' and $dir!='in'">502 <xsl:if test="$isref!='yes' and $dir!='in'"> 475 503 <xsl:text>*</xsl:text> 476 504 </xsl:if> 477 505 </xsl:when> 478 <xsl:when test="$ mod!='ref' and $dir!='in'">506 <xsl:when test="$isref!='yes' and $dir!='in'"> 479 507 <xsl:text>*</xsl:text> 480 508 </xsl:when> … … 485 513 </xsl:call-template> 486 514 <xsl:choose> 487 <xsl:when test="../@safearray='yes' and $ mod!='ref'">515 <xsl:when test="../@safearray='yes' and $isref!='yes'"> 488 516 <xsl:text>)</xsl:text> 489 517 </xsl:when> … … 498 526 <xsl:with-param name="type" select="."/> 499 527 <xsl:with-param name="dir" select="$dir"/> 528 <xsl:with-param name="mod" select="../@mod"/> 500 529 </xsl:call-template> 501 530 </xsl:variable> … … 745 774 <xsl:apply-templates select="@type" mode="logparamtext"> 746 775 <xsl:with-param name="dir" select="'out'"/> 747 <xsl:with-param name=" mod" select="'ref'"/>776 <xsl:with-param name="isref" select="'yes'"/> 748 777 </xsl:apply-templates> 749 778 <xsl:text>\n", this, </xsl:text> … … 751 780 <xsl:apply-templates select="@type" mode="logparamval"> 752 781 <xsl:with-param name="dir" select="'out'"/> 753 <xsl:with-param name=" mod" select="'ref'"/>782 <xsl:with-param name="isref" select="'yes'"/> 754 783 </xsl:apply-templates> 755 784 <xsl:text>)); … … 797 826 <xsl:apply-templates select="@type" mode="logparamtext"> 798 827 <xsl:with-param name="dir" select="'out'"/> 828 <xsl:with-param name="isref" select="''"/> 799 829 </xsl:apply-templates> 800 830 <xsl:text> hrc=%Rhrc\n", this, </xsl:text> … … 802 832 <xsl:apply-templates select="@type" mode="logparamval"> 803 833 <xsl:with-param name="dir" select="'out'"/> 834 <xsl:with-param name="isref" select="''"/> 804 835 </xsl:apply-templates> 805 836 <xsl:text>, hrc)); … … 819 850 <xsl:apply-templates select="@type" mode="logparamtext"> 820 851 <xsl:with-param name="dir" select="'in'"/> 852 <xsl:with-param name="isref" select="''"/> 821 853 </xsl:apply-templates> 822 854 <xsl:text>\n", this, </xsl:text> … … 824 856 <xsl:apply-templates select="@type" mode="logparamval"> 825 857 <xsl:with-param name="dir" select="'in'"/> 858 <xsl:with-param name="isref" select="''"/> 826 859 </xsl:apply-templates> 827 860 <xsl:text>)); … … 1021 1054 <xsl:apply-templates select="@type" mode="logparamtext"> 1022 1055 <xsl:with-param name="dir" select="@dir"/> 1023 <xsl:with-param name=" mod" select="'ref'"/>1056 <xsl:with-param name="isref" select="'yes'"/> 1024 1057 </xsl:apply-templates> 1025 1058 </xsl:for-each> … … 1030 1063 <xsl:apply-templates select="@type" mode="logparamval"> 1031 1064 <xsl:with-param name="dir" select="@dir"/> 1032 <xsl:with-param name=" mod" select="'ref'"/>1065 <xsl:with-param name="isref" select="'yes'"/> 1033 1066 </xsl:apply-templates> 1034 1067 </xsl:for-each> … … 1101 1134 <xsl:apply-templates select="@type" mode="logparamtext"> 1102 1135 <xsl:with-param name="dir" select="@dir"/> 1136 <xsl:with-param name="isref" select="''"/> 1103 1137 </xsl:apply-templates> 1104 1138 </xsl:if> … … 1111 1145 <xsl:apply-templates select="@type" mode="logparamval"> 1112 1146 <xsl:with-param name="dir" select="@dir"/> 1147 <xsl:with-param name="isref" select="''"/> 1113 1148 </xsl:apply-templates> 1114 1149 </xsl:if> … … 1346 1381 1347 1382 <!-- - - - - - - - - - - - - - - - - - - - - - - 1348 librarymatch1383 interface match 1349 1384 - - - - - - - - - - - - - - - - - - - - - - --> 1350 1385 1351 1386 <xsl:template match="interface"> 1352 <xsl:if test="not(@supportsErrorInfo='no')"> 1353 <xsl:call-template name="emitHeader"> 1354 <xsl:with-param name="iface" select="."/> 1355 </xsl:call-template> 1356 1357 <xsl:call-template name="emitCode"> 1387 <xsl:if test="not(@internal='yes') and not(@supportsErrorInfo='no')"> 1388 <xsl:call-template name="emitInterface"> 1358 1389 <xsl:with-param name="iface" select="."/> 1359 1390 </xsl:call-template>
Note:
See TracChangeset
for help on using the changeset viewer.

