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

Function dumpClasses

Engine/source/console/engineDoc.cpp:462–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462static void dumpClasses( Stream &stream )
463{
464 Namespace::trashCache();
465
466 VectorPtr<Namespace*> vec;
467 vec.reserve( 1024 );
468
469 // We use mHashSequence to mark if we have traversed...
470 // so mark all as zero to start.
471 for ( Namespace *walk = Namespace::mNamespaceList; walk; walk = walk->mNext )
472 walk->mHashSequence = 0;
473
474 for(Namespace *walk = Namespace::mNamespaceList; walk; walk = walk->mNext)
475 {
476 VectorPtr<Namespace*> stack;
477 stack.reserve( 1024 );
478
479 // Get all the parents of this namespace... (and mark them as we go)
480 Namespace *parentWalk = walk;
481 while(parentWalk)
482 {
483 if(parentWalk->mHashSequence != 0)
484 break;
485 if(parentWalk->mPackage == 0)
486 {
487 parentWalk->mHashSequence = 1; // Mark as traversed.
488 stack.push_back(parentWalk);
489 }
490 parentWalk = parentWalk->mParent;
491 }
492
493 // Load stack into our results vector.
494 while(stack.size())
495 {
496 vec.push_back(stack[stack.size() - 1]);
497 stack.pop_back();
498 }
499 }
500
501 // Go through previously discovered classes
502 U32 i;
503 for(i = 0; i < vec.size(); i++)
504 {
505 const char *className = vec[i]->mName;
506 const char *superClassName = vec[i]->mParent ? vec[i]->mParent->mName : NULL;
507
508 // Skip the global namespace, that gets dealt with in dumpFunctions
509 if(!className)
510 continue;
511
512 // We're just dumping engine functions, then we don't want to dump
513 // a class that only contains script functions. So, we iterate over
514 // all the functions.
515 bool found = false;
516 for( Namespace::Entry *ewalk = vec[i]->mEntryList; ewalk; ewalk = ewalk->mNext )
517 {
518 if( ewalk->mType != Namespace::Entry::ConsoleFunctionType )
519 {

Callers 2

dumpEngineDocsFunction · 0.85
consoleDoc.cppFile · 0.85

Calls 15

dumpClassHeaderFunction · 0.85
dumpClassFooterFunction · 0.85
dStrstrFunction · 0.85
dStricmpFunction · 0.85
dumpFragmentFunction · 0.85
dumpNamespaceEntriesFunction · 0.85
dumpGroupStartFunction · 0.85
dumpGroupEndFunction · 0.85
dumpVariablesFunction · 0.85
dumpClassMemberFunction · 0.85
reserveMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected