Changeset 30479 in vbox
- Timestamp:
- Jun 28, 2010 5:19:53 PM (15 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/comimpl.xsl
r30477 r30479 7 7 <!-- 8 8 9 autogen.xsl: 10 XSLT stylesheet that generates C++ classes implementing simple 11 COM classes implementation from VirtualBox.xidl. 9 comimpl.xsl: 10 XSLT stylesheet that generates COM C++ classes implementing 11 interfaces described in VirtualBox.xidl. 12 For now we generate implementation for events, as they are 13 rather trivial container classes for their read-only attributes. 14 Further extension to other interfaces is possible and anticipated. 12 15 13 16 Copyright (C) 2010 Oracle Corporation … … 119 122 <xsl:param name="type"/> 120 123 <xsl:param name="safearray"/> 121 124 122 125 <xsl:value-of select="concat(' ', $member, ' = ', $param, '; ')"/> 123 126 </xsl:template> … … 134 137 <xsl:otherwise> 135 138 <xsl:value-of select="concat(' *', $param, ' = ', $member, '; ')"/> 136 </xsl:otherwise> 139 </xsl:otherwise> 137 140 </xsl:choose> 138 141 </xsl:template> … … 161 164 </xsl:choose> 162 165 163 166 164 167 <xsl:for-each select="//interface[@name=$name]/attribute"> 165 168 <xsl:variable name="aType"> … … 171 174 </xsl:call-template> 172 175 </xsl:variable> 173 176 174 177 <xsl:value-of select="concat(' ',$aType, ' a_',@name,' = va_arg(args, ',$aType,'); ')"/> 175 178 <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(a_', @name, '); ')"/> … … 186 189 <xsl:value-of select="//interface[@name=$name]/@extends" /> 187 190 </xsl:variable> 188 191 189 192 <xsl:choose> 190 193 <xsl:when test="$extends='IEvent'"> … … 208 211 </xsl:otherwise> 209 212 </xsl:choose> 210 </xsl:template> 213 </xsl:template> 211 214 212 215 <xsl:template name="genAttrCode"> … … 362 365 <xsl:value-of select="'}; '" /> 363 366 364 367 365 368 <xsl:call-template name="genImplList"> 366 369 <xsl:with-param name="impl" select="$implName" /> … … 368 371 <xsl:with-param name="depth" select="'2'" /> 369 372 <xsl:with-param name="parents" select="''" /> 370 </xsl:call-template> 373 </xsl:call-template> 371 374 372 375 </xsl:template> … … 384 387 </xsl:otherwise> 385 388 </xsl:choose> 386 </xsl:variable> 389 </xsl:variable> 387 390 <xsl:value-of select="concat(' case VBoxEventType_', @id, ': ')"/> 388 391 <xsl:value-of select=" ' { '"/> 389 392 <xsl:value-of select="concat(' ComObjPtr<', $implName, '> obj; ')"/> 390 393 <xsl:value-of select=" ' obj.createObject(); '"/> 391 <xsl:value-of select="concat(' obj->init(source, aType, ', $waitable, '); ')"/> 394 <xsl:value-of select="concat(' obj->init(source, aType, ', $waitable, '); ')"/> 392 395 <xsl:call-template name="genAttrInitCode"> 393 396 <xsl:with-param name="name" select="@name" /> … … 460 463 </xsl:call-template> 461 464 </xsl:when> 462 </xsl:choose> 465 </xsl:choose> 463 466 </xsl:template> 464 467
Note:
See TracChangeset
for help on using the changeset viewer.