2024-04-21 06:51:51 -07:00
|
|
|
// Used in the GasaGen.cpp translation unit
|
|
|
|
#if GASA_INTELLISENSE_DIRECTIVES
|
|
|
|
#pragma once
|
|
|
|
#define GEN_EXPOSE_BACKEND
|
|
|
|
#include "gen.hpp"
|
|
|
|
#include "gen.builder.hpp"
|
|
|
|
#include "GasaGenCommon.cpp"
|
|
|
|
#endif
|
|
|
|
|
2024-04-16 02:02:58 -07:00
|
|
|
void ue_parse_testing()
|
|
|
|
{
|
|
|
|
FileContents content;
|
|
|
|
|
|
|
|
#define path_UProgressBar \
|
|
|
|
"C:/projects/Unreal/Surgo/UE/Engine/Source/Runtime/UMG/Public/Components/ProgressBar.h"
|
|
|
|
|
2024-04-21 06:51:51 -07:00
|
|
|
#if 1
|
2024-12-14 05:46:22 -08:00
|
|
|
content = file_read_contents( ctx.Allocator_Temp, true, path_UProgressBar );
|
|
|
|
CodeBody parsed_uprogressbar = parse_global_body( Str { (char const*)content.data, content.size });
|
2024-04-16 02:02:58 -07:00
|
|
|
|
|
|
|
log_fmt("\n\n");
|
|
|
|
for ( Code gcode : parsed_uprogressbar )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
if ( gcode->Type == CT_Class )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
log_fmt("Class %S - Definitions:\n", gcode->Name);
|
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
if (gcode->Body->Type != CT_Class_Body)
|
2024-04-16 02:02:58 -07:00
|
|
|
continue;
|
2024-12-14 05:46:22 -08:00
|
|
|
for ( Code class_code : cast(CodeBody, gcode->Body) )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
switch ( class_code->Type )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
case CT_Variable:
|
|
|
|
case CT_Function:
|
|
|
|
case CT_Function_Fwd:
|
2024-04-16 02:02:58 -07:00
|
|
|
if ( class_code->Name )
|
|
|
|
{
|
2024-12-15 11:13:44 -08:00
|
|
|
log_fmt("%S\n", class_code->Name );
|
2024-04-16 02:02:58 -07:00
|
|
|
// log_fmt("%s\n", class_code->to_string() );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define path_UObject \
|
|
|
|
R"(C:\projects\Unreal\Surgo\UE\Engine\Source\Runtime\CoreUObject\Public\UObject\Object.h)"
|
|
|
|
|
2024-04-21 06:51:51 -07:00
|
|
|
#if 1
|
2024-12-14 05:46:22 -08:00
|
|
|
content = file_read_contents( ctx.Allocator_Temp, true, path_UObject );
|
|
|
|
CodeBody parsed_uobject = parse_global_body( Str { (char const*)content.data, content.size });
|
2024-04-16 02:02:58 -07:00
|
|
|
|
|
|
|
log_fmt("\n\n");
|
|
|
|
for ( Code gcode : parsed_uobject )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
if ( gcode->Type == CT_Class )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
log_fmt("Class %S - Definitions:\n", gcode->Name);
|
|
|
|
// log_fmt("%s\n", gcode->to_string() );
|
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
if (gcode->Body->Type != CT_Class_Body)
|
2024-04-16 02:02:58 -07:00
|
|
|
continue;
|
2024-12-14 05:46:22 -08:00
|
|
|
for ( Code class_code : cast(CodeBody, gcode->Body) )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
switch ( class_code->Type )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
case CT_Constructor:
|
|
|
|
case CT_Constructor_Fwd:
|
|
|
|
case CT_Variable:
|
|
|
|
case CT_Function:
|
|
|
|
case CT_Function_Fwd:
|
2024-04-16 02:02:58 -07:00
|
|
|
if ( class_code->Name )
|
|
|
|
{
|
2024-12-15 11:13:44 -08:00
|
|
|
log_fmt("%S\n", class_code->Name );
|
2024-04-16 02:02:58 -07:00
|
|
|
// log_fmt("%s\n", class_code->to_string() );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define path_AActor \
|
|
|
|
R"(C:\projects\Unreal\Surgo\UE\Engine\Source\Runtime\Engine\Classes\GameFramework\Actor.h)"
|
|
|
|
|
2024-04-21 06:51:51 -07:00
|
|
|
#if 1
|
2024-12-14 05:46:22 -08:00
|
|
|
content = file_read_contents( ctx.Allocator_Temp, true, path_AActor );
|
|
|
|
CodeBody parsed_aactor = parse_global_body( Str { (char const*)content.data, content.size });
|
2024-04-16 02:02:58 -07:00
|
|
|
|
|
|
|
log_fmt("\n\n");
|
|
|
|
for ( Code gcode : parsed_aactor )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
if ( gcode->Type == CT_Class )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
log_fmt("Class %S - Definitions:\n", gcode->Name);
|
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
if (gcode->Body->Type != CT_Class_Body)
|
2024-04-16 02:02:58 -07:00
|
|
|
continue;
|
2024-12-14 05:46:22 -08:00
|
|
|
for ( Code class_code : cast(CodeBody, gcode->Body) )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
switch ( class_code->Type )
|
|
|
|
{
|
2024-04-17 09:16:22 -07:00
|
|
|
// case CodeT::Variable:
|
2024-12-14 05:46:22 -08:00
|
|
|
case CT_Function:
|
|
|
|
case CT_Function_Fwd:
|
2024-04-16 02:02:58 -07:00
|
|
|
if ( class_code->Name )
|
|
|
|
{
|
2024-12-15 11:13:44 -08:00
|
|
|
log_fmt("%S\n", class_code->Name );
|
2024-04-16 02:02:58 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define path_ActorComponent \
|
|
|
|
R"(C:\projects\Unreal\Surgo\UE\Engine\Source\Runtime\Engine\Classes\Components\ActorComponent.h)"
|
|
|
|
|
2024-04-21 06:51:51 -07:00
|
|
|
#if 1
|
2024-12-14 05:46:22 -08:00
|
|
|
content = file_read_contents( ctx.Allocator_Temp, true, path_ActorComponent );
|
|
|
|
CodeBody parsed_actor_component = parse_global_body( Str { (char const*)content.data, content.size });
|
2024-04-16 02:02:58 -07:00
|
|
|
|
|
|
|
for ( Code gcode : parsed_actor_component )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
if ( gcode->Type == CT_Class )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
log_fmt("\n\n");
|
|
|
|
log_fmt("Class %S - Definitions:\n", gcode->Name);
|
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
if (gcode->Body->Type != CT_Class_Body)
|
2024-04-16 02:02:58 -07:00
|
|
|
continue;
|
2024-12-14 05:46:22 -08:00
|
|
|
for ( Code class_code : cast(CodeBody, gcode->Body) )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
switch ( class_code->Type )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
case CT_Variable:
|
|
|
|
case CT_Function:
|
|
|
|
case CT_Function_Fwd:
|
2024-04-16 02:02:58 -07:00
|
|
|
if ( class_code->Name )
|
|
|
|
{
|
2024-12-15 11:13:44 -08:00
|
|
|
log_fmt("%S\n", class_code->Name );
|
2024-04-16 02:02:58 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define path_SceneComponent \
|
|
|
|
R"(C:\projects\Unreal\Surgo\UE\Engine\Source\Runtime\Engine\Classes\Components\SceneComponent.h)"
|
|
|
|
|
2024-04-21 06:51:51 -07:00
|
|
|
#if 1
|
2024-12-14 05:46:22 -08:00
|
|
|
content = file_read_contents( ctx.Allocator_Temp, true, path_SceneComponent );
|
|
|
|
CodeBody parsed_scene_component = parse_global_body( Str { (char const*)content.data, content.size });
|
2024-04-16 02:02:58 -07:00
|
|
|
|
|
|
|
for ( Code gcode : parsed_scene_component )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
if ( gcode->Type == CT_Class )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
log_fmt("\n\n");
|
|
|
|
log_fmt("Class %S - Definitions:\n", gcode->Name);
|
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
if (gcode->Body->Type != CT_Class_Body)
|
2024-04-16 02:02:58 -07:00
|
|
|
continue;
|
2024-12-14 05:46:22 -08:00
|
|
|
for ( Code class_code : cast(CodeBody, gcode->Body) )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
switch ( class_code->Type )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
case CT_Variable:
|
|
|
|
case CT_Function:
|
|
|
|
case CT_Function_Fwd:
|
2024-04-16 02:02:58 -07:00
|
|
|
if ( class_code->Name )
|
|
|
|
{
|
2024-12-15 11:13:44 -08:00
|
|
|
log_fmt("%S\n", class_code->Name );
|
2024-04-16 02:02:58 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define path_AttributeSet \
|
|
|
|
R"(C:\projects\Unreal\Surgo\UE\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\AttributeSet.h)"
|
|
|
|
|
2024-04-21 06:51:51 -07:00
|
|
|
#if 1
|
2024-12-14 05:46:22 -08:00
|
|
|
content = file_read_contents( ctx.Allocator_Temp, true, path_AttributeSet );
|
|
|
|
CodeBody parsed_attribute_set = parse_global_body( Str { (char const*)content.data, content.size });
|
2024-04-16 02:02:58 -07:00
|
|
|
|
|
|
|
for ( Code gcode : parsed_attribute_set )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
if ( gcode->Type == CT_Class )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
log_fmt("\n\n");
|
|
|
|
log_fmt("Class %S - Definitions:\n", gcode->Name);
|
|
|
|
|
2024-12-14 05:46:22 -08:00
|
|
|
if (gcode->Body->Type != CT_Class_Body)
|
2024-04-16 02:02:58 -07:00
|
|
|
continue;
|
2024-12-14 05:46:22 -08:00
|
|
|
for ( Code class_code : cast(CodeBody, gcode->Body) )
|
2024-04-16 02:02:58 -07:00
|
|
|
{
|
|
|
|
switch ( class_code->Type )
|
|
|
|
{
|
2024-12-14 05:46:22 -08:00
|
|
|
case CT_Variable:
|
|
|
|
case CT_Function:
|
|
|
|
case CT_Function_Fwd:
|
2024-04-16 02:02:58 -07:00
|
|
|
if ( class_code->Name )
|
|
|
|
{
|
2024-12-15 11:13:44 -08:00
|
|
|
log_fmt("%S\n", class_code->Name );
|
2024-04-16 02:02:58 -07:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|