diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2014-03-26 19:21:20 +0000 |
---|---|---|
committer | <> | 2014-05-08 15:03:54 +0000 |
commit | fb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch) | |
tree | c2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Main/idl/comimpl.xsl | |
parent | 58ed4748338f9466599adfc8a9171280ed99e23f (diff) | |
download | VirtualBox-master.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Main/idl/comimpl.xsl')
-rw-r--r-- | src/VBox/Main/idl/comimpl.xsl | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/VBox/Main/idl/comimpl.xsl b/src/VBox/Main/idl/comimpl.xsl index 58889cbd..59ae42b8 100644 --- a/src/VBox/Main/idl/comimpl.xsl +++ b/src/VBox/Main/idl/comimpl.xsl @@ -13,7 +13,7 @@ rather trivial container classes for their read-only attributes. Further extension to other interfaces is possible and anticipated. - Copyright (C) 2010-2012 Oracle Corporation + Copyright (C) 2010-2013 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; @@ -30,7 +30,7 @@ encoding="utf-8" indent="no"/> -<xsl:include href="../webservice/websrv-shared.inc.xsl" /> +<xsl:include href="typemap-shared.inc.xsl" /> <!-- $G_kind contains what kind of COM class implementation we generate --> <xsl:variable name="G_xsltFilename" select="'autogen.xsl'" /> @@ -46,7 +46,7 @@ */ /* - * Copyright (C) 2010-2012 Oracle Corporation + * Copyright (C) 2010-2013 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -149,6 +149,12 @@ <xsl:when test="$type='octet'"> <xsl:value-of select="'BYTE'" /> </xsl:when> + <xsl:when test="$type='unsigned short'"> + <xsl:value-of select="'USHORT'" /> + </xsl:when> + <xsl:when test="$type='short'"> + <xsl:value-of select="'SHORT'" /> + </xsl:when> <xsl:when test="$type='unsigned long'"> <xsl:value-of select="'ULONG'" /> </xsl:when> @@ -189,7 +195,7 @@ <xsl:when test="$safearray='yes'"> <xsl:variable name="elemtype"> <xsl:call-template name="typeIdl2Back"> - <xsl:with-param name="type" select="@type" /> + <xsl:with-param name="type" select="$type" /> <xsl:with-param name="safearray" select="''" /> <xsl:with-param name="dir" select="'in'" /> </xsl:call-template> @@ -212,7 +218,7 @@ <xsl:when test="$safearray='yes'"> <xsl:variable name="elemtype"> <xsl:call-template name="typeIdl2Back"> - <xsl:with-param name="type" select="@type" /> + <xsl:with-param name="type" select="$type" /> <xsl:with-param name="safearray" select="''" /> <xsl:with-param name="dir" select="'in'" /> </xsl:call-template> @@ -293,14 +299,14 @@ </xsl:call-template> </xsl:variable> <xsl:value-of select=" '#ifdef RT_OS_WINDOWS '"/> - <xsl:value-of select=" ' SAFEARRAY * aPtr = va_arg(args, SAFEARRAY *); '"/> - <xsl:value-of select="concat(' com::SafeArray<', $elemtype,'> aArr(aPtr); ')"/> + <xsl:value-of select="concat(' SAFEARRAY *aPtr_', @name, ' = va_arg(args, SAFEARRAY *); ')"/> + <xsl:value-of select="concat(' com::SafeArray<', $elemtype,'> aArr_', @name, '(aPtr_', @name, '); ')"/> <xsl:value-of select=" '#else '"/> - <xsl:value-of select=" ' PRUint32 aArrSize = va_arg(args, PRUint32); '"/> - <xsl:value-of select=" ' void* aPtr = va_arg(args, void*); '"/> - <xsl:value-of select="concat(' com::SafeArray<', $elemtype,'> aArr(aArrSize, (', $elemtype,'*)aPtr); ')"/> + <xsl:value-of select="concat(' PRUint32 aArrSize_', @name, ' = va_arg(args, PRUint32); ')"/> + <xsl:value-of select="concat(' void* aPtr_', @name, ' = va_arg(args, void*); ')"/> + <xsl:value-of select="concat(' com::SafeArray<', $elemtype,'> aArr_', @name, '(aArrSize_', @name, ', (', $elemtype,'*)aPtr_', @name, '); ')"/> <xsl:value-of select=" '#endif '"/> - <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(ComSafeArrayAsInParam(aArr)); ')"/> + <xsl:value-of select="concat(' ',$obj, '->set_', @name, '(ComSafeArrayAsInParam(aArr_', @name, ')); ')"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="concat(' ',$aTypeName, ' = va_arg(args, ',$aType,'); ')"/> @@ -321,10 +327,10 @@ </xsl:variable> <xsl:choose> - <xsl:when test="$extends='IEvent'"> + <xsl:when test="$name='IEvent'"> <xsl:value-of select=" '#ifdef VBOX_WITH_XPCOM '" /> <xsl:value-of select="concat('NS_DECL_CLASSINFO(', $impl, ') ')" /> - <xsl:value-of select="concat('NS_IMPL_THREADSAFE_ISUPPORTS',$depth,'_CI(', $impl, ', ', $name, $parents, ', IEvent) ')" /> + <xsl:value-of select="concat('NS_IMPL_THREADSAFE_ISUPPORTS',$depth,'_CI(', $impl, $parents, ', IEvent) ')" /> <xsl:value-of select=" '#endif '"/> </xsl:when> <xsl:when test="//interface[@name=$extends]"> @@ -332,7 +338,7 @@ <xsl:with-param name="impl" select="$impl" /> <xsl:with-param name="name" select="$extends" /> <xsl:with-param name="depth" select="$depth+1" /> - <xsl:with-param name="parents" select="concat($parents, ', ', @name)" /> + <xsl:with-param name="parents" select="concat($parents, ', ', $name)" /> </xsl:call-template> </xsl:when> <xsl:otherwise> @@ -585,7 +591,7 @@ private: <xsl:call-template name="genImplList"> <xsl:with-param name="impl" select="$implName" /> <xsl:with-param name="name" select="@name" /> - <xsl:with-param name="depth" select="'2'" /> + <xsl:with-param name="depth" select="'1'" /> <xsl:with-param name="parents" select="''" /> </xsl:call-template> |