MCPcopy Create free account
hub / github.com/axmolengine/axmol / addCommand

Method addCommand

core/base/Console.cpp:445–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445void Console::addCommand(const Command& cmd)
446{
447 Command* newCommand = new Command(cmd);
448 auto iter = _commands.find(cmd.getName());
449 if (iter != _commands.end())
450 {
451 delete iter->second;
452 _commands.erase(iter);
453 }
454 _commands.emplace(cmd.getName(), newCommand); // _commands[cmd.getName()] = newCommand;
455}
456
457void Console::addSubCommand(std::string_view cmdName, const Command& subCmd)
458{

Callers 15

drawBackgroundMethod · 0.45
updateEffectUniformsMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45
visitMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45
visitMethod · 0.45
drawMethod · 0.45
drawMethod · 0.45

Calls 5

findMethod · 0.45
getNameMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
emplaceMethod · 0.45

Tested by 7

drawMethod · 0.36
ConsoleCustomCommandMethod · 0.36
drawMethod · 0.36
drawMethod · 0.36
drawMethod · 0.36
drawMethod · 0.36
drawMethod · 0.36