feat: 头文件注释 (#10)

* feat: 头文件注释

* feat: 头文件注释提交
5.5
yawn831 7 months ago committed by GitHub
parent 7bcb7823a6
commit e5c27effd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      SourceCodeGenerator.cs

@ -64,6 +64,13 @@ namespace SourceCodeGeneratorUbtPlugin
private readonly HashSet<string> ClassBlacklist = new(); private readonly HashSet<string> ClassBlacklist = new();
private const string GeneratedHeaderComment =
"/*===========================================================================\n" +
" Generated code exported from UnrealCSharp SourceCodeGenerator.\n" +
" DO NOT modify this manually!\n" +
"===========================================================================*/\n" +
"\n";
public SourceCodeGenerator(IUhtExportFactory factory) public SourceCodeGenerator(IUhtExportFactory factory)
{ {
Factory = factory; Factory = factory;
@ -366,6 +373,8 @@ namespace SourceCodeGeneratorUbtPlugin
var builder = borrow.StringBuilder; var builder = borrow.StringBuilder;
builder.Append(GeneratedHeaderComment);
builder.Append("#pragma once\r\n\r\n"); builder.Append("#pragma once\r\n\r\n");
foreach (var value in package.Value) foreach (var value in package.Value)
@ -381,6 +390,8 @@ namespace SourceCodeGeneratorUbtPlugin
private bool ExportClass(StringBuilder builder, UhtClass classObj) private bool ExportClass(StringBuilder builder, UhtClass classObj)
{ {
builder.Append(GeneratedHeaderComment);
builder.Append("#pragma once\r\n\r\n" + builder.Append("#pragma once\r\n\r\n" +
"PRAGMA_DISABLE_DEPRECATION_WARNINGS\r\n\r\n"); "PRAGMA_DISABLE_DEPRECATION_WARNINGS\r\n\r\n");

Loading…
Cancel
Save