diff --git a/src/Generator/Generator.cs b/src/Generator/Generator.cs
new file mode 100644
index 00000000..069437f9
--- /dev/null
+++ b/src/Generator/Generator.cs
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using CppSharp.AST;
+
+namespace CppSharp.Generators
+{
+ ///
+ /// Kinds of language generators.
+ ///
+ public enum GeneratorKind
+ {
+ CLI,
+ CSharp,
+ }
+
+ ///
+ /// Output generated by each backend generator.
+ ///
+ public struct GeneratorOutput
+ {
+ ///
+ /// Translation unit associated with output.
+ ///
+ public TranslationUnit TranslationUnit;
+
+ ///
+ /// Text templates with generated output.
+ ///
+ public List Templates;
+ }
+
+ ///
+ /// Generators are the base class for each language backend.
+ ///
+ public abstract class Generator
+ {
+ public Driver Driver { get; private set; }
+
+ protected Generator(Driver driver)
+ {
+ Driver = driver;
+ }
+
+ ///
+ /// Called when a translation unit is generated.
+ ///
+ public Action OnUnitGenerated = delegate { };
+
+ ///
+ /// Setup any generator-specific passes here.
+ ///
+ public abstract bool SetupPasses();
+
+ ///
+ /// Setup any generator-specific processing here.
+ ///
+ public virtual void Process()
+ {
+
+ }
+
+ ///
+ /// Generates the outputs.
+ ///
+ public virtual List Generate()
+ {
+ var outputs = new List();
+
+ foreach (var unit in Driver.ASTContext.TranslationUnits)
+ {
+ if (unit.Ignore || !unit.HasDeclarations)
+ continue;
+
+ if (unit.IsSystemHeader)
+ continue;
+
+ var templates = Generate(unit);
+ if (templates.Count == 0)
+ continue;
+
+ foreach (var template in templates)
+ template.Process();
+
+ var output = new GeneratorOutput
+ {
+ TranslationUnit = unit,
+ Templates = templates
+ };
+ outputs.Add(output);
+
+ OnUnitGenerated(output);
+ }
+
+ return outputs;
+ }
+
+ ///
+ /// Generates the outputs for a given translation unit.
+ ///
+ public abstract List Generate(TranslationUnit unit);
+
+ public static string GeneratedIdentifier(string id)
+ {
+ return "__" + id;
+ }
+ }
+}
\ No newline at end of file