File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,10 @@ public void SetupPasses(Driver driver)
174174 driver . Context . TranslationUnitPasses . AddPass ( new MarshalPrimitivePointersAsRefTypePass ( ) ) ;
175175 }
176176
177+ public void GenerateCode ( Driver driver , List < GeneratorOutput > outputs )
178+ {
179+ }
180+
177181 public void Preprocess ( Driver driver , ASTContext ctx )
178182 {
179183 }
Original file line number Diff line number Diff line change @@ -486,6 +486,8 @@ public static void Run(ILibrary library)
486486 {
487487 var outputs = driver . GenerateCode ( ) ;
488488
489+ library . GenerateCode ( driver , outputs ) ;
490+
489491 foreach ( var output in outputs )
490492 {
491493 foreach ( var pass in driver . Context . GeneratorOutputPasses . Passes )
Original file line number Diff line number Diff line change 44using System . Linq ;
55using System . Text . RegularExpressions ;
66using CppSharp . AST ;
7+ using CppSharp . Generators ;
78using CppSharp . Passes ;
89
910namespace CppSharp
@@ -33,6 +34,11 @@ public interface ILibrary
3334 /// </summary>
3435 /// <param name="driver"></param>
3536 void SetupPasses ( Driver driver ) ;
37+
38+ /// <summary>
39+ /// Generate custom code here.
40+ /// </summary>
41+ void GenerateCode ( Driver driver , List < GeneratorOutput > outputs ) { }
3642 }
3743
3844 public static class LibraryHelpers
You can’t perform that action at this time.
0 commit comments