Kaydet (Commit) a2c46486 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

[API CHANGE] Remove UNOIDL "array" and "union" vaporware remnants from cppu

This leaves only aborting stubs (for SONAME stability) for

  typelib_static_array_type_init
  typelib_typedescription_newArray
  typelib_typedescription_newUnion

and completely removes corresponding

  typelib_ArrayTypeDescription
  typelib_UnionTypeDescription

structs and C++ inline

  getCppuArrayType*

functions.  None of this should ever have been called by client code anyway, so
while technically an API change it should not matter for practical purposes.

Change-Id: I23769d104d545533bf578762b79994e269d78c22
üst 9e77c2fb
......@@ -31,6 +31,7 @@ $(eval $(call gb_Library_add_cobjects,cppu,\
))
$(eval $(call gb_Library_add_exception_objects,cppu,\
cppu/source/cppu/compat \
cppu/source/cppu/cppu_opt \
cppu/source/threadpool/current \
cppu/source/threadpool/jobqueue \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <sal/config.h>
#include <cstdlib>
#include <typelib/typedescription.h>
#include <rtl/ustring.h>
#include <sal/types.h>
// Stubs for removed functionality, to be killed when we bump sal SONAME
extern "C" {
SAL_DLLPUBLIC_EXPORT void SAL_CALL typelib_static_array_type_init(
typelib_TypeDescriptionReference **, typelib_TypeDescriptionReference *,
sal_Int32, ...) SAL_THROW_EXTERN_C()
{
std::abort();
}
SAL_DLLPUBLIC_EXPORT void SAL_CALL typelib_typedescription_newArray(
typelib_TypeDescription **, typelib_TypeDescriptionReference *,
sal_Int32, sal_Int32 *) SAL_THROW_EXTERN_C()
{
std::abort();
}
SAL_DLLPUBLIC_EXPORT void SAL_CALL typelib_typedescription_newUnion(
typelib_TypeDescription **, rtl_uString *,
typelib_TypeDescriptionReference *, sal_Int64,
typelib_TypeDescriptionReference *, sal_Int32, void *)
SAL_THROW_EXTERN_C()
{
std::abort();
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -573,71 +573,6 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_static_enum_type_init(
}
}
//##################################################################################################
CPPU_DLLPUBLIC void SAL_CALL typelib_static_array_type_init(
typelib_TypeDescriptionReference ** ppRef,
typelib_TypeDescriptionReference * pElementTypeRef,
sal_Int32 nDimensions, ... )
SAL_THROW_EXTERN_C()
{
if (! *ppRef)
{
MutexGuard aGuard( typelib_StaticInitMutex::get() );
if (! *ppRef)
{
OUStringBuffer aBuf( 32 );
aBuf.append( pElementTypeRef->pTypeName );
va_list dimArgs;
va_start( dimArgs, nDimensions );
sal_Int32 dim = 0;
sal_Int32 nElements = 1;
sal_Int32* pDimensions = new sal_Int32[nDimensions];
for (sal_Int32 i=0; i < nDimensions; i++)
{
dim = va_arg( dimArgs, int);
pDimensions[i] = dim;
aBuf.appendAscii("[");
aBuf.append(dim);
aBuf.appendAscii("]");
nElements *= dim;
}
va_end( dimArgs );
OUString aTypeName( aBuf.makeStringAndClear() );
assert( ! TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK(typelib_TypeClass_ARRAY) );
*ppRef = igetTypeByName( aTypeName.pData );
if (!*ppRef)
{
typelib_TypeDescription * pReg = 0;
::typelib_typedescription_newEmpty(
&pReg, typelib_TypeClass_ARRAY, aTypeName.pData );
typelib_ArrayTypeDescription * pArray = (typelib_ArrayTypeDescription *)pReg;
pArray->nDimensions = nDimensions;
pArray->nTotalElements = nElements;
pArray->pDimensions = pDimensions;
typelib_typedescriptionreference_acquire(pElementTypeRef);
((typelib_IndirectTypeDescription*)pArray)->pType = pElementTypeRef;
pReg->pWeakRef = (typelib_TypeDescriptionReference *)pReg;
// sizeof( void ) not allowed
pReg->nSize = ::typelib_typedescription_getAlignedUnoSize( pReg, 0, pReg->nAlignment );
pReg->nAlignment = ::adjustAlignment( pReg->nAlignment );
pReg->bComplete = sal_True;
::typelib_typedescription_register( &pReg );
*ppRef = (typelib_TypeDescriptionReference *)pReg;
assert( *ppRef == pReg->pWeakRef );
} else
delete [] pDimensions;
// another static ref:
++((*ppRef)->nStaticRefCount);
}
}
}
} // extern "C"
}
......
This diff is collapsed.
......@@ -101,128 +101,6 @@ inline sal_Bool _assignStruct(
return sal_True;
}
//--------------------------------------------------------------------------------------------------
inline sal_Bool _assignArray(
void * pDest, void * pSource,
typelib_ArrayTypeDescription * pTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
{
typelib_TypeDescriptionReference * pElementTypeRef =
((typelib_IndirectTypeDescription *)pTypeDescr)->pType;
typelib_TypeDescription * pElementTypeDescr = NULL;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementTypeRef );
sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
sal_Int32 nElementSize = pElementTypeDescr->nSize;
sal_Int32 i;
sal_Bool bRet = sal_False;
switch ( pElementTypeRef->eTypeClass )
{
case typelib_TypeClass_CHAR:
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT:
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
case typelib_TypeClass_FLOAT:
case typelib_TypeClass_DOUBLE:
for (i=0; i < nTotalElements; i++)
{
memcpy((sal_Char *)pDest + i * nElementSize,
(sal_Char *)pSource + i * nElementSize,
nElementSize);
}
bRet = sal_True;
break;
case typelib_TypeClass_STRING:
for (i=0; i < nTotalElements; i++)
{
::rtl_uString_assign( (rtl_uString **)pDest + i,
((rtl_uString **)pSource)[i] );
}
bRet = sal_True;
break;
case typelib_TypeClass_TYPE:
for (i=0; i < nTotalElements; i++)
{
typelib_TypeDescriptionReference ** pp = (typelib_TypeDescriptionReference **)pDest + i;
::typelib_typedescriptionreference_release( *pp );
*pp = *((typelib_TypeDescriptionReference **)pSource + i);
TYPE_ACQUIRE( *pp );
}
bRet = sal_True;
break;
case typelib_TypeClass_ANY:
for (i=0; i < nTotalElements; i++)
{
_destructAny( (uno_Any *)pDest + i, release );
_copyConstructAny( (uno_Any *)pDest + i, (uno_Any *)pSource + i,
pElementTypeRef, pElementTypeDescr, acquire, 0 );
}
bRet = sal_True;
break;
case typelib_TypeClass_ENUM:
for (i=0; i < nTotalElements; i++)
{
*((sal_Int32 *)pDest + i) = *((sal_Int32 *)pSource + i);
}
bRet = sal_True;
break;
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
for (i=0; i < nTotalElements; i++)
{
bRet = _assignStruct( (sal_Char *)pDest + i * nElementSize,
(sal_Char *)pSource + i * nElementSize,
(typelib_CompoundTypeDescription *)pElementTypeDescr,
queryInterface, acquire, release );
if (! bRet)
break;
}
bRet = sal_True;
break;
case typelib_TypeClass_UNION:
for (i=0; i < nTotalElements; i++)
{
_destructUnion( (sal_Char*)pDest + i * nElementSize, pElementTypeDescr, release );
_copyConstructUnion( (sal_Char*)pDest + i * nElementSize,
(sal_Char*)pSource + i * nElementSize,
pElementTypeDescr, acquire, 0 );
}
bRet = sal_True;
break;
case typelib_TypeClass_SEQUENCE:
for (i=0; i < nTotalElements; i++)
{
osl_atomic_increment( &(*((uno_Sequence **)pSource + i))->nRefCount );
idestructSequence(
*((uno_Sequence **)pDest + i),
pElementTypeRef, pElementTypeDescr, release );
*((uno_Sequence **)pDest + i) = *((uno_Sequence **)pSource + i);
}
bRet = sal_True;
break;
case typelib_TypeClass_INTERFACE:
for (i=0; i < nTotalElements; i++)
{
_assignInterface(
(void **)((sal_Char*)pDest + i * nElementSize),
*(void **)((sal_Char*)pSource + i * nElementSize),
acquire, release );
}
bRet = sal_True;
break;
default:
OSL_ASSERT(false);
break;
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return bRet;
}
//--------------------------------------------------------------------------------------------------
inline sal_Bool _assignData(
void * pDest,
typelib_TypeDescriptionReference * pDestType, typelib_TypeDescription * pDestTypeDescr,
......@@ -516,47 +394,6 @@ inline sal_Bool _assignData(
return bRet;
}
return sal_False;
case typelib_TypeClass_ARRAY:
{
sal_Bool bRet = sal_False;
if (pSourceTypeDescr)
{
typelib_ArrayTypeDescription * pTypeDescr =
(typelib_ArrayTypeDescription *)pSourceTypeDescr;
bRet = _assignArray( pDest, pSource, pTypeDescr, queryInterface, acquire, release );
}
else
{
TYPELIB_DANGER_GET( &pSourceTypeDescr, pSourceType );
typelib_ArrayTypeDescription * pTypeDescr =
(typelib_ArrayTypeDescription *)pSourceTypeDescr;
if ( pTypeDescr )
{
bRet = _assignArray(
pDest, pSource, pTypeDescr, queryInterface, acquire, release );
}
TYPELIB_DANGER_RELEASE( pSourceTypeDescr );
}
return bRet;
}
case typelib_TypeClass_UNION:
if (_type_equals( pDestType, pSourceType ))
{
if (pDestTypeDescr)
{
_destructUnion( pDest, pDestTypeDescr, release );
_copyConstructUnion( pDest, pSource, pDestTypeDescr, acquire, 0 );
}
else
{
TYPELIB_DANGER_GET( &pDestTypeDescr, pDestType );
_destructUnion( pDest, pDestTypeDescr, release );
_copyConstructUnion( pDest, pSource, pDestTypeDescr, acquire, 0 );
TYPELIB_DANGER_RELEASE( pDestTypeDescr );
}
return sal_True;
}
return sal_False;
case typelib_TypeClass_SEQUENCE:
if (typelib_TypeClass_SEQUENCE != pSourceType->eTypeClass)
return sal_False;
......
......@@ -29,17 +29,6 @@ namespace cppu
//#### construction ################################################################################
//##################################################################################################
//--------------------------------------------------------------------------------------------------
inline void _defaultConstructUnion(
void * pMem,
typelib_TypeDescription * pTypeDescr )
SAL_THROW(())
{
::uno_type_constructData(
(char *)pMem + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
((typelib_UnionTypeDescription *)pTypeDescr)->pDefaultTypeRef );
*(sal_Int64 *)pMem = ((typelib_UnionTypeDescription *)pTypeDescr)->nDefaultDiscriminant;
}
//==================================================================================================
void defaultConstructStruct(
void * pMem,
......@@ -66,87 +55,6 @@ inline void _defaultConstructStruct(
}
}
//--------------------------------------------------------------------------------------------------
inline void _defaultConstructArray(
void * pMem,
typelib_ArrayTypeDescription * pTypeDescr )
{
typelib_TypeDescription * pElementType = NULL;
TYPELIB_DANGER_GET( &pElementType, ((typelib_IndirectTypeDescription *)pTypeDescr)->pType );
sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
sal_Int32 nElementSize = pElementType->nSize;
sal_Int32 i;
switch ( pElementType->eTypeClass )
{
case typelib_TypeClass_CHAR:
case typelib_TypeClass_BOOLEAN:
case typelib_TypeClass_BYTE:
case typelib_TypeClass_SHORT:
case typelib_TypeClass_UNSIGNED_SHORT:
case typelib_TypeClass_LONG:
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
case typelib_TypeClass_FLOAT:
case typelib_TypeClass_DOUBLE:
case typelib_TypeClass_INTERFACE:
memset(pMem, 0, nElementSize * nTotalElements);
break;
case typelib_TypeClass_STRING:
for (i=0; i < nTotalElements; i++)
{
rtl_uString** ppElement = (rtl_uString **)pMem + i;
*ppElement = 0;
rtl_uString_new( ppElement);
}
break;
case typelib_TypeClass_TYPE:
for (i=0; i < nTotalElements; i++)
{
typelib_TypeDescriptionReference** ppElement = (typelib_TypeDescriptionReference **)pMem + i;
*ppElement = _getVoidType();
}
break;
case typelib_TypeClass_ANY:
for (i=0; i < nTotalElements; i++)
{
CONSTRUCT_EMPTY_ANY( (uno_Any *)pMem + i );
}
break;
case typelib_TypeClass_ENUM:
for (i=0; i < nTotalElements; i++)
{
*((sal_Int32 *)pMem + i) = ((typelib_EnumTypeDescription *)pElementType)->nDefaultEnumValue;
}
break;
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
for (i=0; i < nTotalElements; i++)
{
_defaultConstructStruct( (sal_Char*)pMem + i * nElementSize, (typelib_CompoundTypeDescription *)pElementType );
}
break;
case typelib_TypeClass_UNION:
for (i=0; i < nTotalElements; i++)
{
_defaultConstructUnion( (sal_Char*)pMem + i * nElementSize, pElementType );
}
break;
case typelib_TypeClass_SEQUENCE:
for (i=0; i < nTotalElements; i++)
{
uno_Sequence** ppElement = (uno_Sequence **)pMem + i;
*ppElement = createEmptySequence();
}
break;
default:
OSL_ASSERT(false);
break;
}
TYPELIB_DANGER_RELEASE( pElementType );
}
//--------------------------------------------------------------------------------------------------
inline void _defaultConstructData(
void * pMem,
......@@ -218,30 +126,6 @@ inline void _defaultConstructData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_ARRAY:
if (pTypeDescr)
{
_defaultConstructArray( pMem, (typelib_ArrayTypeDescription *)pTypeDescr );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
_defaultConstructArray( pMem, (typelib_ArrayTypeDescription *)pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_UNION:
if (pTypeDescr)
{
_defaultConstructUnion( pMem, pTypeDescr );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
_defaultConstructUnion( pMem, pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_SEQUENCE:
*(uno_Sequence **)pMem = createEmptySequence();
break;
......
......@@ -95,65 +95,6 @@ inline void _copyConstructStruct(
}
}
}
//--------------------------------------------------------------------------------------------------
inline void _copyConstructArray(
void * pDest, void * pSource,
typelib_ArrayTypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping )
{
typelib_TypeDescriptionReference * pElementTypeRef = ((typelib_IndirectTypeDescription *)pTypeDescr)->pType;
typelib_TypeDescription * pElementTypeDescr = NULL;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementTypeRef );
sal_Int32 nElementSize = ((typelib_TypeDescription*)pElementTypeDescr)->nSize;
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
if (mapping)
{
for(sal_Int32 i = 0; i < nTotalElements; i++)
{
::uno_type_copyAndConvertData(
(sal_Char *)pDest + i * nElementSize,
(sal_Char *)pSource + i * nElementSize,
pElementTypeRef, mapping );
}
}
else
{
for(sal_Int32 i = 0; i < nTotalElements; i++)
{
::uno_type_copyData(
(sal_Char *)pDest + (i * nElementSize),
(sal_Char *)pSource + (i * nElementSize),
pElementTypeRef, acquire );
}
}
}
//--------------------------------------------------------------------------------------------------
inline void _copyConstructUnion(
void * pDest, void * pSource,
typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_Mapping * mapping )
SAL_THROW (())
{
typelib_TypeDescriptionReference * pSetType = _unionGetSetType( pSource, pTypeDescr );
if (mapping)
{
::uno_type_copyAndConvertData(
(char *)pDest + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
(char *)pSource + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
pSetType, mapping );
}
else
{
::uno_type_copyData(
(char *)pDest + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
(char *)pSource + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
pSetType, acquire );
}
*(sal_Int64 *)pDest = *(sal_Int64 *)pSource;
typelib_typedescriptionreference_release( pSetType );
}
//------------------------------------------------------------------------------
uno_Sequence * copyConstructSequence(
......@@ -256,40 +197,6 @@ inline void _copyConstructAnyFromData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_ARRAY:
if (pTypeDescr)
{
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_copyConstructArray(
pDestAny->pData, pSource,
(typelib_ArrayTypeDescription *)pTypeDescr,
acquire, mapping );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_copyConstructArray(
pDestAny->pData, pSource,
(typelib_ArrayTypeDescription *)pTypeDescr,
acquire, mapping );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_UNION:
if (pTypeDescr)
{
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_copyConstructUnion( pDestAny->pData, pSource, pTypeDescr, acquire, mapping );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_copyConstructUnion( pDestAny->pData, pSource, pTypeDescr, acquire, mapping );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_SEQUENCE:
pDestAny->pData = &pDestAny->pReserved;
if (pTypeDescr)
......@@ -450,36 +357,6 @@ inline void _copyConstructAny(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_ARRAY:
if (pTypeDescr)
{
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_defaultConstructArray(
pDestAny->pData, (typelib_ArrayTypeDescription *)pTypeDescr );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_defaultConstructArray(
pDestAny->pData, (typelib_ArrayTypeDescription *)pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_UNION:
if (pTypeDescr)
{
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_defaultConstructUnion( pDestAny->pData, pTypeDescr );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
pDestAny->pData = ::rtl_allocateMemory( pTypeDescr->nSize );
_defaultConstructUnion( pDestAny->pData, pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_SEQUENCE:
pDestAny->pData = &pDestAny->pReserved;
*(uno_Sequence **)pDestAny->pData = createEmptySequence();
......@@ -568,60 +445,6 @@ inline uno_Sequence * icopyConstructSequence(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_ARRAY:
{
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
sal_Int32 nElementSize = pElementTypeDescr->nSize;
char * pSourceElements = pSource->elements;
pDest = allocSeq( nElementSize, nElements );
if (pDest != 0)
{
char * pElements = pDest->elements;
for ( sal_Int32 nPos = nElements; nPos--; )
{
_copyConstructArray(
pElements + (nPos * nElementSize),
pSourceElements + (nPos * nElementSize),
(typelib_ArrayTypeDescription *)pElementTypeDescr,
acquire, mapping );
}
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_UNION:
{
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
sal_Int32 nElementSize = pElementTypeDescr->nSize;
sal_Int32 nValueOffset =
((typelib_UnionTypeDescription *)
pElementTypeDescr)->nValueOffset;
pDest = allocSeq( nElementSize, nElements );
if (pDest != 0)
{
char * pElements = pDest->elements;
char * pSourceElements = pSource->elements;
for ( sal_Int32 nPos = nElements; nPos--; )
{
char * pDest2 =
pElements + (nPos * nElementSize);
char * pSource2 =
pSourceElements + (nPos * nElementSize);
typelib_TypeDescriptionReference * pSetType =
_unionGetSetType( pSource2, pElementTypeDescr );
::uno_type_copyAndConvertData(
pDest2 + nValueOffset, pSource2 + nValueOffset,
pSetType, mapping );
*(sal_Int64 *)pDest2 = *(sal_Int64 *)pSource2;
::typelib_typedescriptionreference_release( pSetType );
}
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_SEQUENCE: // sequence of sequence
{
pDest = allocSeq( sizeof (uno_Sequence *), nElements );
......@@ -765,36 +588,6 @@ inline void _copyConstructData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_ARRAY:
if (pTypeDescr)
{
_copyConstructArray(
pDest, pSource,
(typelib_ArrayTypeDescription *)pTypeDescr,
acquire, mapping );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
_copyConstructArray(
pDest, pSource,
(typelib_ArrayTypeDescription *)pTypeDescr,
acquire, mapping );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_UNION:
if (pTypeDescr)
{
_copyConstructUnion( pDest, pSource, pTypeDescr, acquire, mapping );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
_copyConstructUnion( pDest, pSource, pTypeDescr, acquire, mapping );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_SEQUENCE:
if (mapping)
{
......
......@@ -29,19 +29,6 @@ namespace cppu
//#### destruction #################################################################################
//##################################################################################################
//--------------------------------------------------------------------------------------------------
inline void _destructUnion(
void * pValue,
typelib_TypeDescription * pTypeDescr,
uno_ReleaseFunc release )
SAL_THROW(())
{
typelib_TypeDescriptionReference * pType = _unionGetSetType( pValue, pTypeDescr );
::uno_type_destructData(
(char *)pValue + ((typelib_UnionTypeDescription *)pTypeDescr)->nValueOffset,
pType, release );
::typelib_typedescriptionreference_release( pType );
}
//==================================================================================================
void destructStruct(
void * pValue,
......@@ -71,29 +58,6 @@ inline void _destructStruct(
}
}
//--------------------------------------------------------------------------------------------------
inline void _destructArray(
void * pValue,
typelib_ArrayTypeDescription * pTypeDescr,
uno_ReleaseFunc release )
throw ()
{
typelib_TypeDescription * pElementType = NULL;
TYPELIB_DANGER_GET( &pElementType, ((typelib_IndirectTypeDescription *)pTypeDescr)->pType );
sal_Int32 nElementSize = pElementType->nSize;
TYPELIB_DANGER_RELEASE( pElementType );
sal_Int32 nTotalElements = pTypeDescr->nTotalElements;
for(sal_Int32 i=0; i < nTotalElements; i++)
{
::uno_type_destructData(
(sal_Char *)pValue + i * nElementSize,
((typelib_IndirectTypeDescription *)pTypeDescr)->pType, release );
}
typelib_typedescriptionreference_release(((typelib_IndirectTypeDescription *)pTypeDescr)->pType);
}
//==============================================================================
void destructSequence(
uno_Sequence * pSequence,
......@@ -155,15 +119,6 @@ inline void _destructAny(
::rtl_freeMemory( pAny->pData );
break;
}
case typelib_TypeClass_UNION:
{
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pType );
_destructUnion( pAny->pData, pTypeDescr, release );
TYPELIB_DANGER_RELEASE( pTypeDescr );
::rtl_freeMemory( pAny->pData );
break;
}
case typelib_TypeClass_SEQUENCE:
{
destructSequence(
......@@ -257,22 +212,6 @@ inline sal_Int32 idestructElements(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return nSize;
}
case typelib_TypeClass_UNION:
{
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
sal_Int32 nElementSize = pElementTypeDescr->nSize;
for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
{
_destructUnion(
(char *)pElements + (nElementSize * nPos),
pElementTypeDescr,
release );
}
sal_Int32 nSize = pElementTypeDescr->nSize;
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return nSize;
}
case typelib_TypeClass_SEQUENCE:
{
typelib_TypeDescription * pElementTypeDescr = 0;
......@@ -387,30 +326,6 @@ inline void _destructData(
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_ARRAY:
if (pTypeDescr)
{
_destructArray( pValue, (typelib_ArrayTypeDescription *)pTypeDescr, release );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
_destructArray( pValue, (typelib_ArrayTypeDescription *)pTypeDescr, release );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_UNION:
if (pTypeDescr)
{
_destructUnion( pValue, pTypeDescr, release );
}
else
{
TYPELIB_DANGER_GET( &pTypeDescr, pType );
_destructUnion( pValue, pTypeDescr, release );
TYPELIB_DANGER_RELEASE( pTypeDescr );
}
break;
case typelib_TypeClass_SEQUENCE:
{
idestructSequence(
......
......@@ -226,32 +226,6 @@ inline sal_Bool _equalSequence(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return sal_True;
}
case typelib_TypeClass_UNION:
{
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
sal_Int32 nElementSize = pElementTypeDescr->nSize;
sal_Int32 nValueOffset = ((typelib_UnionTypeDescription *)pElementTypeDescr)->nValueOffset;
for ( sal_Int32 nPos = nElements; nPos--; )
{
char * pDest2 = (char *)pDestElements + (nPos * nElementSize);
char * pSource2 = (char *)pSourceElements + (nPos * nElementSize);
typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
pDest2, pElementTypeDescr );
sal_Bool bRet = ::uno_type_equalData(
pDest2 + nValueOffset, pSetType,
pSource2 + nValueOffset, pSetType,
queryInterface, release );
::typelib_typedescriptionreference_release( pSetType );
if (! bRet)
{
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return sal_False;
}
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
return sal_True;
}
case typelib_TypeClass_SEQUENCE: // sequence of sequence
{
typelib_TypeDescription * pElementTypeDescr = 0;
......@@ -586,40 +560,6 @@ inline sal_Bool _equalData(
TYPELIB_DANGER_RELEASE( pDestTypeDescr );
return bRet;
}
case typelib_TypeClass_UNION:
if (_type_equals( pDestType, pSourceType ) &&
*(sal_Int64 *)pDest == *(sal_Int64 *)pSource) // same discriminant
{
sal_Bool bRet;
if (pDestTypeDescr)
{
typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
pDest, pDestTypeDescr );
bRet = ::uno_type_equalData(
(char *)pDest + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
pSetType,
(char *)pSource + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
pSetType,
queryInterface, release );
typelib_typedescriptionreference_release( pSetType );
}
else
{
TYPELIB_DANGER_GET( &pDestTypeDescr, pDestType );
typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
pDest, pDestTypeDescr );
bRet = ::uno_type_equalData(
(char *)pDest + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
pSetType,
(char *)pSource + ((typelib_UnionTypeDescription *)pDestTypeDescr)->nValueOffset,
pSetType,
queryInterface, release );
typelib_typedescriptionreference_release( pSetType );
TYPELIB_DANGER_RELEASE( pDestTypeDescr );
}
return bRet;
}
return sal_False;
case typelib_TypeClass_SEQUENCE:
if (_type_equals( pDestType, pSourceType ))
{
......
......@@ -150,32 +150,6 @@ inline typelib_TypeDescriptionReference * _getVoidType()
extern "C" void * binuno_queryInterface(
void * pUnoI, typelib_TypeDescriptionReference * pDestType );
//--------------------------------------------------------------------------------------------------
inline typelib_TypeDescriptionReference * _unionGetSetType(
void * pUnion, typelib_TypeDescription * pTD )
SAL_THROW(())
{
typelib_TypeDescriptionReference * pRet = 0;
sal_Int32 nPos;
sal_Int64 * pDiscr = ((typelib_UnionTypeDescription *)pTD)->pDiscriminants;
sal_Int64 nDiscr = *(sal_Int64 *)pUnion;
for ( nPos = ((typelib_UnionTypeDescription *)pTD)->nMembers; nPos--; )
{
if (pDiscr[nPos] == nDiscr)
{
pRet = ((typelib_UnionTypeDescription *)pTD)->ppTypeRefs[nPos];
break;
}
}
if (nPos >= 0)
{
// default
pRet = ((typelib_UnionTypeDescription *)pTD)->pDefaultTypeRef;
}
typelib_typedescriptionreference_acquire( pRet );
return pRet;
}
//--------------------------------------------------------------------------------------------------
inline sal_Bool _type_equals(
typelib_TypeDescriptionReference * pType1, typelib_TypeDescriptionReference * pType2 )
......
......@@ -265,65 +265,6 @@ static inline bool idefaultConstructElements(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_ARRAY:
{
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
sal_Int32 nElementSize = pElementTypeDescr->nSize;
if (nAlloc >= 0)
pSeq = reallocSeq( pSeq, nElementSize, nAlloc );
if (pSeq != 0)
{
char * pElements = pSeq->elements;
for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
{
_defaultConstructArray(
pElements + (nElementSize * nPos),
(typelib_ArrayTypeDescription *)pElementTypeDescr );
}
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_UNION:
{
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
sal_Int32 nElementSize = pElementTypeDescr->nSize;
if (nAlloc >= 0)
pSeq = reallocSeq( pSeq, nElementSize, nAlloc );
if (pSeq != 0)
{
sal_Int32 nValueOffset =
((typelib_UnionTypeDescription *)
pElementTypeDescr)->nValueOffset;
sal_Int64 nDefaultDiscr =
((typelib_UnionTypeDescription *)
pElementTypeDescr)->nDefaultDiscriminant;
typelib_TypeDescription * pDefaultTypeDescr = 0;
TYPELIB_DANGER_GET(
&pDefaultTypeDescr,
((typelib_UnionTypeDescription *)
pElementTypeDescr)->pDefaultTypeRef );
char * pElements = pSeq->elements;
for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
{
char * pMem = pElements + (nElementSize * nPos);
::uno_constructData(
(char *)pMem + nValueOffset, pDefaultTypeDescr );
*(sal_Int64 *)pMem = nDefaultDiscr;
}
TYPELIB_DANGER_RELEASE( pDefaultTypeDescr );
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_SEQUENCE:
{
if (nAlloc >= 0)
......@@ -588,42 +529,6 @@ static inline bool icopyConstructFromElements(
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_UNION:
{
typelib_TypeDescription * pElementTypeDescr = 0;
TYPELIB_DANGER_GET( &pElementTypeDescr, pElementType );
sal_Int32 nElementSize = pElementTypeDescr->nSize;
if (nAlloc >= 0)
pSeq = reallocSeq( pSeq, nElementSize, nAlloc );
if (pSeq != 0)
{
char * pDestElements = pSeq->elements;
sal_Int32 nValueOffset =
((typelib_UnionTypeDescription *)
pElementTypeDescr)->nValueOffset;
for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
{
char * pDest =
pDestElements + (nElementSize * nPos);
char * pSource =
(char *)pSourceElements + (nElementSize * nPos);
typelib_TypeDescriptionReference * pSetType = _unionGetSetType(
pSource, pElementTypeDescr );
::uno_type_copyData(
pDest + nValueOffset,
pSource + nValueOffset,
pSetType, acquire );
*(sal_Int64 *)pDest = *(sal_Int64 *)pSource;
typelib_typedescriptionreference_release( pSetType );
}
}
TYPELIB_DANGER_RELEASE( pElementTypeDescr );
break;
}
case typelib_TypeClass_SEQUENCE: // sequence of sequence
{
if (nAlloc >= 0)
......
......@@ -377,49 +377,6 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * )
*/
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW(());
/** Array template function to get meta type for one-dimensional arrays.
@param pT array pointer
@return type of array
*/
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType1( T * pT ) SAL_THROW(());
/** Array template function to get meta type for two-dimensional arrays.
@param pT array pointer
@return type of array
*/
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType2( T * pT ) SAL_THROW(());
/** Array template function to get meta type for three-dimensional arrays.
@param pT array pointer
@return type of array
*/
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType3( T * pT ) SAL_THROW(());
/** Array template function to get meta type for four-dimensional arrays.
@param pT array pointer
@return type of array
*/
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType4( T * pT ) SAL_THROW(());
/** Array template function to get meta type for five-dimensional arrays.
@param pT array pointer
@return type of array
*/
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType5( T * pT ) SAL_THROW(());
/** Array template function to get meta type for six-dimensional arrays.
@param pT array pointer
@return type of array
*/
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType6( T * pT ) SAL_THROW(());
/** Gets the meta type of an IDL type.
The difference between this function template (with a type parameter) and
......
......@@ -186,123 +186,6 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARA
return ::cppu::UnoType< double >::get();
}
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType1( T * pT ) SAL_THROW(())
{
if (! ::com::sun::star::uno::Array< T >::s_pType)
{
const ::com::sun::star::uno::Type & rElementType =
::cppu::getTypeFavourUnsigned( *pT );
sal_Int32 size = sizeof( **pT );
sal_Int32 dim1 = sizeof( *pT ) / size;
::typelib_static_array_type_init(
& ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(),
1, dim1 );
}
return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
& ::com::sun::star::uno::Array< T >::s_pType );
}
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType2( T * pT ) SAL_THROW(())
{
if (! ::com::sun::star::uno::Array< T >::s_pType)
{
const ::com::sun::star::uno::Type & rElementType =
::cppu::getTypeFavourUnsigned( **pT );
sal_Int32 size = sizeof( ***pT );
sal_Int32 dim2 = sizeof( **pT ) / size;
sal_Int32 dim1 = sizeof( *pT ) / dim2 / size;
::typelib_static_array_type_init(
& ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(),
2, dim1, dim2 );
}
return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
& ::com::sun::star::uno::Array< T >::s_pType );
}
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType3( T * pT ) SAL_THROW(())
{
if (! ::com::sun::star::uno::Array< T >::s_pType)
{
const ::com::sun::star::uno::Type & rElementType =
::cppu::getTypeFavourUnsigned( ***pT );
sal_Int32 size = sizeof( ****pT );
sal_Int32 dim3 = sizeof( ***pT ) / size;
sal_Int32 dim2 = sizeof( **pT ) / dim3 / size;
sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3)/ size;
::typelib_static_array_type_init(
& ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(),
3, dim1, dim2, dim3 );
}
return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
& ::com::sun::star::uno::Array< T >::s_pType );
}
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType4( T * pT ) SAL_THROW(())
{
if (! ::com::sun::star::uno::Array< T >::s_pType)
{
const ::com::sun::star::uno::Type & rElementType =
::cppu::getTypeFavourUnsigned( ****pT );
sal_Int32 size = sizeof( *****pT );
sal_Int32 dim4 = sizeof( ****pT ) / size;
sal_Int32 dim3 = sizeof( ***pT ) / dim4 / size;
sal_Int32 dim2 = sizeof( **pT ) / (dim3 * dim4) / size;
sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3 * dim4) / size;
::typelib_static_array_type_init(
& ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(),
4, dim1, dim2, dim3, dim4 );
}
return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
& ::com::sun::star::uno::Array< T >::s_pType );
}
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType5( T * pT ) SAL_THROW(())
{
if (! ::com::sun::star::uno::Array< T >::s_pType)
{
const ::com::sun::star::uno::Type & rElementType =
::cppu::getTypeFavourUnsigned( *****pT );
sal_Int32 size = sizeof( ******pT );
sal_Int32 dim5 = sizeof( *****pT ) / size;
sal_Int32 dim4 = sizeof( ****pT ) / dim5 / size;
sal_Int32 dim3 = sizeof( ***pT ) / (dim4 * dim5) / size;
sal_Int32 dim2 = sizeof( **pT ) / (dim3 * dim4 * dim5) / size;
sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3 * dim4 * dim5) / size;
::typelib_static_array_type_init(
& ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(),
5, dim1, dim2, dim3, dim4, dim5 );
}
return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
& ::com::sun::star::uno::Array< T >::s_pType );
}
template< class T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType6( T * pT ) SAL_THROW(())
{
if (! ::com::sun::star::uno::Array< T >::s_pType)
{
const ::com::sun::star::uno::Type & rElementType =
::cppu::getTypeFavourUnsigned( ******pT );
sal_Int32 size = sizeof( *******pT );
sal_Int32 dim6 = sizeof( ******pT ) / size;
sal_Int32 dim5 = sizeof( *****pT ) / dim6 / size;
sal_Int32 dim4 = sizeof( ****pT ) / (dim5 * dim6) / size;
sal_Int32 dim3 = sizeof( ***pT ) / (dim4 * dim5 * dim6) / size;
sal_Int32 dim2 = sizeof( **pT ) / (dim3 * dim4 * dim5 * dim6) / size;
sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3 * dim4 * dim5 * dim6) / size;
::typelib_static_array_type_init(
& ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(),
6, dim1, dim2, dim3, dim4, dim5, dim6 );
}
return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
& ::com::sun::star::uno::Array< T >::s_pType );
}
template< typename T >
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType() SAL_THROW(())
{
......
......@@ -95,7 +95,7 @@ typedef struct _typelib_TypeDescription
void * pReserved;
/** flag to determine whether the description is complete:
compound and union types lack of member names, enums lack of member types and names,
compound types lack of member names, enums lack of member types and names,
interfaces lack of members and table init.
Call typelib_typedescription_complete() if false.
*/
......@@ -165,42 +165,7 @@ typedef struct _typelib_StructTypeDescription
sal_Bool * pParameterizedTypes;
} typelib_StructTypeDescription;
/** Type description of a union. The type class of this description is typelib_TypeClass_UNION.
*/
typedef struct _typelib_UnionTypeDescription
{
/** inherits all members of typelib_TypeDescription
*/
typelib_TypeDescription aBase;
/** type of the discriminant
*/
typelib_TypeDescriptionReference * pDiscriminantTypeRef;
/** union default descriminant
*/
sal_Int64 nDefaultDiscriminant;
/** union default member type (may be 0)
*/
typelib_TypeDescriptionReference * pDefaultTypeRef;
/** number of union member types
*/
sal_Int32 nMembers;
/** union member discriminant values (same order as idl declaration)
*/
sal_Int64 * pDiscriminants;
/** union member value types (same order as idl declaration)
*/
typelib_TypeDescriptionReference ** ppTypeRefs;
/** union member value names (same order as idl declaration)
*/
rtl_uString ** ppMemberNames;
/** union value offset for data access
*/
sal_Int32 nValueOffset;
} typelib_UnionTypeDescription;
/** Type description of an array or sequence.
/** Type description of a sequence.
*/
typedef struct _typelib_IndirectTypeDescription
{
......@@ -208,30 +173,11 @@ typedef struct _typelib_IndirectTypeDescription
*/
typelib_TypeDescription aBase;
/** array, sequence: pointer to element type
/** pointer to element type
*/
typelib_TypeDescriptionReference * pType;
} typelib_IndirectTypeDescription;
/** Type description of an array.
*/
typedef struct _typelib_ArrayTypeDescription
{
/** inherits all members of typelib_IndirectTypeDescription
*/
typelib_IndirectTypeDescription aBase;
/** number of dimensions
*/
sal_Int32 nDimensions;
/** number of total array elements
*/
sal_Int32 nTotalElements;
/** array of dimensions
*/
sal_Int32 * pDimensions;
} typelib_ArrayTypeDescription;
/** Type description of an enum. The type class of this description is typelib_TypeClass_ENUM.
*/
typedef struct _typelib_EnumTypeDescription
......@@ -531,47 +477,10 @@ typedef struct _typelib_Parameter_Init
sal_Bool bOut;
} typelib_Parameter_Init;
/** Init struct of union types for typelib_typedescription_newUnion().
*/
typedef struct _typelib_Union_Init
{
/** union member discriminant
*/
sal_Int64 nDiscriminant;
/** union member name
*/
rtl_uString * pMemberName;
/** union member type
*/
typelib_TypeDescriptionReference* pTypeRef;
} typelib_Union_Init;
#if defined( SAL_W32)
#pragma pack(pop)
#endif
/** Creates a union type description. All discriminants are handled as int64 values.
The pDiscriminantTypeRef must be of type byte, short, ..., up to hyper.
@param ppRet inout union type description
@param pTypeName name of union type
@param pDiscriminantTypeRef discriminant type
@param nDefaultDiscriminant default discriminant
@param pDefaultTypeRef default value type of union
@param nMembers number of union members
@param pMembers init members
*/
CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newUnion(
typelib_TypeDescription ** ppRet,
rtl_uString * pTypeName,
typelib_TypeDescriptionReference * pDiscriminantTypeRef,
sal_Int64 nDefaultDiscriminant,
typelib_TypeDescriptionReference * pDefaultTypeRef,
sal_Int32 nMembers,
typelib_Union_Init * pMembers )
SAL_THROW_EXTERN_C();
/** Creates an enum type description.
@param ppRet inout enum type description
......@@ -590,20 +499,6 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newEnum(
sal_Int32 * pEnumValues )
SAL_THROW_EXTERN_C();
/** Creates an array type description.
@param ppRet inout enum type description
@param pElementTypeRef element type
@param nDimensions number of dimensions
@param pDimensions dimensions
*/
CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newArray(
typelib_TypeDescription ** ppRet,
typelib_TypeDescriptionReference * pElementTypeRef,
sal_Int32 nDimensions,
sal_Int32 * pDimensions )
SAL_THROW_EXTERN_C ();
/** Creates a new type description.
Since this function can only be used to create type descriptions for plain
......@@ -614,7 +509,7 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_typedescription_newArray(
@param ppRet inout type description
@param eTypeClass type class
@param pTypeName name of type
@param pType sequence, array: element type;
@param pType sequence: element type;
struct, Exception: base type;
@param nMembers number of members if struct, exception
@param pMembers array of members if struct, exception
......@@ -988,19 +883,6 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_static_sequence_type_init(
typelib_TypeDescriptionReference * pElementType )
SAL_THROW_EXTERN_C ();
/** Inits static array type reference. Thread synchronizes on typelib init mutex.
@param ppRef pointer to type reference pointer
@param pElementType element type of sequence
@param nDimensions number of dimensions
@param ... additional sal_Int32 parameter for each dimension
*/
CPPU_DLLPUBLIC void SAL_CALL typelib_static_array_type_init(
typelib_TypeDescriptionReference ** ppRef,
typelib_TypeDescriptionReference * pElementType,
sal_Int32 nDimensions, ... )
SAL_THROW_EXTERN_C ();
/** Inits incomplete static compound type reference. Thread synchronizes on typelib init mutex.
Since this function can only be used to create type descriptions for plain
......@@ -1084,7 +966,7 @@ CPPU_DLLPUBLIC void SAL_CALL typelib_static_enum_type_init(
sal_Int32 nDefaultValue )
SAL_THROW_EXTERN_C();
/** Completes a typedescription to be used for, e.g., marshalling values. COMPOUND, UNION,
/** Completes a typedescription to be used for, e.g., marshalling values. COMPOUND,
INTERFACE and ENUM type descriptions may be partly initialized (see typelib_static_...(),
typelib_TypeDescription::bComplete). For interface type descriptions, this will also
init index tables.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment