26#include <com/sun/star/uno/XInterface.hpp>
27#include <typelib/typedescription.h>
46 ::typelib_typedescription_release(
50#if OSL_DEBUG_LEVEL > 1
51 *(
int *)pInterface = 0xdeadbabe;
54 delete[]
reinterpret_cast< char *
>(pThis);
59 typelib_InterfaceTypeDescription * pTypeDescr, OUString
const & rOId)
66 std::unique_ptr< char[] > pMemory(
69 + (rVtables.
count - 1) * sizeof (
void **)]);
73 for (sal_Int32
i = 0;
i < rVtables.
count; ++
i) {
107 typelib_InterfaceTypeDescription * pTypeDescr_, OUString aOId_)
109 , pBridge( pBridge_ )
111 , pTypeDescr( pTypeDescr_ )
112 , oid(
std::move( aOId_ ))
115 ::typelib_typedescription_acquire( &
pTypeDescr->aBase );
128 return reinterpret_cast< com::sun::star::uno::XInterface *
>(
136 char const *
const base =
reinterpret_cast< char const *
>(16);
137 std::ptrdiff_t
const offset =
reinterpret_cast< char const *
>(
140 static_cast< char *
>(pInterface) - offset);
Holding environments and mappings.
uno_ExtEnvironment * getCppEnv()
uno_ExtEnvironment * getUnoEnv()
A cpp proxy wrapping a uno interface.
typelib_InterfaceTypeDescription * pTypeDescr
VtableFactory::Slot * vtables[1]
CppInterfaceProxy(CppInterfaceProxy const &)=delete
static CppInterfaceProxy * castInterfaceToProxy(void *pInterface)
std::atomic< std::size_t > nRef
friend void freeCppInterfaceProxy(uno_ExtEnvironment *pEnv, void *pInterface)
static com::sun::star::uno::XInterface * create(Bridge *pBridge, uno_Interface *pUnoI, typelib_InterfaceTypeDescription *pTypeDescr, OUString const &rOId)
static com::sun::star::uno::XInterface * castProxyToInterface(CppInterfaceProxy *pProxy)
Hand out vtable structures for interface type descriptions.
const Vtables & getVtables(typelib_InterfaceTypeDescription *type)
Given an interface type description, return its corresponding vtable structure.
static Slot * mapBlockToVtable(void *block)
Given a pointer to a block, turn it into a vtable pointer.
struct _typelib_TypeDescription typelib_TypeDescription
void freeCppInterfaceProxy(uno_ExtEnvironment *pEnv, void *pInterface)
The vtable structure corresponding to an interface type.
std::unique_ptr< Block[]> blocks
An array of blocks, representing the multiple vtables of a (multiple-inheritance) type.
sal_Int32 count
The number of blocks/vtables.
sal_Bool SAL_CALL typelib_typedescription_complete(typelib_TypeDescription **ppTypeDescr) SAL_THROW_EXTERN_C()