25 #include <com/sun/star/uno/XInterface.hpp>
26 #include <typelib/typedescription.h>
45 ::typelib_typedescription_release(
49 #if OSL_DEBUG_LEVEL > 1
50 *(
int *)pInterface = 0xdeadbabe;
53 delete[]
reinterpret_cast< char *
>(pThis);
58 typelib_InterfaceTypeDescription * pTypeDescr, OUString
const & rOId)
61 reinterpret_cast< typelib_TypeDescription ** >(&pTypeDescr));
65 std::unique_ptr< char[] > pMemory(
68 + (rVtables.count - 1) * sizeof (
void **)]);
72 for (sal_Int32
i = 0;
i < rVtables.count; ++
i) {
74 rVtables.blocks[
i].start);
105 typelib_InterfaceTypeDescription * pTypeDescr_, OUString
const & rOId_)
107 , pBridge( pBridge_ )
109 , pTypeDescr( pTypeDescr_ )
113 ::typelib_typedescription_acquire( &
pTypeDescr->aBase );
126 return reinterpret_cast< com::sun::star::uno::XInterface *
>(
134 char const *
const base =
reinterpret_cast< char const *
>(16);
135 std::ptrdiff_t
const offset =
reinterpret_cast< char const *
>(
138 static_cast< char *
>(pInterface) - offset);
std::atomic< std::size_t > nRef
friend void freeCppInterfaceProxy(uno_ExtEnvironment *pEnv, void *pInterface)
CppInterfaceProxy(CppInterfaceProxy const &)=delete
static com::sun::star::uno::XInterface * castProxyToInterface(CppInterfaceProxy *pProxy)
Hand out vtable structures for interface type descriptions.
sal_Bool SAL_CALL typelib_typedescription_complete(typelib_TypeDescription **ppTypeDescr) SAL_THROW_EXTERN_C()
uno_ExtEnvironment * getUnoEnv()
static Slot * mapBlockToVtable(void *block)
Given a pointer to a block, turn it into a vtable pointer.
static com::sun::star::uno::XInterface * create(Bridge *pBridge, uno_Interface *pUnoI, typelib_InterfaceTypeDescription *pTypeDescr, OUString const &rOId)
uno_ExtEnvironment * getCppEnv()
A cpp proxy wrapping a uno interface.
The vtable structure corresponding to an interface type.
typelib_InterfaceTypeDescription * pTypeDescr
VtableFactory::Slot * vtables[1]
void freeCppInterfaceProxy(uno_ExtEnvironment *pEnv, void *pInterface)
Holding environments and mappings.
static CppInterfaceProxy * castInterfaceToProxy(void *pInterface)
const Vtables & getVtables(typelib_InterfaceTypeDescription *type)
Given an interface type description, return its corresponding vtable structure.