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

Method printNamespaceEntries

Engine/source/console/consoleDoc.cpp:218–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218void Namespace::printNamespaceEntries(Namespace * g, bool dumpScript, bool dumpEngine )
219{
220 static bool inGroup = false;
221
222 // Go through all the entries.
223 // Iterate through the methods of the namespace...
224 for(Entry *ewalk = g->mEntryList; ewalk; ewalk = ewalk->mNext)
225 {
226 S32 eType = ewalk->mType;
227 const char * funcName = ewalk->mFunctionName;
228
229 if( ( eType == Entry::ConsoleFunctionType ) && !dumpScript )
230 continue;
231
232 if( ( eType != Entry::ConsoleFunctionType ) && !dumpEngine )
233 continue;
234
235 // If it's a function
236 if( eType >= Entry::ConsoleFunctionType )
237 {
238 printClassMethod(true, typeNames[eType], funcName, ewalk->getArgumentsString().c_str(),
239 ewalk->getDocString().c_str());
240 }
241 else if(ewalk->mType == Entry::GroupMarker)
242 {
243 if(!inGroup)
244 printGroupStart(ewalk->cb.mGroupName, ewalk->mUsage);
245 else
246 printGroupEnd();
247
248 inGroup = !inGroup;
249 }
250 else if(ewalk->mType == Entry::ScriptCallbackType)
251 {
252 // It's a script callback - emit some sort of appropriate info.
253 Con::printf(" /*! %s */", ewalk->getDocString().c_str());
254 Con::printf(" %s;", ewalk->getPrototypeString().c_str());
255 Con::printf("");
256 }
257 else if(ewalk->mFunctionOffset) // If it's a builtin function...
258 {
259 String args = ewalk->mCode->getFunctionArgs(ewalk->mFunctionOffset);
260 printClassMethod(false, typeNames[ewalk->mType], ewalk->mFunctionName, args, "");
261 }
262 else
263 {
264 Con::printf(" // got an unknown thing?? %d", ewalk->mType );
265 }
266 }
267}
268
269void Namespace::dumpClasses( bool dumpScript, bool dumpEngine )
270{

Callers

nothing calls this directly

Calls 9

printClassMethodFunction · 0.85
printGroupStartFunction · 0.85
printGroupEndFunction · 0.85
printfFunction · 0.85
getArgumentsStringMethod · 0.80
getFunctionArgsMethod · 0.80
c_strMethod · 0.45
getDocStringMethod · 0.45
getPrototypeStringMethod · 0.45

Tested by

no test coverage detected