apiwrap-server.xsl revision dcc162af9a2a47325b89f457ed215957415d3d3a
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync XSLT stylesheet that generates C++ API wrappers (server side) from
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync Copyright (C) 2010-2013 Oracle Corporation
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync This file is part of VirtualBox Open Source Edition (OSE), as
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync available from http://www.virtualbox.org. This file is free software;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync you can redistribute it and/or modify it under the terms of the GNU
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync General Public License (GPL) as published by the Free Software
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync Foundation, in version 2 as it comes in the "COPYING" file of the
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync version="1.0"
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync global XSLT variables
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<xsl:variable name="G_xsltFilename" select="'apiwrap-server.xsl'"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsynctemplates for file separation
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('	', $file, ' \ ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' // ##### BEGINFILE "', $file, '" ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' // ##### ENDFILE "', $file, '" ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsynctemplates for file headers/footers
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' * VirtualBox API class wrapper ', $type, ' for I', $class, '.')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * DO NOT EDIT! This is a generated file.
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * Generated from: src/VBox/Main/idl/VirtualBox.xidl
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * Copyright (C) 2011-2013 Oracle Corporation
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * available from http://www.virtualbox.org. This file is free software;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * you can redistribute it and/or modify it under the terms of the GNU
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * General Public License (GPL) as published by the Free Software
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' COM_INTERFACE_ENTRY(', $iface/@name, ') ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- now recurse to emit all base interfaces -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="extends" select="$iface/@extends"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="$extends and not($extends='$unknown') and not($extends='$dispatched') and not($extends='$errorinfo')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="iface" select="//interface[@name=$extends]"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('#ifndef ', substring(@name, 2), 'Wrap_H_ ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('#define ', substring(@name, 2), 'Wrap_H_')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('class ATL_NO_VTABLE ', substring(@name, 2), 'Wrap:')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync public VirtualBoxBase,
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' VBOX_SCRIPTABLE_IMPL(', @name, ') ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(', substring(@name, 2), 'Wrap, ', @name, ') ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' DECLARE_NOT_AGGREGATABLE(', substring(@name, 2), 'Wrap) ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' BEGIN_COM_MAP(', substring(@name, 2), 'Wrap) ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' COM_INTERFACE_ENTRY2(IDispatch, ', @name, ') ')"/>
dcc162af9a2a47325b89f457ed215957415d3d3avboxsync <xsl:text> COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
dcc162af9a2a47325b89f457ed215957415d3d3avboxsync END_COM_MAP()
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' DECLARE_EMPTY_CTOR_DTOR(', substring(@name, 2), 'Wrap) ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('#endif // !', substring(@name, 2), 'Wrap_H_ ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('#define LOG_GROUP_MAIN_OVERRIDE LOG_GROUP_MAIN_', translate(substring(@name, 2), $G_lowerCase, $G_upperCase), ' ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('#include "', substring(@name, 2), 'Wrap.h" ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('NS_DECL_CLASSINFO(', substring(@name, 2), 'Wrap) NS_IMPL_THREADSAFE_ISUPPORTS1_CI(', substring(@name, 2), 'Wrap, ', @name, ') ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync templates for dealing with names and parameters
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="translate($str, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_', ' ')"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:value-of select="string-length($option) > 0 and contains(concat(',', translate($optionlist, ' ', ''), ','), concat(',', $option, ','))"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- get C++ glue type from IDL type from table in typemap-shared.inc.xsl -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="thatif" select="//interface[@name=$type]"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="thatifname" select="$thatif/@name"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="msg" select="concat('translatepublictype: Type "', $type, '" is not supported.')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- get C++ wrap type from IDL type from table in typemap-shared.inc.xsl -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="wraptypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="$dir='in' and not($safearray='yes')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="$dir='in' and not($safearray='yes')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="thatif" select="//interface[@name=$type]"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="thatifname" select="$thatif/@name"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="$dir='in' and not($safearray='yes')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('ComPtr<', $thatifname, '> &')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="msg" select="concat('translatewrappedtype: Type "', $type, '" is not supported.')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- get C format string for IDL type from table in typemap-shared.inc.xsl -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="wrapfmt" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluefmt"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="msg" select="concat('translatefmtcpectype: Type "', $type, '" is not supported.')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<xsl:template match="attribute/@type | param/@type" mode="public">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="substring($gluetype,string-length($gluetype))!='*'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<xsl:template match="attribute/@type | param/@type" mode="wrapped">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="safearray" select="../@safearray"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:when test="substring($wraptype,string-length($wraptype))='&'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="substring($wraptype,1,string-length($wraptype)-2)"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:when test="substring($wraptype2,string-length($wraptype2))='>'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:when test="substring($wraptype,string-length($wraptype))='>'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="substring($wraptype,string-length($wraptype))!='&'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="substring($wraptype,string-length($wraptype))!='*'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<xsl:template match="attribute/@type | param/@type" mode="logparamtext">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="$mod!='ref' and ($dir='out' or $dir='ret')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="safearray" select="../@safearray"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<xsl:template match="attribute/@type | param/@type" mode="logparamval">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:when test="../@safearray='yes' and $mod!='ref'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:when test="../@safearray='yes' and $mod!='ref'">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<xsl:template match="attribute/@type | param/@type" mode="paramvalconversion">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="thatif" select="../../../..//interface[@name=$type]"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:text>ComTypeInConverter<IUnknown>(</xsl:text>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:text>ComTypeOutConverter<IUnknown>(</xsl:text>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="thatifname" select="$thatif/@name"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('<', $thatifname, '>(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('<', $gluetype, '>(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit attribute
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' STDMETHOD(COMGETTER(', $attrbasename, '))(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' STDMETHOD(COMSETTER(', $attrbasename, '))(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' virtual HRESULT get', $attrbasename, '(')"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="optionlist" select="@wrap-hint-server"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="option" select="'passcaller'"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="wrapped">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' virtual HRESULT set', $attrbasename, '(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="wrapped">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('STDMETHODIMP ', $topclass, 'Wrap::COMGETTER(', $attrbasename, ')(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamtext">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('"', $topclass, '::get', $attrbasename, '", ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamval">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync VirtualBoxBase::clearError();
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync HRESULT hrc;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync AutoCaller autoCaller(this);
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync if (FAILED(autoCaller.rc()))
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' hrc = get', $attrbasename, '(')"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="optionlist" select="@wrap-hint-server"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="option" select="'passcaller'"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="paramvalconversion">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync catch (HRESULT hrc2)
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync hrc = hrc2;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync catch (...)
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamtext">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('"', $topclass, '::get', $attrbasename, '", ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamval">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync return hrc;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('STDMETHODIMP ', $topclass, 'Wrap::COMSETTER(', $attrbasename, ')(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- @todo check in parameters if possible -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamtext">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('"', $topclass, '::set', $attrbasename, '", ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamval">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync VirtualBoxBase::clearError();
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync HRESULT hrc;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync AutoCaller autoCaller(this);
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync if (FAILED(autoCaller.rc()))
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' hrc = set', $attrbasename, '(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="paramvalconversion">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync catch (HRESULT hrc2)
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync hrc = hrc2;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync catch (...)
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, </xsl:text>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('"', $topclass, '::set', $attrbasename, '", ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync return hrc;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit all attributes of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- first recurse to emit all base interfaces -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="extends" select="$iface/@extends"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="$extends and not($extends='$unknown') and not($extends='$dispatched') and not($extends='$errorinfo')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="iface" select="//interface[@name=$extends]"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="topclass" select="$topclass"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('// ', $iface/@name, ' properties')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' // ', $pmode, ' ', $iface/@name, ' properties ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface/attribute" mode="public"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface/attribute" mode="wrapped"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface/attribute" mode="code">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="topclass" select="$topclass"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit method
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="optionlist" select="@wrap-hint-server"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="option" select="'passcaller'"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="wrapped">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="str" select="concat($topclass, @name)"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('STDMETHODIMP ', $topclass, 'Wrap::', $methodbasename, '(')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamtext">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(', "', $topclass, '::', @name, '"')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamval">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync VirtualBoxBase::clearError();
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync HRESULT hrc;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- @todo check in parameters if possible -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:text> CheckComArgOutPointerValidThrow(a</xsl:text>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync AutoCaller autoCaller(this);
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync if (FAILED(autoCaller.rc()))
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' hrc = ', @name, '(')"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="optionlist" select="@wrap-hint-server"/>
9f3a515a29d45728a5c5330459abd3429e35bda1vboxsync <xsl:with-param name="option" select="'passcaller'"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="paramvalconversion">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync catch (HRESULT hrc2)
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync hrc = hrc2;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync catch (...)
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamtext">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(', "', $topclass, '::', @name, '"')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="@type" mode="logparamval">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync return hrc;
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit all methods of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- first recurse to emit all base interfaces -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="extends" select="$iface/@extends"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="$extends and not($extends='$unknown') and not($extends='$dispatched') and not($extends='$errorinfo')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="iface" select="//interface[@name=$extends]"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="topclass" select="$topclass"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('// ', $iface/@name, ' methods')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat(' // ', $pmode, ' ', $iface/@name, ' methods ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface/method" mode="public"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface/method" mode="wrapped"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface/method" mode="code">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="topclass" select="$topclass"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit all attributes and methods declarations of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- attributes -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- methods -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit auxiliary method declarations of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- currently nothing, maybe later some generic FinalConstruct/... helper declaration for ComObjPtr -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit the header file of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="filename" select="concat(substring(@name, 2), 'Wrap.h')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface" mode="startfile">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="class" select="substring(@name, 2)"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="." mode="classheader"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- interface attributes/methods (public) -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- auxiliary methods (public) -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- switch to private -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- wrapped interface attributes/methods (private) -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="." mode="classfooter"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface" mode="endfile">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface" mode="listfile">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit all attributes and methods definitions of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat('DEFINE_EMPTY_CTOR_DTOR(', substring($iface/@name, 2), 'Wrap) ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- attributes -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="topclass" select="substring($iface/@name, 2)"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- methods -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="topclass" select="substring($iface/@name, 2)"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit auxiliary method declarations of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- currently nothing, maybe later some generic FinalConstruct/... implementation -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync emit the code file of an interface
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:variable name="filename" select="concat(substring(@name, 2), 'Wrap.cpp')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface" mode="startfile">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:with-param name="class" select="substring(@name, 2)"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="." mode="codeheader"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- @todo special thread logging for API methods returning IProgress??? would be very usefulcurrently nothing, maybe later some generic FinalConstruct/... implementation -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- interface attributes/methods (public) -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <!-- auxiliary methods (public) -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="." mode="codefooter"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface" mode="endfile">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:apply-templates select="$iface" mode="listfile">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync wildcard match, ignore everything which has no explicit match
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync ignore all if tags except those for XPIDL or MIDL target
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:if test="(@target = 'xpidl') or (@target = 'midl')">
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync library match
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync library match
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- - - - - - - - - - - - - - - - - - - - - - -
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync - - - - - - - - - - - - - - - - - - - - - - -->
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync <xsl:value-of select="concat($filelistonly, ' := \ ')"/>
c0d22c23d3289cef0332f4d61ab15df48ed34979vboxsync<!-- vi: set tabstop=4 shiftwidth=4 expandtab: -->