本文整理汇总了C++中TypeSystem::get_all_interface_children方法的典型用法代码示例。如果您正苦于以下问题:C++ TypeSystem::get_all_interface_children方法的具体用法?C++ TypeSystem::get_all_interface_children怎么用?C++ TypeSystem::get_all_interface_children使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypeSystem
的用法示例。
在下文中一共展示了TypeSystem::get_all_interface_children方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remove_interfaces_for_root
void RemoveInterfacePass::remove_interfaces_for_root(
const Scope& scope,
const DexStoresVector& stores,
const DexType* root,
const TypeSystem& type_system) {
TRACE(RM_INTF, 5, "Processing root %s\n", SHOW(root));
TypeSet interfaces;
type_system.get_all_interface_children(root, interfaces);
include_parent_interfaces(root, interfaces);
m_total_num_interface += interfaces.size();
m_num_interface_excluded += exclude_unremovables(
scope, stores, type_system, m_skip_multiple_targets_roots,
m_include_primary_dex, interfaces);
TRACE(RM_INTF, 5, "removable interfaces %ld\n", interfaces.size());
TypeSet removed =
remove_leaf_interfaces(scope, root, interfaces, type_system);
while (removed.size() > 0) {
for (const auto intf : removed) {
interfaces.erase(intf);
m_removed_interfaces.insert(intf);
}
TRACE(RM_INTF, 5, "non-leaf removable interfaces %ld\n", interfaces.size());
removed = remove_leaf_interfaces(scope, root, interfaces, type_system);
}
// Update type reference to removed interfaces all at once.
remove_interface_references(scope, type_system, root, m_removed_interfaces);
if (traceEnabled(RM_INTF, 9)) {
TypeSystem updated_ts(scope);
for (const auto intf : interfaces) {
TRACE(RM_INTF, 9, "unremoved interface %s\n", SHOW(intf));
TypeSet children;
updated_ts.get_all_interface_children(intf, children);
for (const auto cintf : children) {
TRACE(RM_INTF, 9, " child %s\n", SHOW(cintf));
}
}
}
}