- Timestamp:
- Jun 12, 2015 6:02:06 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 100996
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/cbinding/capiidl.xsl
r54027 r56396 1772 1772 <xsl:param name="iface"/> 1773 1773 1774 <xsl:variable name="name" select="@name"/> 1774 1775 <xsl:variable name="extends" select="@extends"/> 1775 1776 <xsl:choose> … … 1836 1837 <xsl:with-param name="iface" select="$iface"/> 1837 1838 </xsl:apply-templates> 1839 <xsl:variable name="reservedAttributes" select="@reservedAttributes"/> 1840 <xsl:if test="$reservedAttributes > 0"> 1841 <!-- tricky way to do a "for" loop without recursion --> 1842 <xsl:for-each select="(//*)[position() <= $reservedAttributes]"> 1843 <xsl:text> nsresult (*GetInternalAndReservedAttribute</xsl:text> 1844 <xsl:value-of select="concat(position(), $name)"/> 1845 <xsl:text>)(</xsl:text> 1846 <xsl:value-of select="$iface"/> 1847 <xsl:text> *pThis, PRUint32 *reserved);
</xsl:text> 1848 <xsl:text> nsresult (*SetInternalAndReservedAttribute</xsl:text> 1849 <xsl:value-of select="concat(position(), $name)"/> 1850 <xsl:text>)(</xsl:text> 1851 <xsl:value-of select="$iface"/> 1852 <xsl:text> *pThis, PRUint32 reserved);

</xsl:text> 1853 </xsl:for-each> 1854 </xsl:if> 1838 1855 <!-- methods --> 1839 1856 <xsl:apply-templates select="method | if/method"> 1840 1857 <xsl:with-param name="iface" select="$iface"/> 1841 1858 </xsl:apply-templates> 1859 <xsl:variable name="reservedMethods" select="@reservedMethods"/> 1860 <xsl:if test="$reservedMethods > 0"> 1861 <!-- tricky way to do a "for" loop without recursion --> 1862 <xsl:for-each select="(//*)[position() <= $reservedMethods]"> 1863 <xsl:text> nsresult (*InternalAndReservedMethod</xsl:text> 1864 <xsl:value-of select="concat(position(), $name)"/> 1865 <xsl:text>)(</xsl:text> 1866 <xsl:value-of select="$iface"/> 1867 <xsl:text> *pThis);

</xsl:text> 1868 </xsl:for-each> 1869 </xsl:if> 1842 1870 </xsl:template> 1843 1871 -
trunk/src/VBox/Main/idl/apiwrap-server.xsl
r55961 r56396 1513 1513 <xsl:param name="pmode"/> 1514 1514 1515 <xsl:variable name="name" select="@name"/> 1515 1516 <!-- first recurse to emit all base interfaces --> 1516 1517 <xsl:variable name="extends" select="@extends"/> … … 1529 1530 <xsl:text>// 1530 1531 </xsl:text> 1531 <xsl:value-of select="concat('// ', @name, ' properties')"/>1532 <xsl:value-of select="concat('// ', $name, ' properties')"/> 1532 1533 <xsl:text> 1533 1534 // … … 1536 1537 </xsl:when> 1537 1538 <xsl:when test="$pmode != 'dtrace-probes'"> 1538 <xsl:value-of select="concat($G_sNewLine, ' // ', $pmode, ' ', @name, ' properties', $G_sNewLine)"/>1539 <xsl:value-of select="concat($G_sNewLine, ' // ', $pmode, ' ', $name, ' properties', $G_sNewLine)"/> 1539 1540 </xsl:when> 1540 1541 </xsl:choose> … … 1544 1545 <xsl:with-param name="emitmode" select="'attribute'"/> 1545 1546 </xsl:apply-templates> 1547 <xsl:variable name="reservedAttributes" select="@reservedAttributes"/> 1548 <xsl:if test="$reservedAttributes > 0"> 1549 <!-- tricky way to do a "for" loop without recursion --> 1550 <xsl:for-each select="(//*)[position() <= $reservedAttributes]"> 1551 <xsl:text> STDMETHOD(COMGETTER(InternalAndReservedAttribute</xsl:text> 1552 <xsl:value-of select="concat(position(), $name)"/> 1553 <xsl:text>))(ULONG *aReserved);
</xsl:text> 1554 <xsl:text> STDMETHOD(COMSETTER(InternalAndReservedAttribute</xsl:text> 1555 <xsl:value-of select="concat(position(), $name)"/> 1556 <xsl:text>))(ULONG aReserved);
</xsl:text> 1557 </xsl:for-each> 1558 </xsl:if> 1546 1559 </xsl:when> 1547 1560 <xsl:when test="$pmode='wrapped'"> … … 1556 1569 <xsl:with-param name="emitmode" select="'attribute'"/> 1557 1570 </xsl:apply-templates> 1571 <xsl:variable name="reservedAttributes" select="@reservedAttributes"/> 1572 <xsl:if test="$reservedAttributes > 0"> 1573 <!-- tricky way to do a "for" loop without recursion --> 1574 <xsl:for-each select="(//*)[position() <= $reservedAttributes]"> 1575 <xsl:value-of select="concat('STDMETHODIMP ', $topclass, 'Wrap::COMGETTER(InternalAndReservedAttribute', position(), $name, ')(ULONG *aReserved)
')"/> 1576 <xsl:text>{ 1577 NOREF(aReserved); 1578 return E_NOTIMPL; 1579 } 1580 1581 </xsl:text> 1582 <xsl:value-of select="concat('STDMETHODIMP ', $topclass, 'Wrap::COMSETTER(InternalAndReservedAttribute', position(), $name, ')(ULONG aReserved)
')"/> 1583 <xsl:text>{ 1584 NOREF(aReserved); 1585 return E_NOTIMPL; 1586 } 1587 1588 </xsl:text> 1589 </xsl:for-each> 1590 </xsl:if> 1558 1591 </xsl:when> 1559 1592 <xsl:when test="$pmode = 'dtrace-probes'"> … … 2117 2150 <xsl:param name="dtracetopclass"/> 2118 2151 2152 <xsl:variable name="name" select="@name"/> 2119 2153 <!-- first recurse to emit all base interfaces --> 2120 2154 <xsl:variable name="extends" select="@extends"/> … … 2133 2167 <xsl:text>// 2134 2168 </xsl:text> 2135 <xsl:value-of select="concat('// ', @name, ' methods')"/>2169 <xsl:value-of select="concat('// ', $name, ' methods')"/> 2136 2170 <xsl:text> 2137 2171 // … … 2141 2175 <xsl:when test="$pmode='dtrace-probes'"/> 2142 2176 <xsl:otherwise> 2143 <xsl:value-of select="concat($G_sNewLine, ' // ', $pmode, ' ', @name, ' methods', $G_sNewLine)"/>2177 <xsl:value-of select="concat($G_sNewLine, ' // ', $pmode, ' ', $name, ' methods', $G_sNewLine)"/> 2144 2178 </xsl:otherwise> 2145 2179 </xsl:choose> … … 2149 2183 <xsl:with-param name="emitmode" select="'method'"/> 2150 2184 </xsl:apply-templates> 2185 <xsl:variable name="reservedMethods" select="@reservedMethods"/> 2186 <xsl:if test="$reservedMethods > 0"> 2187 <!-- tricky way to do a "for" loop without recursion --> 2188 <xsl:for-each select="(//*)[position() <= $reservedMethods]"> 2189 <xsl:text> STDMETHOD(InternalAndReservedMethod</xsl:text> 2190 <xsl:value-of select="concat(position(), $name)"/> 2191 <xsl:text>)();
</xsl:text> 2192 </xsl:for-each> 2193 </xsl:if> 2151 2194 </xsl:when> 2152 2195 <xsl:when test="$pmode='wrapped'"> … … 2161 2204 <xsl:with-param name="emitmode" select="'method'"/> 2162 2205 </xsl:apply-templates> 2206 <xsl:variable name="reservedMethods" select="@reservedMethods"/> 2207 <xsl:if test="$reservedMethods > 0"> 2208 <!-- tricky way to do a "for" loop without recursion --> 2209 <xsl:for-each select="(//*)[position() <= $reservedMethods]"> 2210 <xsl:value-of select="concat('STDMETHODIMP ', $topclass, 'Wrap::InternalAndReservedMethod', position(), $name, '()
')"/> 2211 <xsl:text>{ 2212 return E_NOTIMPL; 2213 } 2214 2215 </xsl:text> 2216 </xsl:for-each> 2217 </xsl:if> 2163 2218 </xsl:when> 2164 2219 <xsl:when test="$pmode='dtrace-probes'"> -
trunk/src/VBox/Main/idl/midl.xsl
r53920 r56396 6 6 * from the generic interface definition expressed in XML. 7 7 8 Copyright (C) 2006-201 4Oracle Corporation8 Copyright (C) 2006-2015 Oracle Corporation 9 9 10 10 This file is part of VirtualBox Open Source Edition (OSE), as … … 201 201 ] 202 202 <xsl:text>interface </xsl:text> 203 <xsl:value-of select="@name"/> 203 <xsl:variable name="name" select="@name"/> 204 <xsl:value-of select="$name"/> 204 205 <xsl:text> : </xsl:text> 205 206 <xsl:choose> … … 215 216 <!-- attributes (properties) --> 216 217 <xsl:apply-templates select="attribute"/> 218 <xsl:variable name="reservedAttributes" select="@reservedAttributes"/> 219 <xsl:if test="$reservedAttributes > 0"> 220 <!-- tricky way to do a "for" loop without recursion --> 221 <xsl:for-each select="(//*)[position() <= $reservedAttributes]"> 222 <xsl:text> [propget] HRESULT InternalAndReservedAttribute</xsl:text> 223 <xsl:value-of select="concat(position(), $name)"/> 224 <xsl:text> ([out, retval] ULONG *aReserved);

</xsl:text> 225 <xsl:text> [propput] HRESULT InternalAndReservedAttribute</xsl:text> 226 <xsl:value-of select="concat(position(), $name)"/> 227 <xsl:text> ([in] ULONG aReserved);

</xsl:text> 228 </xsl:for-each> 229 </xsl:if> 217 230 <!-- methods --> 218 231 <xsl:apply-templates select="method"/> 232 <xsl:variable name="reservedMethods" select="@reservedMethods"/> 233 <xsl:if test="$reservedMethods > 0"> 234 <!-- tricky way to do a "for" loop without recursion --> 235 <xsl:for-each select="(//*)[position() <= $reservedMethods]"> 236 <xsl:text> HRESULT InternalAndReservedMethod</xsl:text> 237 <xsl:value-of select="concat(position(), $name)"/> 238 <xsl:text>();

</xsl:text> 239 </xsl:for-each> 240 </xsl:if> 219 241 <!-- 'if' enclosed elements, unsorted --> 220 242 <xsl:apply-templates select="if"/> 221 243 <!-- --> 222 244 <xsl:text>}; /* interface </xsl:text> 223 <xsl:value-of select=" @name"/>245 <xsl:value-of select="$name"/> 224 246 <xsl:text> */

</xsl:text> 225 247 <!-- Interface implementation forwarder macro --> … … 231 253 <!-- 2) COM_FORWARD_Interface_TO(smth) --> 232 254 <xsl:text>cpp_quote("#define COM_FORWARD_</xsl:text> 233 <xsl:value-of select=" @name"/>255 <xsl:value-of select="$name"/> 234 256 <xsl:text>_TO(smth) </xsl:text> 235 257 <xsl:apply-templates select="attribute" mode="forwarder"> … … 245 267 <!-- 3) COM_FORWARD_Interface_TO_OBJ(obj) --> 246 268 <xsl:text>cpp_quote("#define COM_FORWARD_</xsl:text> 247 <xsl:value-of select=" @name"/>269 <xsl:value-of select="$name"/> 248 270 <xsl:text>_TO_OBJ(obj) COM_FORWARD_</xsl:text> 249 <xsl:value-of select=" @name"/>271 <xsl:value-of select="$name"/> 250 272 <xsl:text>_TO ((obj)->)")
</xsl:text> 251 273 <!-- 4) COM_FORWARD_Interface_TO_BASE(base) --> 252 274 <xsl:text>cpp_quote("#define COM_FORWARD_</xsl:text> 253 <xsl:value-of select=" @name"/>275 <xsl:value-of select="$name"/> 254 276 <xsl:text>_TO_BASE(base) COM_FORWARD_</xsl:text> 255 <xsl:value-of select=" @name"/>277 <xsl:value-of select="$name"/> 256 278 <xsl:text>_TO (base::)")
</xsl:text> 257 279 <!-- end --> -
trunk/src/VBox/Main/idl/xpidl.xsl
r53939 r56396 6 6 * from the generic interface definition expressed in XML. 7 7 8 Copyright (C) 2006-201 4Oracle Corporation8 Copyright (C) 2006-2015 Oracle Corporation 9 9 10 10 This file is part of VirtualBox Open Source Edition (OSE), as … … 191 191 ] 192 192 <xsl:text>interface </xsl:text> 193 <xsl:value-of select="@name"/> 193 <xsl:variable name="name" select="@name"/> 194 <xsl:value-of select="$name"/> 194 195 <xsl:text> : </xsl:text> 195 196 <xsl:choose> … … 202 203 <!-- attributes (properties) --> 203 204 <xsl:apply-templates select="attribute"/> 205 <xsl:variable name="reservedAttributes" select="@reservedAttributes"/> 206 <xsl:if test="$reservedAttributes > 0"> 207 <!-- tricky way to do a "for" loop without recursion --> 208 <xsl:for-each select="(//*)[position() <= $reservedAttributes]"> 209 <xsl:text> attribute unsigned long InternalAndReservedAttribute</xsl:text> 210 <xsl:value-of select="concat(position(), $name)"/> 211 <xsl:text>;

</xsl:text> 212 </xsl:for-each> 213 </xsl:if> 204 214 <!-- methods --> 205 215 <xsl:apply-templates select="method"/> 216 <xsl:variable name="reservedMethods" select="@reservedMethods"/> 217 <xsl:if test="$reservedMethods > 0"> 218 <!-- tricky way to do a "for" loop without recursion --> 219 <xsl:for-each select="(//*)[position() <= $reservedMethods]"> 220 <xsl:text> void InternalAndReservedMethod</xsl:text> 221 <xsl:value-of select="concat(position(), $name)"/> 222 <xsl:text>();

</xsl:text> 223 </xsl:for-each> 224 </xsl:if> 206 225 <!-- 'if' enclosed elements, unsorted --> 207 226 <xsl:apply-templates select="if"/> 208 227 <!-- --> 209 228 <xsl:text>}; /* interface </xsl:text> 210 <xsl:value-of select=" @name"/>229 <xsl:value-of select="$name"/> 211 230 <xsl:text> */

</xsl:text> 212 231 <!-- Interface implementation forwarder macro --> … … 219 238 <!-- 2) COM_FORWARD_Interface_TO(smth) --> 220 239 <xsl:text>#define COM_FORWARD_</xsl:text> 221 <xsl:value-of select=" @name"/>240 <xsl:value-of select="$name"/> 222 241 <xsl:text>_TO(smth) NS_FORWARD_</xsl:text> 223 242 <xsl:call-template name="string-to-upper"> 224 <xsl:with-param name="str" select=" @name"/>243 <xsl:with-param name="str" select="$name"/> 225 244 </xsl:call-template> 226 245 <xsl:text> (smth)
</xsl:text> 227 246 <!-- 3) COM_FORWARD_Interface_TO_OBJ(obj) --> 228 247 <xsl:text>#define COM_FORWARD_</xsl:text> 229 <xsl:value-of select=" @name"/>248 <xsl:value-of select="$name"/> 230 249 <xsl:text>_TO_OBJ(obj) COM_FORWARD_</xsl:text> 231 <xsl:value-of select=" @name"/>250 <xsl:value-of select="$name"/> 232 251 <xsl:text>_TO ((obj)->)
</xsl:text> 233 252 <!-- 4) COM_FORWARD_Interface_TO_BASE(base) --> 234 253 <xsl:text>#define COM_FORWARD_</xsl:text> 235 <xsl:value-of select=" @name"/>254 <xsl:value-of select="$name"/> 236 255 <xsl:text>_TO_BASE(base) COM_FORWARD_</xsl:text> 237 <xsl:value-of select=" @name"/>256 <xsl:value-of select="$name"/> 238 257 <xsl:text>_TO (base::)

</xsl:text> 239 258 <!-- --> 240 259 <xsl:text>// for compatibility with Win32
</xsl:text> 241 260 <xsl:text>VBOX_EXTERN_C const nsID IID_</xsl:text> 242 <xsl:value-of select=" @name"/>261 <xsl:value-of select="$name"/> 243 262 <xsl:text>;
</xsl:text> 244 263 <xsl:text>%}

</xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.