int len = lib.count();
for( int i=0; i<len; i++ ) {
ITypeDecl t = lib.getType(i);
if(t.getKind()==TypeKind.ALIAS) {
ITypedefDecl typedef = t.queryInterface(ITypedefDecl.class);
ITypeDecl def = typedef.getDefinition().queryInterface(ITypeDecl.class);
if(def!=null) {
// System.out.println(def.getName()+" -> "+typedef.getName());
aliases.put( def, typedef.getName() );
if(def.getKind()==TypeKind.DISPATCH ) {
// if the alias is defined against dispinterface,
// also define the same typedef for 'interface'
IDispInterfaceDecl dispi = def.queryInterface(IDispInterfaceDecl.class);
if(dispi.isDual()) {
IInterfaceDecl custitf = dispi.getVtblInterface();
aliases.put(custitf, typedef.getName());
}
}
}
}
t.dispose();