MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / addFunction

Method addFunction

Engine/source/console/consoleInternal.cpp:1233–1244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231}
1232
1233void Namespace::addFunction(StringTableEntry name, CodeBlock *cb, U32 functionOffset, const char* usage, U32 lineNumber)
1234{
1235 Entry *ent = createLocalEntry(name);
1236 trashCache();
1237
1238 ent->mUsage = usage;
1239 ent->mCode = cb;
1240 ent->mFunctionOffset = functionOffset;
1241 ent->mCode->incRefCount();
1242 ent->mType = Entry::ConsoleFunctionType;
1243 ent->mFunctionLineNumber = lineNumber;
1244}
1245
1246void Namespace::addCommand(StringTableEntry name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool isToolOnly, ConsoleFunctionHeader* header)
1247{

Callers 1

execMethod · 0.80

Calls 1

incRefCountMethod · 0.45

Tested by

no test coverage detected