MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / denseReflectedHeader

Function denseReflectedHeader

__tests__/extraction.test.ts:4141–4167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4139 // blankCppInlineAnnotationMacros regresses at least one of them.
4140 const N = 120; // 120 UPROPERTY + 120 UFUNCTION = ~240 in-body macros
4141 function denseReflectedHeader(): string {
4142 let members = '';
4143 for (let i = 0; i < N; i++) {
4144 // line-leading UPROPERTY with nested meta=(...) (blankCppAnnotationMacroCalls)
4145 members += `\tUPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Move", meta=(ClampMin="0.0", EditCondition="bOn${i}", AllowedClasses="/Script/Engine.Texture"))\n\tTSubclassOf<AActor> Prop${i};\n`;
4146 // line-leading UFUNCTION + member-level ENGINE_API + UPARAM(ref) param
4147 // (all three passes) on an inline definition (has a body → is a node)
4148 members += `\tUFUNCTION(BlueprintCallable, Category="Move", meta=(DisplayName="Compute ${i}"))\n\tENGINE_API float Compute${i}(UPARAM(ref) float& In) const { return In * ${i}.0f; }\n`;
4149 }
4150 return `UCLASS(MinimalAPI, Blueprintable)
4151class ENGINE_API UDenseMovement : public UPawnMovementComponent, public IRVOAvoidanceInterface, public INetworkPredictionInterface
4152{
4153\tGENERATED_BODY()
4154public:
4155\tDECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnMoved, float, Speed, FVector, Loc);
4156\tusing FLegacyTick UE_DEPRECATED(5.5, "use TDelegate<void(float)>") = TMulticastDelegate<void(float)>;
4157${members}};
4158
4159UENUM(BlueprintType)
4160enum class EDenseMode : uint8
4161{
4162\tWalking UMETA(DisplayName="Walk (fast), safe"),
4163\tFlying UMETA(DisplayName="Fly"),
4164\tCustom UMETA(Hidden),
4165};
4166`;
4167 }
4168
4169 it('recovers a ~240-macro reflected class, its base clause, and every decorated member', () => {
4170 const result = extractFromSource('DenseMovement.h', denseReflectedHeader());

Callers 1

extraction.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected