Changeset 72974 in vbox for trunk/src/VBox/Main/idl
- Timestamp:
- Jul 8, 2018 1:35:21 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 123526
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/xpidl.xsl
r72973 r72974 36 36 portability concerns. 37 37 --> 38 <xsl:param name="g_fHackEnumsOntoCppEnums" select="' no'"/>38 <xsl:param name="g_fHackEnumsOntoCppEnums" select="'yes'"/> 39 39 40 40 … … 717 717 <xsl:text>};

</xsl:text> 718 718 <xsl:choose> 719 719 720 <xsl:when test="$g_fHackEnumsOntoCppEnums = 'yes'"> 720 721 <xsl:text> 721 /* IDL typedef for enum ', @name, ' */ 722 typedef PRUint32 </xsl:text><xsl:value-of select="concat(@name, '_EnumT')" /><xsl:text>; 723 724 /* C++ enum type name for ', @name, ' */ 722 /* IDL typedef for enum </xsl:text><xsl:value-of select="@name" /><xsl:text> and C++ mappings. */ 725 723 %{C++ 724 #ifndef VBOX_WITH_XPCOM_CPP_ENUM_HACK 725 %} 726 typedef PRUint32 </xsl:text><xsl:value-of select="concat(@name, '_T')" /><xsl:text>; 727 %{C++ 728 </xsl:text> 729 <xsl:for-each select="const"> 730 <xsl:value-of select="concat('# define ', ../@name, '_', @name, ' ', ../@name, '::', @name, '
')"/> 731 </xsl:for-each> 732 <xsl:text>#else /* VBOX_WITH_XPCOM_CPP_ENUM_HACK */ 726 733 typedef enum </xsl:text> 727 734 <xsl:value-of select="concat(@name, '_T')" /> … … 733 740 <xsl:value-of select="concat(' ', @name, '_32BitHack = 0x7fffffff', '
')"/> 734 741 <xsl:text>} </xsl:text><xsl:value-of select="concat(@name, '_T')"/><xsl:text>; 735 # ifdef AssertCompileSize742 # ifdef AssertCompileSize 736 743 AssertCompileSize(</xsl:text><xsl:value-of select="concat(@name, '_T')"/><xsl:text>, sizeof(PRUint32)); 737 #endif 738 /* Use the preprocessor to replace the IDL enum typedef with our C++ enum so it will 739 behave just like we had real enum support in xpidl or if were using msidl. */ 740 #define </xsl:text><xsl:value-of select="concat(@name, '_EnumT ', @name, '_T')" /><xsl:text> 741 #ifndef VBOX_WITH_XPCOM_CPP_ENUM_HACK 742 # define VBOX_WITH_XPCOM_CPP_ENUM_HACK 1 743 #endif 744 # endif 745 #endif /* VBOX_WITH_XPCOM_CPP_ENUM_HACK */ 744 746 %} 745 747 … … 953 955 <xsl:choose> 954 956 <xsl:when test="$g_fHackEnumsOntoCppEnums = 'yes'"> 955 <xsl:value-of select="concat(., '_ EnumT')" />957 <xsl:value-of select="concat(., '_T')" /> 956 958 </xsl:when> 957 959 <xsl:otherwise>
Note:
See TracChangeset
for help on using the changeset viewer.