(
output: &mut UnrealCppAutogen,
module_prefix: &str,
module: &ModuleDef,
visibility: CodegenVisibility,
api_macro: &str,
)
| 2668 | } |
| 2669 | |
| 2670 | fn generate_remote_tables_class( |
| 2671 | output: &mut UnrealCppAutogen, |
| 2672 | module_prefix: &str, |
| 2673 | module: &ModuleDef, |
| 2674 | visibility: CodegenVisibility, |
| 2675 | api_macro: &str, |
| 2676 | ) { |
| 2677 | writeln!(output, "// RemoteTables class"); |
| 2678 | writeln!(output, "UCLASS(BlueprintType)"); |
| 2679 | writeln!( |
| 2680 | output, |
| 2681 | "class {api_macro} U{module_prefix}RemoteTables : public UObject" |
| 2682 | ); |
| 2683 | writeln!(output, "{{"); |
| 2684 | writeln!(output, " GENERATED_BODY()"); |
| 2685 | writeln!(output); |
| 2686 | writeln!(output, "public:"); |
| 2687 | writeln!(output, " void Initialize();"); |
| 2688 | writeln!(output); |
| 2689 | |
| 2690 | // Generate table handle properties |
| 2691 | for (_, accessor_name, _) in iter_table_names_and_types(module, visibility) { |
| 2692 | writeln!(output, " UPROPERTY(BlueprintReadOnly, Category=\"SpacetimeDB\")"); |
| 2693 | writeln!( |
| 2694 | output, |
| 2695 | " U{module_prefix}{}Table* {};", |
| 2696 | accessor_name.deref().to_case(Case::Pascal), |
| 2697 | accessor_name.deref().to_case(Case::Pascal) |
| 2698 | ); |
| 2699 | writeln!(output); |
| 2700 | } |
| 2701 | |
| 2702 | writeln!(output, "}};"); |
| 2703 | writeln!(output); |
| 2704 | } |
| 2705 | |
| 2706 | fn generate_remote_reducers_class( |
| 2707 | output: &mut UnrealCppAutogen, |
no test coverage detected
searching dependent graphs…