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

Method addFunction

Engine/source/console/consoleInternal.cpp:1248–1259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246}
1247
1248void Namespace::addFunction( StringTableEntry name, CodeBlock *cb, U32 functionOffset, const char* usage, U32 lineNumber )
1249{
1250 Entry *ent = createLocalEntry(name);
1251 trashCache();
1252
1253 ent->mUsage = usage;
1254 ent->mCode = cb;
1255 ent->mFunctionOffset = functionOffset;
1256 ent->mCode->incRefCount();
1257 ent->mType = Entry::ConsoleFunctionType;
1258 ent->mFunctionLineNumber = lineNumber;
1259}
1260
1261void Namespace::addCommand( StringTableEntry name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs, bool isToolOnly, ConsoleFunctionHeader* header )
1262{

Callers 1

execMethod · 0.80

Calls 1

incRefCountMethod · 0.45

Tested by

no test coverage detected