VirtualBox

Changeset 30479 in vbox


Ignore:
Timestamp:
Jun 28, 2010 5:19:53 PM (15 years ago)
Author:
vboxsync
Message:

feedback

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/comimpl.xsl

    r30477 r30479  
    77<!--
    88
    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.
    1215
    1316     Copyright (C) 2010 Oracle Corporation
     
    119122  <xsl:param name="type"/>
    120123  <xsl:param name="safearray"/>
    121  
     124
    122125  <xsl:value-of select="concat('         ', $member, ' = ', $param, ';&#10;')"/>
    123126</xsl:template>
     
    134137    <xsl:otherwise>
    135138      <xsl:value-of select="concat('         *', $param, ' = ', $member, ';&#10;')"/>
    136     </xsl:otherwise>   
     139    </xsl:otherwise>
    137140  </xsl:choose>
    138141</xsl:template>
     
    161164  </xsl:choose>
    162165
    163  
     166
    164167  <xsl:for-each select="//interface[@name=$name]/attribute">
    165168    <xsl:variable name="aType">
     
    171174      </xsl:call-template>
    172175    </xsl:variable>
    173    
     176
    174177    <xsl:value-of select="concat('              ',$aType, ' a_',@name,' = va_arg(args, ',$aType,');&#10;')"/>
    175178    <xsl:value-of select="concat('              ',$obj, '->set_', @name, '(a_', @name, ');&#10;')"/>
     
    186189    <xsl:value-of select="//interface[@name=$name]/@extends" />
    187190  </xsl:variable>
    188  
     191
    189192  <xsl:choose>
    190193    <xsl:when test="$extends='IEvent'">
     
    208211    </xsl:otherwise>
    209212  </xsl:choose>
    210 </xsl:template> 
     213</xsl:template>
    211214
    212215<xsl:template name="genAttrCode">
     
    362365  <xsl:value-of select="'};&#10;'" />
    363366
    364  
     367
    365368  <xsl:call-template name="genImplList">
    366369    <xsl:with-param name="impl" select="$implName" />
     
    368371    <xsl:with-param name="depth" select="'2'" />
    369372    <xsl:with-param name="parents" select="''" />
    370   </xsl:call-template> 
     373  </xsl:call-template>
    371374
    372375</xsl:template>
     
    384387      </xsl:otherwise>
    385388    </xsl:choose>
    386   </xsl:variable> 
     389  </xsl:variable>
    387390  <xsl:value-of select="concat('         case VBoxEventType_', @id, ':&#10;')"/>
    388391  <xsl:value-of select="       '         {&#10;'"/>
    389392  <xsl:value-of select="concat('              ComObjPtr&lt;', $implName, '&gt; obj;&#10;')"/>
    390393  <xsl:value-of select="       '              obj.createObject();&#10;'"/>
    391   <xsl:value-of select="concat('              obj->init(source, aType, ', $waitable, ');&#10;')"/> 
     394  <xsl:value-of select="concat('              obj->init(source, aType, ', $waitable, ');&#10;')"/>
    392395  <xsl:call-template name="genAttrInitCode">
    393396    <xsl:with-param name="name" select="@name" />
     
    460463        </xsl:call-template>
    461464      </xsl:when>
    462    </xsl:choose>   
     465   </xsl:choose>
    463466</xsl:template>
    464467
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette