Changeset 85298 in vbox for trunk/src/VBox/Main/idl
- Timestamp:
- Jul 13, 2020 9:42:28 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139276
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/comimpl.xsl
r85295 r85298 388 388 </xsl:call-template> 389 389 </xsl:variable> 390 <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(ComSafeArrayInArg(a_', @name, ')); ')"/> 390 <xsl:text> if (SUCCEEDED(hrc)) </xsl:text> 391 <xsl:value-of select="concat(' hrc = ',$obj, '->set_', @name, '(ComSafeArrayInArg(a_', @name, ')); ')"/> 391 392 </xsl:when> 392 <xsl:when test="substring($aType, string-length($aType) - 1) = '_T'"> <!-- To avoid pedantic gcc warnings/errors. --> 393 <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(',$aName, '); ')"/> 393 <xsl:when test="(@type='wstring') or (@type = 'uuid')"> 394 <xsl:text> if (SUCCEEDED(hrc)) </xsl:text> 395 <xsl:value-of select="concat(' hrc = ',$obj, '->set_', @name, '(',$aName, '); ')"/> 394 396 </xsl:when> 395 397 <xsl:otherwise> 396 <xsl:value-of select="concat(' 398 <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(',$aName, '); ')"/> 397 399 </xsl:otherwise> 398 400 </xsl:choose> … … 488 490 <xsl:value-of select="concat(' ', $mType, ' ', $mName,'; ')" /> 489 491 <xsl:value-of select=" 'public: '" /> 490 <xsl:value-of select="concat(' STDMETHOD(COMGETTER(', $capsName,'))(',$pTypeNameOut,') { ')" />492 <xsl:value-of select="concat(' STDMETHOD(COMGETTER(', $capsName,'))(',$pTypeNameOut,') RT_OVERRIDE { ')" /> 491 493 <xsl:call-template name="genRetParam"> 492 494 <xsl:with-param name="type" select="@type" /> … … 499 501 500 502 <xsl:if test="not(@readonly='yes')"> 501 <xsl:value-of select="concat(' STDMETHOD(COMSETTER(', $capsName,'))(',$pTypeNameIn,') { ')" />503 <xsl:value-of select="concat(' STDMETHOD(COMSETTER(', $capsName,'))(',$pTypeNameIn,') RT_OVERRIDE { ')" /> 502 504 <xsl:call-template name="genSetParam"> 503 505 <xsl:with-param name="type" select="@type" /> … … 567 569 </xsl:call-template> 568 570 <xsl:value-of select=" ' END_COM_MAP() '" /> 569 <xsl:value-of select="concat(' ',$implName,'() { /* printf("',$implName,'\n")*/;} ')" />570 <xsl:value-of select="concat(' virtual ~',$implName,'() { /* printf("~',$implName,'\n")*/; uninit(); } ')" />571 <xsl:value-of select="concat(' ',$implName,'() { /*Log(("',$implName,'\n"))*/;} ')" /> 572 <xsl:value-of select="concat(' virtual ~',$implName,'() { /*Log(("~',$implName,'\n"))*/; uninit(); } ')" /> 571 573 <xsl:text><![CDATA[ 572 574 HRESULT FinalConstruct() … … 580 582 BaseFinalRelease(); 581 583 } 582 STDMETHOD(COMGETTER(Type))(VBoxEventType_T *aType) 584 STDMETHOD(COMGETTER(Type))(VBoxEventType_T *aType) RT_OVERRIDE 583 585 { 584 586 return mEvent->COMGETTER(Type)(aType); 585 587 } 586 STDMETHOD(COMGETTER(Source))(IEventSource * *aSource) 588 STDMETHOD(COMGETTER(Source))(IEventSource * *aSource) RT_OVERRIDE 587 589 { 588 590 return mEvent->COMGETTER(Source)(aSource); 589 591 } 590 STDMETHOD(COMGETTER(Waitable))(BOOL *aWaitable) 592 STDMETHOD(COMGETTER(Waitable))(BOOL *aWaitable) RT_OVERRIDE 591 593 { 592 594 return mEvent->COMGETTER(Waitable)(aWaitable); 593 595 } 594 STDMETHOD(SetProcessed)() 596 STDMETHOD(SetProcessed)() RT_OVERRIDE 595 597 { 596 598 return mEvent->SetProcessed(); 597 599 } 598 STDMETHOD(WaitProcessed)(LONG aTimeout, BOOL *aResult) 600 STDMETHOD(WaitProcessed)(LONG aTimeout, BOOL *aResult) RT_OVERRIDE 599 601 { 600 602 return mEvent->WaitProcessed(aTimeout, aResult); … … 617 619 return mEvent->init(aSource, aType); 618 620 } 619 STDMETHOD(AddVeto)(IN_BSTR aVeto) 621 STDMETHOD(AddVeto)(IN_BSTR aVeto) RT_OVERRIDE 620 622 { 621 623 return mEvent->AddVeto(aVeto); 622 624 } 623 STDMETHOD(IsVetoed)(BOOL *aResult) 625 STDMETHOD(IsVetoed)(BOOL *aResult) RT_OVERRIDE 624 626 { 625 627 return mEvent->IsVetoed(aResult); 626 628 } 627 STDMETHOD(GetVetos)(ComSafeArrayOut(BSTR, aVetos)) 629 STDMETHOD(GetVetos)(ComSafeArrayOut(BSTR, aVetos)) RT_OVERRIDE 628 630 { 629 631 return mEvent->GetVetos(ComSafeArrayOutArg(aVetos)); 630 632 } 631 STDMETHOD(AddApproval)(IN_BSTR aReason) 633 STDMETHOD(AddApproval)(IN_BSTR aReason) RT_OVERRIDE 632 634 { 633 635 return mEvent->AddApproval(aReason); 634 636 } 635 STDMETHOD(IsApproved)(BOOL *aResult) 637 STDMETHOD(IsApproved)(BOOL *aResult) RT_OVERRIDE 636 638 { 637 639 return mEvent->IsApproved(aResult); 638 640 } 639 STDMETHOD(GetApprovals)(ComSafeArrayOut(BSTR, aReasons)) 641 STDMETHOD(GetApprovals)(ComSafeArrayOut(BSTR, aReasons)) RT_OVERRIDE 640 642 { 641 643 return mEvent->GetApprovals(ComSafeArrayOutArg(aReasons)); … … 653 655 return mEvent->init(aSource, aType, aWaitable); 654 656 } 655 STDMETHOD(COMGETTER(Generation))(ULONG *aGeneration) 657 STDMETHOD(COMGETTER(Generation))(ULONG *aGeneration) RT_OVERRIDE 656 658 { 657 659 *aGeneration = mGeneration; 658 660 return S_OK; 659 661 } 660 STDMETHOD(Reuse)() 662 STDMETHOD(Reuse)() RT_OVERRIDE 661 663 { 662 664 ASMAtomicIncU32((volatile uint32_t *)&mGeneration); … … 734 736 <xsl:text> { </xsl:text> 735 737 <xsl:text> pEvtImpl->Reuse(); </xsl:text> 736 <xsl:text> { </xsl:text>738 <xsl:text> HRESULT hrc = S_OK; </xsl:text> 737 739 <xsl:call-template name="genAttrInitCode"> 738 740 <xsl:with-param name="name" select="@name" /> 739 741 <xsl:with-param name="obj" select="'pEvtImpl'" /> 740 742 </xsl:call-template> 741 <xsl:text> } </xsl:text> 742 <xsl:text> return S_OK; </xsl:text> 743 <xsl:text> return hrc; </xsl:text> 743 744 <xsl:text> } </xsl:text> 744 745 <xsl:text> return E_INVALIDARG; </xsl:text> … … 760 761 <xsl:text> hrc = EvtObj->init(aSource, VBoxEventType_</xsl:text><xsl:value-of select="$evid"/> 761 762 <xsl:text>, </xsl:text><xsl:value-of select="$waitable" /><xsl:text> /*waitable*/); </xsl:text> 762 <xsl:text> if (SUCCEEDED(hrc)) </xsl:text>763 <xsl:text> { </xsl:text>764 763 <xsl:call-template name="genAttrInitCode"> 765 764 <xsl:with-param name="name" select="@name" /> 766 765 <xsl:with-param name="obj" select="'EvtObj'" /> 767 766 </xsl:call-template> 767 <xsl:text> if (SUCCEEDED(hrc)) </xsl:text> 768 <xsl:text> { </xsl:text> 768 769 <xsl:text> hrc = EvtObj.queryInterfaceTo(aEvent); </xsl:text> 770 <xsl:text> if (SUCCEEDED(hrc)) </xsl:text> 771 <xsl:text> return hrc; </xsl:text> 769 772 <xsl:text> } </xsl:text> 770 773 <xsl:text> } </xsl:text> 774 <xsl:text> *aEvent = NULL; </xsl:text> 771 775 <xsl:text> return hrc; </xsl:text> 772 776 <xsl:text>} </xsl:text>
Note:
See TracChangeset
for help on using the changeset viewer.