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

Method dumpClasses

Engine/source/console/consoleDoc.cpp:285–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void Namespace::dumpClasses( bool dumpScript, bool dumpEngine )
286{
287 VectorPtr<Namespace*> vec;
288 trashCache();
289 vec.reserve( 1024 );
290
291 // We use mHashSequence to mark if we have traversed...
292 // so mark all as zero to start.
293 for(Namespace *walk = mNamespaceList; walk; walk = walk->mNext)
294 walk->mHashSequence = 0;
295
296 for(Namespace *walk = mNamespaceList; walk; walk = walk->mNext)
297 {
298 VectorPtr<Namespace*> stack;
299 stack.reserve( 1024 );
300
301 // Get all the parents of this namespace... (and mark them as we go)
302 Namespace *parentWalk = walk;
303 while(parentWalk)
304 {
305 if(parentWalk->mHashSequence != 0)
306 break;
307 if(parentWalk->mPackage == 0)
308 {
309 parentWalk->mHashSequence = 1; // Mark as traversed.
310 stack.push_back(parentWalk);
311 }
312 parentWalk = parentWalk->mParent;
313 }
314
315 // Load stack into our results vector.
316 while(stack.size())
317 {
318 vec.push_back(stack[stack.size() - 1]);
319 stack.pop_back();
320 }
321 }
322
323 // Go through previously discovered classes
324 U32 i;
325 for(i = 0; i < vec.size(); i++)
326 {
327 const char *className = vec[i]->mName;
328 const char *superClassName = vec[i]->mParent ? vec[i]->mParent->mName : NULL;
329
330 // Skip the global namespace, that gets dealt with in dumpFunctions
331 if(!className) continue;
332
333 // If we're just dumping script functions, then we don't want to dump
334 // a class that only contains script functions. So, we iterate over all
335 // the functions.
336 if( !dumpScript )
337 {
338 bool found = false;
339 for(Entry *ewalk = vec[i]->mEntryList; ewalk; ewalk = ewalk->mNext)
340 {
341 if( ewalk->mType != Entry::ConsoleFunctionType )
342 {

Callers

nothing calls this directly

Calls 15

printClassHeaderFunction · 0.85
printClassFooterFunction · 0.85
printGroupStartFunction · 0.85
printGroupEndFunction · 0.85
printClassMemberFunction · 0.85
getTypeFunction · 0.85
dStrstrFunction · 0.85
dStrncpyFunction · 0.85
printfFunction · 0.85
dStrchrFunction · 0.50
dStrlenFunction · 0.50
reserveMethod · 0.45

Tested by

no test coverage detected