- Timestamp:
- Sep 22, 2009 4:32:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/doxygen.xsl
r15281 r23230 466 466 * attributes 467 467 --> 468 <xsl:template match="interface//attribute | collection//attribute"> 469 <xsl:if test="@array"> 470 <xsl:message terminate="yes"> 471 <xsl:value-of select="concat(../../@name,'::',../@name,'::',@name,': ')"/> 472 <xsl:text>'array' attributes are not supported, use 'safearray="yes"' instead.</xsl:text> 473 </xsl:message> 474 </xsl:if> 468 <xsl:template match="interface//attribute"> 475 469 <xsl:apply-templates select="@if" mode="begin"/> 476 470 <xsl:apply-templates select="desc"/> … … 491 485 * methods 492 486 --> 493 <xsl:template match="interface//method | collection//method">487 <xsl:template match="interface//method"> 494 488 <xsl:apply-templates select="@if" mode="begin"/> 495 489 <xsl:apply-templates select="desc"/> … … 525 519 526 520 <!-- 527 * enumerators528 -->529 <xsl:template match="enumerator">530 <xsl:text>interface </xsl:text>531 <xsl:value-of select="@name"/>532 <xsl:text> : $unknown
{
</xsl:text>533 <!-- HasMore -->534 <xsl:text> void hasMore ([retval] out boolean more);

</xsl:text>535 <!-- GetNext -->536 <xsl:text> void getNext ([retval] out </xsl:text>537 <xsl:apply-templates select="@type"/>538 <xsl:text> next);

</xsl:text>539 <!-- -->540 <xsl:text>}; /* interface </xsl:text>541 <xsl:value-of select="@name"/>542 <xsl:text> */

</xsl:text>543 </xsl:template>544 545 546 <!--547 * collections548 -->549 <xsl:template match="collection">550 <xsl:if test="not(@readonly='yes')">551 <xsl:message terminate="yes">552 <xsl:value-of select="concat(@name,': ')"/>553 <xsl:text>non-readonly collections are not currently supported</xsl:text>554 </xsl:message>555 </xsl:if>556 <xsl:text>interface </xsl:text>557 <xsl:value-of select="@name"/>558 <xsl:text> : $unknown
{
</xsl:text>559 <!-- Count -->560 <xsl:text> readonly attribute unsigned long count;

</xsl:text>561 <!-- GetItemAt -->562 <xsl:text> void getItemAt (in unsigned long index, [retval] out </xsl:text>563 <xsl:apply-templates select="@type"/>564 <xsl:text> item);

</xsl:text>565 <!-- Enumerate -->566 <xsl:text> void enumerate ([retval] out </xsl:text>567 <xsl:apply-templates select="@enumerator"/>568 <xsl:text> enumerator);

</xsl:text>569 <!-- other extra attributes (properties) -->570 <xsl:apply-templates select="attribute"/>571 <!-- other extra methods -->572 <xsl:apply-templates select="method"/>573 <!-- 'if' enclosed elements, unsorted -->574 <xsl:apply-templates select="if"/>575 <!-- -->576 <xsl:text>}; /* interface </xsl:text>577 <xsl:value-of select="@name"/>578 <xsl:text> */

</xsl:text>579 </xsl:template>580 581 582 <!--583 521 * enums 584 522 --> … … 604 542 --> 605 543 <xsl:template match="method/param"> 606 <xsl:if test="@array">607 <xsl:if test="@dir='return'">608 <xsl:message terminate="yes">609 <xsl:value-of select="concat(../../@name,'::',../@name,'::',@name,': ')"/>610 <xsl:text>return 'array' parameters are not supported, use 'safearray="yes"' instead.</xsl:text>611 </xsl:message>612 </xsl:if>613 <xsl:text>[array, </xsl:text>614 <xsl:choose>615 <xsl:when test="../param[@name=current()/@array]">616 <xsl:if test="../param[@name=current()/@array]/@dir != @dir">617 <xsl:message terminate="yes">618 <xsl:value-of select="concat(../../@name,'::',../@name,': ')"/>619 <xsl:value-of select="concat(@name,' and ',../param[@name=current()/@array]/@name)"/>620 <xsl:text> must have the same direction</xsl:text>621 </xsl:message>622 </xsl:if>623 <xsl:text>size_is(</xsl:text>624 <xsl:if test="@dir='out'">625 <xsl:text>, </xsl:text>626 </xsl:if>627 <xsl:if test="../param[@name=current()/@array]/@dir='out'">628 <xsl:text>*</xsl:text>629 </xsl:if>630 <xsl:value-of select="@array"/>631 <xsl:text>)</xsl:text>632 </xsl:when>633 <xsl:otherwise>634 <xsl:message terminate="yes">635 <xsl:value-of select="concat(../../@name,'::',../@name,'::',@name,': ')"/>636 <xsl:text>array attribute refers to non-existent param: </xsl:text>637 <xsl:value-of select="@array"/>638 </xsl:message>639 </xsl:otherwise>640 </xsl:choose>641 <xsl:text>] </xsl:text>642 </xsl:if>643 544 <xsl:choose> 644 545 <xsl:when test="@dir='in'">in </xsl:when> … … 656 557 * attribute/parameter type conversion 657 558 --> 658 <xsl:template match=" 659 attribute/@type | param/@type | 660 enumerator/@type | collection/@type | collection/@enumerator 661 "> 559 <xsl:template match="attribute/@type | param/@type"> 662 560 <xsl:variable name="self_target" select="current()/ancestor::if/@target"/> 663 664 <xsl:if test="../@array and ../@safearray='yes'">665 <xsl:message terminate="yes">666 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/>667 <xsl:text>either 'array' or 'safearray="yes"' attribute is allowed, but not both!</xsl:text>668 </xsl:message>669 </xsl:if>670 561 671 562 <xsl:choose> … … 685 576 <xsl:when test=".='unsigned long'">ulongPtr</xsl:when> 686 577 <xsl:when test=".='unsigned long long'">ullongPtr</xsl:when> 687 <xsl:when test=".='char'">charPtr</xsl:when> 688 <!--xsl:when test=".='string'">??</xsl:when--> 689 <xsl:when test=".='wchar'">wcharPtr</xsl:when> 690 <!--xsl:when test=".='wstring'">??</xsl:when--> 578 <xsl:otherwise> 579 <xsl:message terminate="yes"> 580 <xsl:value-of select="concat(../../../@name,'::',../../@name,'::',../@name,': ')"/> 581 <xsl:text>attribute 'mod=</xsl:text> 582 <xsl:value-of select="concat('"',../@mod,'"')"/> 583 <xsl:text>' cannot be used with type </xsl:text> 584 <xsl:value-of select="concat('"',current(),'"!')"/> 585 </xsl:message> 586 </xsl:otherwise> 587 </xsl:choose> 588 </xsl:when> 589 <xsl:when test="../@mod='string'"> 590 <xsl:choose> 591 <!-- standard types --> 592 <!--xsl:when test=".='result'">??</xsl:when--> 593 <xsl:when test=".='uuid'">wstringUUID</xsl:when> 691 594 <xsl:otherwise> 692 595 <xsl:message terminate="yes"> … … 741 644 <!-- custom interface types --> 742 645 <xsl:when test=" 743 (name(current())='enumerator' and744 ((ancestor::library/enumerator[@name=current()]) or745 (ancestor::library/if[@target=$self_target]/enumerator[@name=current()]))746 ) or747 646 ((ancestor::library/interface[@name=current()]) or 748 647 (ancestor::library/if[@target=$self_target]/interface[@name=current()]) 749 ) or750 ((ancestor::library/collection[@name=current()]) or751 (ancestor::library/if[@target=$self_target]/collection[@name=current()])752 648 ) 753 649 ">
Note:
See TracChangeset
for help on using the changeset viewer.