public SimpleTypeRef findStructRef(Struct s, Identifier name, Identifier libraryClassName) { if (s == null || s.isForwardDeclaration()) { TypeRef td = result.getTypeDef(name); if (!(td instanceof Struct)) {
public SimpleTypeRef findStructRef(Struct s, Identifier name, Identifier libraryClassName) { if (s == null || s.isForwardDeclaration()) { TypeRef td = result.getTypeDef(name); if (!(td instanceof Struct)) {
if (!currentNamespace.isEmpty()) struct.setParentNamespace(currentNamespace.peek().clone()); boolean isFwd = struct.isForwardDeclaration(); if (!isFwd && struct.getDeclarations().isEmpty() && config.treatEmptyStructsAsForwardDecls) { List<SimpleTypeRef> parents = struct.getParents(); Struct p; if (parents.isEmpty() || parents.size() == 1 && ((p = structsByName.get(parents.get(0))) == null || p.isForwardDeclaration())) { isFwd = true; if (struct.isForwardDeclaration()) { break;
if (!currentNamespace.isEmpty()) struct.setParentNamespace(currentNamespace.peek().clone()); boolean isFwd = struct.isForwardDeclaration(); if (!isFwd && struct.getDeclarations().isEmpty() && config.treatEmptyStructsAsForwardDecls) { List<SimpleTypeRef> parents = struct.getParents(); Struct p; if (parents.isEmpty() || parents.size() == 1 && ((p = structsByName.get(parents.get(0))) == null || p.isForwardDeclaration())) { isFwd = true; if (struct.isForwardDeclaration()) { break;
@Override public void visitStruct(Struct struct) { super.visitStruct(struct); if (struct.isForwardDeclaration() && struct.getTag() != null) { Element parent = struct.getParentElement(); if (!(parent instanceof TaggedTypeRefDeclaration)) { TypeRef tr = new TypeRef.SimpleTypeRef(struct.getTag()); for (Modifier mod : struct.getModifiers()) { if (mod.isA(ModifierKind.StorageClassSpecifier)) { tr.addModifiers(mod); } } struct.replaceBy(tr); tr.accept(this); } } }
@Override public void visitStruct(Struct struct) { super.visitStruct(struct); if (struct.isForwardDeclaration() && struct.getTag() != null) { Element parent = struct.getParentElement(); if (!(parent instanceof TaggedTypeRefDeclaration)) { TypeRef tr = new TypeRef.SimpleTypeRef(struct.getTag()); for (Modifier mod : struct.getModifiers()) { if (mod.isA(ModifierKind.StorageClassSpecifier)) { tr.addModifiers(mod); } } struct.replaceBy(tr); tr.accept(this); } } }
case ObjCClass: modifiersStringPrefix(e); append(e.isForwardDeclaration() ? "@class " : "@interface ", e.getTag()); if (e.getCategoryName() != null) { append(" (", e.getCategoryName(), ")"); if (!e.isForwardDeclaration()) { space(e.getTag() != null).append("{\n"); indent();
if (struct.isForwardDeclaration())// && !result.structsByName.get(structName).isForwardDeclaration())
if (struct.isForwardDeclaration())// && !result.structsByName.get(structName).isForwardDeclaration())
if (struct.isForwardDeclaration())// && !result.structsByName.get(structName).isForwardDeclaration())
if (struct.isForwardDeclaration())// && !result.structsByName.get(structName).isForwardDeclaration())