MCPcopy Create free account
hub / github.com/SimHacker/micropolis / callback

Method callback

MicropolisCore/src/MicropolisEngine/src/stubs.cpp:275–287  ·  view source on GitHub ↗

* Scripting language independent callback mechanism. * * This allows Micropolis to send callback messages with * a variable number of typed parameters back to the * scripting language, while maintining independence from * the particular scripting language (or user interface * runtime). * * The name is the name of a message to send. * The params is a string that specifies the number and *

Source from the content-addressed store, hash-verified

273 * @param params Parameters of the callback.
274 */
275void Micropolis::callback(const char *name, const char *params, ...)
276{
277 if (callbackHook == NULL) {
278 return;
279 }
280
281 va_list arglist;
282 va_start(arglist, params); // beginning after last named argument: params
283
284 (*callbackHook)(this, callbackData, name, params, arglist);
285
286 va_end(arglist);
287}
288
289
290/**

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected