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

Method dumpClasses

Engine/source/console/consoleDoc.cpp:269–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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