VirtualBox

Changeset 31633 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Aug 13, 2010 10:36:32 AM (14 years ago)
Author:
vboxsync
Message:

events: more on reusability

Location:
trunk/src/VBox/Main/idl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r31629 r31633  
    1412014120
    1412114121
     14122   <interface
     14123      name="IReusableEvent" extends="IEvent"
     14124      uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
     14125      wsmap="managed"
     14126      >
     14127    <desc>Base abstract interface for all reusable events.</desc>
     14128
     14129    <attribute name="generation" readonly="yes" type="unsigned long">
     14130      <desc>Current generation of event, incremented on reuse.</desc>
     14131    </attribute>
     14132
     14133    <method name="reuse">
     14134      <desc>
     14135        Marks an event as reused, increments 'generation', fields shall no
     14136        longer be considered valid.
     14137      </desc>
     14138    </method>
     14139  </interface>
     14140
    1412214141  <interface
    1412314142      name="IMachineEvent" extends="IEvent"
  • trunk/src/VBox/Main/idl/comimpl.xsl

    r31572 r31633  
    579579
    580580<xsl:template name="genSwitchCase">
     581  <xsl:param name="ifaceName" />
    581582  <xsl:param name="implName" />
    582583  <xsl:param name="reinit" />
     
    595596  <xsl:choose>
    596597    <xsl:when test="$reinit='yes'">
    597       <xsl:value-of select="concat('              ComPtr&lt;', $implName, '&gt; obj;&#10;')"/>
    598       <xsl:value-of select="       '              obj = mEvent;&#10;'"/>
    599       <xsl:value-of select="       '              Assert(obj);&#10;'"/>
     598      <xsl:value-of select="concat('              ComPtr&lt;', $ifaceName, '&gt; iobj;&#10;')"/>
     599      <xsl:value-of select="       '              iobj = mEvent;&#10;'"/>
     600      <xsl:value-of select="       '              Assert(!iobj.isNull());&#10;'"/>
     601      <xsl:value-of select="concat('              ',$implName, '* obj = (', $implName, '*)(', $ifaceName, '*)iobj;&#10;')"/>
    600602      <xsl:value-of select="       '              obj->Reuse();&#10;'"/>
    601603    </xsl:when>
     
    634636    </xsl:variable>
    635637    <xsl:call-template name="genSwitchCase">
     638      <xsl:with-param name="ifaceName" select="@name" />
    636639      <xsl:with-param name="implName" select="$implName" />
    637640      <xsl:with-param name="reinit" select="'no'" />
     
    664667    </xsl:variable>
    665668    <xsl:call-template name="genSwitchCase">
     669      <xsl:with-param name="ifaceName" select="@name" />
    666670      <xsl:with-param name="implName" select="$implName" />
    667671      <xsl:with-param name="reinit" select="'yes'" />
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