Files
UnrealEngineUWP/Engine/Source/Editor/BlueprintGraph/Classes/K2Node_GetDataTableRow.h
Jaroslaw Palczynski f23f29257b Back out changelist 2481333
Rob asked me to back out GENERATED_*_BODY -> GENERATED_BODY change for now until the "_Validate and _Implementation auto-generation" discussion is over.

#codereview Robert.Manuszewski

[CL 2481343 by Jaroslaw Palczynski in Main branch]
2015-03-17 05:38:32 -04:00

74 lines
2.8 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "K2Node.h"
#include "EdGraph/EdGraphNodeUtils.h" // for FNodeTextCache
#include "Engine/DataTable.h"
#include "K2Node_GetDataTableRow.generated.h"
UCLASS()
class BLUEPRINTGRAPH_API UK2Node_GetDataTableRow : public UK2Node
{
GENERATED_UCLASS_BODY()
// Begin UEdGraphNode interface.
virtual void AllocateDefaultPins() override;
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
virtual void PinDefaultValueChanged(UEdGraphPin* Pin) override;
virtual FText GetTooltipText() const override;
virtual void ExpandNode(class FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) override;
virtual FName GetPaletteIcon(FLinearColor& OutColor) const override
{
OutColor = GetNodeTitleColor();
return TEXT("Kismet.AllClasses.FunctionIcon");
}
// End UEdGraphNode interface.
// Begin UK2Node interface
virtual bool IsNodeSafeToIgnore() const override { return true; }
virtual void ReallocatePinsDuringReconstruction(TArray<UEdGraphPin*>& OldPins) override;
virtual void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override;
virtual FText GetMenuCategory() const override;
virtual bool IsConnectionDisallowed(const UEdGraphPin* MyPin, const UEdGraphPin* OtherPin, FString& OutReason) const override;
virtual void EarlyValidation(class FCompilerResultsLog& MessageLog) const override;
// End UK2Node interface
/** Set the return type of our struct */
void SetReturnTypeForStruct(UScriptStruct* InClass);
/** Get the return type of our struct */
UScriptStruct* GetReturnTypeForStruct();
/** Get the then output pin */
UEdGraphPin* GetThenPin() const;
/** Get the Data Table input pin */
UEdGraphPin* GetDataTablePin(const TArray<UEdGraphPin*>* InPinsToSearch=NULL) const;
/** Get the spawn transform input pin */
UEdGraphPin* GetRowNamePin() const;
/** Get the exec output pin for when the row was not found */
UEdGraphPin* GetRowNotFoundPin() const;
/** Get the result output pin */
UEdGraphPin* GetResultPin() const;
/** Get the type of the TableRow to return */
UScriptStruct* GetDataTableRowStructType(const TArray<UEdGraphPin*>* InPinsToSearch = NULL) const;
void OnDataTableRowListChanged(const UDataTable* DataTable);
private:
/**
* Takes the specified "MutatablePin" and sets its 'PinToolTip' field (according
* to the specified description)
*
* @param MutatablePin The pin you want to set tool-tip text on
* @param PinDescription A string describing the pin's purpose
*/
void SetPinToolTip(UEdGraphPin& MutatablePin, const FText& PinDescription) const;
/** Tooltip text for this node. */
FText NodeTooltip;
/** Constructing FText strings can be costly, so we cache the node's title */
FNodeTextCache CachedNodeTitle;
};