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

Function dumpEnum

Engine/source/console/engineDoc.cpp:617–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

615}
616
617static void dumpEnum( Stream& stream, const EngineTypeInfo* type )
618{
619 if( !type->getEnumTable() ) // Sanity check.
620 return;
621
622 // Skip internals... don't export them.
623 if ( type->getDocString() &&
624 ( dStrstr( type->getDocString(), "@hide" ) || dStrstr( type->getDocString(), "@internal" ) ) )
625 return;
626
627 // Write documentation.
628
629 stream.writeText( "/*!\r\n" );
630 dumpDoc( stream, type->getDocString() );
631 stream.writeText( "*/\r\n" );
632
633 // Write definition.
634
635 stream.writeText( "enum " );
636 stream.writeText( type->getTypeName() );
637 stream.writeText( " {\r\n" );
638
639 const EngineEnumTable& table = *( type->getEnumTable() );
640 const U32 numValues = table.getNumValues();
641
642 for( U32 i = 0; i < numValues; ++ i )
643 {
644 const EngineEnumTable::Value& value = table[ i ];
645
646 stream.writeText( "/*!\r\n" );
647 dumpDoc( stream, value.getDocString(), false );
648 stream.writeText( "*/\r\n" );
649 stream.writeText( value.getName() );
650 stream.writeText( ",\r\n" );
651 }
652
653 stream.writeText( "};\r\n" );
654}
655
656static void dumpEnums( Stream& stream )
657{

Callers 1

dumpEnumsFunction · 0.85

Calls 8

dStrstrFunction · 0.85
dumpDocFunction · 0.85
getNumValuesMethod · 0.80
getEnumTableMethod · 0.45
getDocStringMethod · 0.45
writeTextMethod · 0.45
getTypeNameMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected