// Path: src/main/java/com/github/danfickle/cpptojavasourceconverter/models/DeclarationModels.java
// public class CppClass extends CppDeclaration
// {
// 	public boolean isNested;
// 	public boolean isUnion;
// 	public String superclass;
// 	public List<String> additionalSupers = new ArrayList<String>(0);
// 	public List<CppDeclaration> declarations = new ArrayList<CppDeclaration>();
// 		
// 	@Override
// 	public String toString() 
// 	{
// 		String str = this.isUnion ? String.format("\n%s/* TODO union */", tabOut()) : "";
// 			
// 		str += String.format("\n%spublic%s class %s %s implements CppType<%s>",
// 				tabOut(),
// 				this.isNested ? " static" : "",
// 				this.name, 
// 				this.superclass != null ? "extends " + this.superclass : "",
// 				this.name);
// 
// 		str += "\n" + tabOut() + '{';
// 		ctx.tabLevel++;
// 		  str += join(this.declarations, "");
// 		ctx.tabLevel--;
// 		str += "\n" + tabOut() + '}';
// 			
// 		return str;
// 	}
// }
// 
// Path: src/main/java/com/github/danfickle/cpptojavasourceconverter/models/DeclarationModels.java
// public abstract static class CppDeclaration
// { 
// 	// The raw qualified (if needed) C++ name.
// 	public String completeCppName;
// 
// 	// The simple Java name.
// 	public String name;
// 		
// 	public CppClass parent;
// 	public IType cppType;
// 	public IASTName nm;
// 	public String file;
// 	public int line;
// }


import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.github.danfickle.cpptojavasourceconverter.models.DeclarationModels.CppClass;
import com.github.danfickle.cpptojavasourceconverter.models.DeclarationModels.CppDeclaration;
package com.github.danfickle.cpptojavasourceconverter;



class GlobalCtx
{
	// Items which need to be persisted accross translation
	// units should go here.
	
	int anonCount = 0;
	
	// A set of qualified names containing the bitfields...
	Set<String> bitfields = new HashSet<String>();
	
	// Maps the type to a declaration.
	// Note, this is not a hash map as IType does
	// not implement hash method. Therefore it must
	// be iterated and checked with IType::isSameType method.
	// Note: Generated declarations are not required to go in 
	// here as they are not called directly.
	List<CppDeclaration> decls = new ArrayList<CppDeclaration>();

	// This contains a mapping from filenames to a generated global
	// declaration for that file which will house global items such
	// as variables and functions.
// Path: src/main/java/com/github/danfickle/cpptojavasourceconverter/models/DeclarationModels.java
// public class CppClass extends CppDeclaration
// {
// 	public boolean isNested;
// 	public boolean isUnion;
// 	public String superclass;
// 	public List<String> additionalSupers = new ArrayList<String>(0);
// 	public List<CppDeclaration> declarations = new ArrayList<CppDeclaration>();
// 		
// 	@Override
// 	public String toString() 
// 	{
// 		String str = this.isUnion ? String.format("\n%s/* TODO union */", tabOut()) : "";
// 			
// 		str += String.format("\n%spublic%s class %s %s implements CppType<%s>",
// 				tabOut(),
// 				this.isNested ? " static" : "",
// 				this.name, 
// 				this.superclass != null ? "extends " + this.superclass : "",
// 				this.name);
// 
// 		str += "\n" + tabOut() + '{';
// 		ctx.tabLevel++;
// 		  str += join(this.declarations, "");
// 		ctx.tabLevel--;
// 		str += "\n" + tabOut() + '}';
// 			
// 		return str;
// 	}
// }
// 
// Path: src/main/java/com/github/danfickle/cpptojavasourceconverter/models/DeclarationModels.java
// public abstract static class CppDeclaration
// { 
// 	// The raw qualified (if needed) C++ name.
// 	public String completeCppName;
// 
// 	// The simple Java name.
// 	public String name;
// 		
// 	public CppClass parent;
// 	public IType cppType;
// 	public IASTName nm;
// 	public String file;
// 	public int line;
// }


// Path: src/main/java/com/github/danfickle/cpptojavasourceconverter/GlobalCtx.java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.github.danfickle.cpptojavasourceconverter.models.DeclarationModels.CppClass;
import com.github.danfickle.cpptojavasourceconverter.models.DeclarationModels.CppDeclaration;

package com.github.danfickle.cpptojavasourceconverter;



class GlobalCtx
{
	// Items which need to be persisted accross translation
	// units should go here.
	
	int anonCount = 0;
	
	// A set of qualified names containing the bitfields...
	Set<String> bitfields = new HashSet<String>();
	
	// Maps the type to a declaration.
	// Note, this is not a hash map as IType does
	// not implement hash method. Therefore it must
	// be iterated and checked with IType::isSameType method.
	// Note: Generated declarations are not required to go in 
	// here as they are not called directly.
	List<CppDeclaration> decls = new ArrayList<CppDeclaration>();

	// This contains a mapping from filenames to a generated global
	// declaration for that file which will house global items such
	// as variables and functions.
	Map<String, CppClass> fileClasses = new HashMap<String, CppClass>();