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

Function dumpClassMember

Engine/source/console/engineDoc.cpp:393–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393static void dumpClassMember( Stream &stream,
394 const AbstractClassRep::Field& field )
395{
396 stream.writeText( "/*!\r\n" );
397
398 if( field.pFieldDocs && field.pFieldDocs[ 0 ] )
399 {
400 stream.writeText( "@brief " );
401
402 String docs( field.pFieldDocs );
403 S32 newline = docs.find( '\n' );
404 if( newline == -1 )
405 stream.writeText( field.pFieldDocs );
406 else
407 {
408 String brief = docs.substr( 0, newline );
409 String body = docs.substr( newline + 1 );
410
411 stream.writeText( brief );
412 stream.writeText( "\r\n\r\n" );
413 stream.writeText( body );
414 }
415
416 stream.writeText( "\r\n" );
417 }
418
419 const bool isDeprecated = ( field.type == AbstractClassRep::DeprecatedFieldType );
420 if( isDeprecated )
421 stream.writeText( "@deprecated This member is deprecated and its value is always undefined.\r\n" );
422
423 stream.writeText( "*/\r\n" );
424
425 ConsoleBaseType* cbt = ConsoleBaseType::getType( field.type );
426 const char* type = ( cbt ? cbt->getTypeClassName() : "" );
427
428 if( field.elementCount > 1 )
429 stream.writeText( String::ToString( "%s %s[ %i ];\r\n", isDeprecated ? "deprecated" : type, field.pFieldname, field.elementCount ) );
430 else
431 stream.writeText( String::ToString( "%s %s;\r\n", isDeprecated ? "deprecated" : type, field.pFieldname ) );
432}
433
434static void dumpClassFooter( Stream &stream )
435{

Callers 1

dumpClassesFunction · 0.85

Calls 5

getTypeFunction · 0.85
substrMethod · 0.80
writeTextMethod · 0.45
findMethod · 0.45
getTypeClassNameMethod · 0.45

Tested by

no test coverage detected