// Since on Solaris we compile with --instances=static, getVtableSlot cannot be // a template function, with explicit instantiates for // T = typelib_InterfaceAttributeTypeDescription and // T = typelib_InterfaceMethodTypeDescription in this file; hence, there are two // overloaded versions of getVtableSlot that both delegate to this template // function: template< typename T > bridges::cpp_uno::shared::VtableSlot doGetVtableSlot(
T const * ifcMember)
{
bridges::cpp_uno::shared::VtableSlot slot;
slot.offset = 0;
T * member = const_cast< T * >(ifcMember); while (member->pBaseRef != nullptr) {
assert(member->nIndex < member->pInterface->nBaseTypes); for (sal_Int32 i = 0; i < member->nIndex; ++i) {
slot.offset += getVtableCount(member->pInterface->ppBaseTypes[i]);
}
typelib_TypeDescription * desc = nullptr;
typelib_typedescriptionreference_getDescription(
&desc, member->pBaseRef);
assert(
desc != nullptr && desc->eTypeClass == member->aBase.aBase.eTypeClass); if (member != ifcMember) {
typelib_typedescription_release(&member->aBase.aBase);
}
member = reinterpret_cast< T * >(desc);
}
slot.index
= bridges::cpp_uno::shared::getPrimaryFunctions(
member->pInterface->pBaseTypeDescription)
+ mapLocalMemberToLocalFunction(member->pInterface, member->nIndex); if (member != ifcMember) {
typelib_typedescription_release(&member->aBase.aBase);
} return slot;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.