MCPcopy Create free account
hub / github.com/crownengine/crown / register_command_name

Method register_command_name

src/device/console_server.cpp:470–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470void ConsoleServer::register_command_name(const char *name, const char *brief, CommandTypeFunction function, void *user_data)
471{
472 CE_ENSURE(NULL != name);
473 CE_ENSURE(NULL != brief);
474 CE_ENSURE(NULL != function);
475
476 CommandData cmd;
477 cmd.command_function = function;
478 cmd.user_data = user_data;
479 strncpy(cmd.name, name, sizeof(cmd.name) - 1);
480 strncpy(cmd.brief, brief, sizeof(cmd.brief) - 1);
481 hash_map::set(_commands, StringId32(name), cmd);
482}
483
484void ConsoleServer::register_message_type(const char *type, MessageTypeFunction function, void *user_data)
485{

Callers 4

ConsoleServerMethod · 0.95
initFunction · 0.80
main_loopMethod · 0.80
initFunction · 0.80

Calls 3

strncpyFunction · 0.85
setClass · 0.85
StringId32Class · 0.50

Tested by

no test coverage detected