5#include "CoreMinimal.h"
12template <
class VariablePropertyType>
16 typedef typename std::enable_if<std::is_base_of<FDlgTreeViewVariableProperties, VariablePropertyType>::value>::type
check;
26 for (
const auto& Pair :
Events)
123 const TMap<FName, TSharedPtr<VariablePropertyType>>&
GetEvents()
const {
return Events; }
127 const TMap<FName, TSharedPtr<VariablePropertyType>>&
GetFloats()
const {
return Floats; }
128 const TMap<FName, TSharedPtr<VariablePropertyType>>&
GetBools()
const {
return Bools; }
129 const TMap<FName, TSharedPtr<VariablePropertyType>>&
GetFNames()
const {
return FNames; }
163 template <
typename KeyType>
165 TMap<KeyType, TSharedPtr<VariablePropertyType>>* VariableMap,
166 KeyType VariableKeyValue,
167 TWeakObjectPtr<const UDlgDialogue>
Dialogue
170 TSharedPtr<VariablePropertyType>* VariablePropsPtr = VariableMap->Find(VariableKeyValue);
171 TSharedPtr<VariablePropertyType> VariableProps;
172 if (VariablePropsPtr ==
nullptr)
175 const TSet<TWeakObjectPtr<const UDlgDialogue>> SetArgument{
Dialogue};
176 VariableProps = MakeShared<VariablePropertyType>(SetArgument);
177 VariableMap->Add(VariableKeyValue, VariableProps);
182 VariableProps = *VariablePropsPtr;
183 VariableProps->AddDialogue(
Dialogue);
186 return VariableProps;
201 TMap<FName, TSharedPtr<VariablePropertyType>>
Events;
222 TMap<FName, TSharedPtr<VariablePropertyType>>
Integers;
229 TMap<FName, TSharedPtr<VariablePropertyType>>
Floats;
236 TMap<FName, TSharedPtr<VariablePropertyType>>
Bools;
243 TMap<FName, TSharedPtr<VariablePropertyType>>
FNames;
static void SortDefault(TArray< FName > &OutArray)
static bool PredicateSortDialogueWeakPtrAlphabeticallyAscending(const TWeakObjectPtr< const UDlgDialogue > &First, const TWeakObjectPtr< const UDlgDialogue > &Second)
TSharedPtr< VariablePropertyType > AddDialogueToClassIntVariable(FName IntVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
bool HasClassFTexts() const
TSharedPtr< VariablePropertyType > AddDialogueToIntVariable(FName IntVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetClassFloats() const
TSharedPtr< VariablePropertyType > AddDialogueToCondition(FName ConditionName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
TMap< FName, TSharedPtr< VariablePropertyType > > ClassIntegers
void AddDialogue(TWeakObjectPtr< const UDlgDialogue > Dialogue)
bool HasCustomEvents() const
TSharedPtr< VariablePropertyType > AddDialogueToClassFTextVariable(FName FTextVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
bool HasDialogues() const
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetIntegers() const
std::enable_if< std::is_base_of< FDlgTreeViewVariableProperties, VariablePropertyType >::value >::type check
TMap< FName, TSharedPtr< VariablePropertyType > > ClassFTexts
TMap< FName, TSharedPtr< VariablePropertyType > > Integers
bool HasDialogueValues() const
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetFNames() const
TSharedPtr< VariablePropertyType > AddDialogueToClassFNameVariable(FName FNameVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
TSharedPtr< VariablePropertyType > AddDialogueToFloatVariable(FName FloatVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetEvents() const
TSharedPtr< VariablePropertyType > AddDialogueToBoolVariable(FName BoolVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
TSharedPtr< VariablePropertyType > AddDialogueToFNameVariable(FName FNameVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetFloats() const
TSharedPtr< VariablePropertyType > AddDialogueToClassFloatVariable(FName FloatVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetClassIntegers() const
FDlgTreeViewParticipantProperties(const TSet< TWeakObjectPtr< const UDlgDialogue > > &InDialogues)
TMap< FName, TSharedPtr< VariablePropertyType > > ClassFloats
TMap< UClass *, TSharedPtr< VariablePropertyType > > CustomEvents
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetBools() const
TSet< TWeakObjectPtr< const UDlgDialogue > > Dialogues
TSharedPtr< VariablePropertyType > AddDialogueToCustomEvent(UClass *EventClass, TWeakObjectPtr< const UDlgDialogue > Dialogue)
FDlgTreeViewParticipantProperties(const TSet< TWeakObjectPtr< const UDlgDialogue > > &&InDialogues)
TMap< FName, TSharedPtr< VariablePropertyType > > ClassBools
const TMap< UClass *, TSharedPtr< VariablePropertyType > > & GetCustomEvents() const
TMap< FName, TSharedPtr< VariablePropertyType > > Bools
TSharedPtr< VariablePropertyType > AddDialogueToVariable(TMap< KeyType, TSharedPtr< VariablePropertyType > > *VariableMap, KeyType VariableKeyValue, TWeakObjectPtr< const UDlgDialogue > Dialogue)
const TSet< TWeakObjectPtr< const UDlgDialogue > > & GetDialogues() const
TSharedPtr< VariablePropertyType > AddDialogueToClassBoolVariable(FName BoolVariableName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
bool HasClassVariables() const
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetConditions() const
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetClassBools() const
bool HasClassBools() const
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetClassFNames() const
TMap< FName, TSharedPtr< VariablePropertyType > > Conditions
bool HasConditions() const
bool HasClassIntegers() const
TMap< FName, TSharedPtr< VariablePropertyType > > ClassFNames
TMap< FName, TSharedPtr< VariablePropertyType > > FNames
TSharedPtr< VariablePropertyType > AddDialogueToEvent(FName EventName, TWeakObjectPtr< const UDlgDialogue > Dialogue)
TMap< FName, TSharedPtr< VariablePropertyType > > Events
TMap< FName, TSharedPtr< VariablePropertyType > > Floats
const TMap< FName, TSharedPtr< VariablePropertyType > > & GetClassFTexts() const
bool HasClassFNames() const
bool HasClassFloats() const