// try to lookup the symbol in the generated rtti map auto iFind2( m_generatedRttis.find( unoName ) ); if (iFind2 != m_generatedRttis.end())
{ // taking already generated rtti
rtti = iFind2->second->get(); return rtti;
}
// we must generate it ! // symbol and rtti-name is nearly identical, // the symbol is prefixed with _ZTI charconst * rttiName = symName.getStr() +4;
SAL_INFO("bridges", "Generated rtti for " << rttiName);
std::unique_ptr<Generated> newRtti; switch (pTypeDescr.eTypeClass) { case typelib_TypeClass_EXCEPTION:
{
typelib_CompoundTypeDescription const & ctd
= reinterpret_cast<
typelib_CompoundTypeDescription const &>(
pTypeDescr); if (ctd.pBaseTypeDescription)
{ // ensure availability of base
std::type_info * base_rtti = getRTTI(
ctd.pBaseTypeDescription->aBase);
m_rttiNames.emplace_back(OString(rttiName));
std::unique_ptr<std::type_info> info( new __cxxabiv1::__si_class_type_info(
m_rttiNames.back().getStr(), static_cast<__cxxabiv1::__class_type_info *>(base_rtti) ));
newRtti.reset(new GeneratedPlain(std::move(info)));
} else
{ // this class has no base class
m_rttiNames.emplace_back(OString(rttiName));
std::unique_ptr<std::type_info> info( new __cxxabiv1::__class_type_info(m_rttiNames.back().getStr()));
newRtti.reset(new GeneratedPlain(std::move(info)));
} break;
} case typelib_TypeClass_INTERFACE:
{
typelib_InterfaceTypeDescription const & itd
= reinterpret_cast<
typelib_InterfaceTypeDescription const &>(
pTypeDescr);
std::vector<std::type_info *> bases; for (sal_Int32 i = 0; i != itd.nBaseTypes; ++i) {
bases.push_back(getRTTI(itd.ppBaseTypes[i]->aBase));
} switch (itd.nBaseTypes) { case0:
{
m_rttiNames.emplace_back(OString(rttiName));
std::unique_ptr<std::type_info> info( new __cxxabiv1::__class_type_info(
m_rttiNames.back().getStr()));
newRtti.reset(new GeneratedPlain(std::move(info))); break;
} case1:
{
m_rttiNames.emplace_back(OString(rttiName));
std::unique_ptr<std::type_info> info( new __cxxabiv1::__si_class_type_info(
m_rttiNames.back().getStr(), static_cast<
__cxxabiv1::__class_type_info *>(
bases[0])));
newRtti.reset(new GeneratedPlain(std::move(info))); break;
} default:
{
m_rttiNames.emplace_back(OString(rttiName)); auto pad = std::make_unique<char[]>( sizeof (__cxxabiv1::__vmi_class_type_info)
+ ((itd.nBaseTypes - 1)
* sizeof (
__cxxabiv1::__base_class_type_info)));
__cxxabiv1::__vmi_class_type_info * info
= new(pad.get())
__cxxabiv1::__vmi_class_type_info(
m_rttiNames.back().getStr(),
__cxxabiv1::__vmi_class_type_info::__flags_unknown_mask);
info->__base_count = itd.nBaseTypes; for (sal_Int32 i = 0; i != itd.nBaseTypes; ++i)
{
info->__base_info[i].__base_type
= static_cast<
__cxxabiv1::__class_type_info *>(
bases[i]);
info->__base_info[i].__offset_flags
= (__cxxabiv1::__base_class_type_info::__public_mask
| ((8 * i) << __cxxabiv1::__base_class_type_info::__offset_shift));
}
newRtti.reset(new GeneratedPad(std::move(pad))); break;
}
} break;
} default:
assert(false); // cannot happen
}
rtti = newRtti->get();
auto insertion(m_generatedRttis.emplace(unoName, std::move(newRtti)));
SAL_WARN_IF( !insertion.second, "bridges", "key " << unoName << " already in generated rtti map" );
¤ 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.0.10Bemerkung:
(vorverarbeitet am 2026-09-29)
¤
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.