MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / generate_delegates

Function generate_delegates

crates/codegen/src/unrealcpp.rs:1357–1382  ·  view source on GitHub ↗
(output: &mut UnrealCppAutogen, module_prefix: &str)

Source from the content-addressed store, hash-verified

1355// Helper functions for generating the consolidated SpacetimeDBClient file
1356
1357fn generate_delegates(output: &mut UnrealCppAutogen, module_prefix: &str) {
1358 writeln!(
1359 output,
1360 "// Delegates using the generated connection type. These wrap the base"
1361 );
1362 writeln!(
1363 output,
1364 "// delegates defined in the SDK so that projects can work directly with"
1365 );
1366 writeln!(
1367 output,
1368 "// U{module_prefix}DbConnection without manual casting in user code."
1369 );
1370 writeln!(output, "DECLARE_DYNAMIC_DELEGATE_ThreeParams(");
1371 writeln!(output, "\tF{module_prefix}OnConnectDelegate,");
1372 writeln!(output, "\tU{module_prefix}DbConnection*, Connection,");
1373 writeln!(output, "\tFSpacetimeDBIdentity, Identity,");
1374 writeln!(output, "\tconst FString&, Token);");
1375 writeln!(output);
1376 writeln!(output, "DECLARE_DYNAMIC_DELEGATE_TwoParams(");
1377 writeln!(output, "\tF{module_prefix}OnDisconnectDelegate,");
1378 writeln!(output, "\tU{module_prefix}DbConnection*, Connection,");
1379 writeln!(output, "\tconst FString&, Error);");
1380 writeln!(output);
1381 writeln!(output);
1382}
1383
1384fn generate_context_structs(
1385 output: &mut UnrealCppAutogen,

Callers 1

generate_global_filesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…