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)
174
174
driver . Context . TranslationUnitPasses . AddPass ( new MarshalPrimitivePointersAsRefTypePass ( ) ) ;
175
175
}
176
176
177
+ public void GenerateCode ( Driver driver , List < GeneratorOutput > outputs )
178
+ {
179
+ }
180
+
177
181
public void Preprocess ( Driver driver , ASTContext ctx )
178
182
{
179
183
}
Original file line number Diff line number Diff line change @@ -486,6 +486,8 @@ public static void Run(ILibrary library)
486
486
{
487
487
var outputs = driver . GenerateCode ( ) ;
488
488
489
+ library . GenerateCode ( driver , outputs ) ;
490
+
489
491
foreach ( var output in outputs )
490
492
{
491
493
foreach ( var pass in driver . Context . GeneratorOutputPasses . Passes )
Original file line number Diff line number Diff line change 4
4
using System . Linq ;
5
5
using System . Text . RegularExpressions ;
6
6
using CppSharp . AST ;
7
+ using CppSharp . Generators ;
7
8
using CppSharp . Passes ;
8
9
9
10
namespace CppSharp
@@ -33,6 +34,11 @@ public interface ILibrary
33
34
/// </summary>
34
35
/// <param name="driver"></param>
35
36
void SetupPasses ( Driver driver ) ;
37
+
38
+ /// <summary>
39
+ /// Generate custom code here.
40
+ /// </summary>
41
+ void GenerateCode ( Driver driver , List < GeneratorOutput > outputs ) { }
36
42
}
37
43
38
44
public static class LibraryHelpers
You can’t perform that action at this time.
0 commit comments