private static CppCodeWriter GetMetadataCodeWriter(NPath outputDir, string tableName)
        {
            string[]         append = new string[] { $"Il2Cpp{tableName}Table.cpp" };
            SourceCodeWriter writer = new SourceCodeWriter(outputDir.Combine(append));

            IncludeWriter.WriteRegistrationIncludes(writer);
            return(writer);
        }
Beispiel #2
0
 public void Write(NPath outputDir)
 {
     string[] append = new string[] { "driver.cpp" };
     using (SourceCodeWriter writer = new SourceCodeWriter(outputDir.Combine(append)))
     {
         this.WriteIncludes(writer);
         this.WriteMainInvoker(writer);
         this.WriteEntryPoint(writer);
         this.WritePlatformSpecificEntryPoints(writer);
     }
 }
 private static TableInfo WriteCCWMarshalingFunctions(NPath outputDir, IMethodCollectorResults methodCollector)
 {
     using (TinyProfiler.Section("CCWMarshalingFunctions", "Il2CppCcwMarshalingFunctionsTable.cpp"))
     {
         TableInfo empty = TableInfo.Empty;
         ReadOnlyCollection <TypeDefinition> cCWMarshalingFunctions = methodCollector.GetCCWMarshalingFunctions();
         if (cCWMarshalingFunctions.Count > 0)
         {
             string[] append = new string[] { "Il2CppCcwMarshalingFunctionsTable.cpp" };
             using (SourceCodeWriter writer = new SourceCodeWriter(outputDir.Combine(append)))
             {
                 writer.AddCodeGenIncludes();
                 foreach (TypeDefinition definition in cCWMarshalingFunctions)
                 {
                     object[] args = new object[] { Naming.ForCreateComCallableWrapperFunction(definition) };
                     writer.WriteLine("extern \"C\" void {0} ();", args);
                 }
                 if (< > f__am$cache2 == null)
                 {