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

Function dumpEngineDocs

Engine/source/console/engineDoc.cpp:664–713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664static bool dumpEngineDocs( const char *outputFile )
665{
666 // Create the output stream.
667 FileStream stream;
668 if ( !stream.open( outputFile, Torque::FS::File::Write ) )
669 {
670 Con::errorf( "dumpEngineDocs - Failed to open output file." );
671 return false;
672 }
673
674 // First dump all global ConsoleDoc fragments.
675
676 for( ConsoleDocFragment* fragment = ConsoleDocFragment::smFirst; fragment != NULL; fragment = fragment->mNext )
677 if( !fragment->mClass )
678 dumpFragment( stream, fragment );
679
680 // Clear the doc groups before continuing,
681 smDocGroups.clear();
682
683 // Dump enumeration types.
684 dumpEnums( stream );
685
686 // Dump all global variables.
687 dumpVariables( stream );
688
689 // Now dump the global functions.
690 Namespace *g = Namespace::find( NULL );
691 while( g )
692 {
693 dumpNamespaceEntries( stream, g );
694
695 // Dump callbacks.
696 dumpGroupStart( stream, "Callbacks" );
697 dumpNamespaceEntries( stream, g, true );
698 dumpGroupEnd( stream );
699
700 g = g->mParent;
701 }
702
703 // Now dump all the classes.
704 dumpClasses( stream );
705
706 // Dump pre-declarations for any groups we encountered
707 // so that we don't have to explicitly define them.
708 HashTable<String,U32>::Iterator iter = smDocGroups.begin();
709 for (; iter != smDocGroups.end(); ++iter)
710 stream.writeText( String::ToString( "/*! @addtogroup %s */\r\n\r\n", iter->key.c_str() ) );
711
712 return true;
713}
714
715DefineEngineFunction( dumpEngineDocs, bool, ( const char* outputFile ),,
716 "Dumps the engine scripting documentation to the specified file overwriting any existing content.\n"

Callers 1

engineDoc.cppFile · 0.85

Calls 15

dumpFragmentFunction · 0.85
dumpEnumsFunction · 0.85
dumpVariablesFunction · 0.85
dumpNamespaceEntriesFunction · 0.85
dumpGroupStartFunction · 0.85
dumpGroupEndFunction · 0.85
dumpClassesFunction · 0.85
errorfFunction · 0.70
openMethod · 0.65
findFunction · 0.50
clearMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected