(extra_includes: &[&str], self_header: &str, include_version: bool)
| 5224 | |
| 5225 | impl UnrealCppAutogen { |
| 5226 | fn new(extra_includes: &[&str], self_header: &str, include_version: bool) -> Self { |
| 5227 | let mut output = CodeIndenter::new(String::new(), " "); |
| 5228 | print_auto_generated_file_comment(&mut output); |
| 5229 | if include_version { |
| 5230 | print_auto_generated_version_comment(&mut output); |
| 5231 | } |
| 5232 | writeln!(output, "#pragma once"); |
| 5233 | writeln!(output, "#include \"CoreMinimal.h\""); |
| 5234 | writeln!(output, "#include \"BSATN/UESpacetimeDB.h\""); |
| 5235 | |
| 5236 | // Add specific includes based on what's needed |
| 5237 | for include in extra_includes { |
| 5238 | writeln!(output, "#include \"{include}\""); |
| 5239 | } |
| 5240 | writeln!(output, "#include \"{self_header}.g.generated.h\""); // need to include the generated header for Unreal's reflection |
| 5241 | writeln!(output); |
| 5242 | Self { output } |
| 5243 | } |
| 5244 | |
| 5245 | fn new_cpp(extra_includes: &[&str]) -> Self { |
| 5246 | let mut output = CodeIndenter::new(String::new(), " "); |
nothing calls this directly
no test coverage detected