21#include <typelib/typedescription.h>
22#include <typelib/typeclass.h>
23#include <uno/sequence2.h>
26#include <uno/mapping.h>
27#include <uno/dispatcher.h>
29#include <osl/interlck.h>
36extern typelib_TypeDescriptionReference *
g_pVoidType;
45 void * pRet =
nullptr;
50 (*mapping->mapInterface)(
51 mapping, &pRet,
p,
reinterpret_cast<typelib_InterfaceTypeDescription *
>(pTypeDescr) );
55 TYPELIB_DANGER_GET( &pTypeDescr, pType );
56 (*mapping->mapInterface)(
57 mapping, &pRet,
p,
reinterpret_cast<typelib_InterfaceTypeDescription *
>(pTypeDescr) );
58 TYPELIB_DANGER_RELEASE( pTypeDescr );
64inline void _acquire(
void * p, uno_AcquireFunc acquire )
74 (*
static_cast<uno_Interface *
>(
p)->acquire)(
static_cast<uno_Interface *
>(
p) );
79inline void _release(
void * p, uno_ReleaseFunc release )
89 (*
static_cast<uno_Interface *
>(
p)->release)(
static_cast<uno_Interface *
>(
p) );
96 sal_Int32 nElementSize, sal_Int32
nElements )
100 (
static_cast<sal_uInt64
>(nElementSize) *
static_cast<sal_uInt64
>(
nElements));
101 if (nSize > 0xffffffffU)
104 return static_cast<sal_uInt32
>(nSize);
110 osl_atomic_increment( &
g_emptySeq.nRefCount );
126#if OSL_DEBUG_LEVEL > 0
127 pAny->pData =
reinterpret_cast<void *
>(uintptr_t(0xdeadbeef));
133#define TYPE_ACQUIRE( pType ) \
134 osl_atomic_increment( &(pType)->nRefCount );
138 void * pUnoI, typelib_TypeDescriptionReference * pDestType );
142 typelib_TypeDescriptionReference
const * pType1, typelib_TypeDescriptionReference
const * pType2 )
145 return (pType1 == pType2 ||
146 (pType1->eTypeClass == pType2->eTypeClass &&
147 pType1->pTypeName->length == pType2->pTypeName->length &&
148 ::rtl_ustr_compare( pType1->pTypeName->buffer, pType2->pTypeName->buffer ) == 0));
struct _uno_Mapping uno_Mapping
struct _typelib_TypeDescription typelib_TypeDescription
void _release(void *p, uno_ReleaseFunc release)
typelib_TypeDescriptionReference * g_pVoidType
void _acquire(void *p, uno_AcquireFunc acquire)
typelib_TypeDescriptionReference * _getVoidType()
void * _map(void *p, typelib_TypeDescriptionReference *pType, typelib_TypeDescription *pTypeDescr, uno_Mapping *mapping)
void CONSTRUCT_EMPTY_ANY(uno_Any *pAny)
sal_uInt32 calcSeqMemSize(sal_Int32 nElementSize, sal_Int32 nElements)
void * binuno_queryInterface(void *pUnoI, typelib_TypeDescriptionReference *pDestType)
bool _type_equals(typelib_TypeDescriptionReference const *pType1, typelib_TypeDescriptionReference const *pType2)
uno_Sequence * createEmptySequence()
typelib_TypeDescriptionReference **SAL_CALL typelib_static_type_getByTypeClass(typelib_TypeClass eTypeClass) SAL_THROW_EXTERN_C()
void SAL_CALL typelib_typedescriptionreference_acquire(typelib_TypeDescriptionReference *pRef) SAL_THROW_EXTERN_C()
#define SAL_SEQUENCE_HEADER_SIZE