CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
FActorDefinitionValidator Class Reference

Checks validity of FActorDefinition. More...

+ Collaboration diagram for FActorDefinitionValidator:

Public Member Functions

bool AreValid (const TArray< FActorDefinition > &ActorDefinitions)
 Iterate all actor definitions and their properties and display messages on error. More...
 
bool SingleIsValid (const FActorDefinition &Definition)
 Validate ActorDefinition and display messages on error. More...
 

Private Member Functions

bool AreTagsValid (const FString &Tags)
 
template<typename T >
bool AreValid (const FString &Type, const TArray< T > &Array)
 Applies IsValid to each item in Array. More...
 
template<typename T , typename F >
bool ForEach (const FString &Type, const TArray< T > &Array, F Validator)
 Applies Validator to each item in Array. More...
 
template<typename T >
FString GetDisplayId (const FString &Type, size_t Index, const T &Item)
 
FString GetDisplayId (const FString &Type, size_t Index, const FString &Item)
 
bool IsIdValid (const FString &Id)
 
bool IsValid (const EActorAttributeType Type)
 
bool IsValid (const FActorVariation &Variation)
 
bool IsValid (const FActorAttribute &Attribute)
 
bool IsValid (const FActorDefinition &ActorDefinition)
 
template<typename T , typename ... ARGS>
bool OnScreenAssert (bool Predicate, const T &Format, ARGS &&... Args) const
 If Predicate is false, print an error message. More...
 
bool ValueIsValid (const EActorAttributeType Type, const FString &Value)
 

Private Attributes

FScopedStack< FString > Stack
 

Detailed Description

Checks validity of FActorDefinition.

Definition at line 20 of file ActorBlueprintFunctionLibrary.cpp.

Member Function Documentation

◆ AreTagsValid()

bool FActorDefinitionValidator::AreTagsValid ( const FString &  Tags)
inlineprivate
Todo:
Do more checks.

Definition at line 108 of file ActorBlueprintFunctionLibrary.cpp.

References OnScreenAssert().

Referenced by IsValid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AreValid() [1/2]

bool FActorDefinitionValidator::AreValid ( const TArray< FActorDefinition > &  ActorDefinitions)
inline

Iterate all actor definitions and their properties and display messages on error.

Definition at line 26 of file ActorBlueprintFunctionLibrary.cpp.

Referenced by UActorBlueprintFunctionLibrary::CheckActorDefinitions(), and IsValid().

+ Here is the caller graph for this function:

◆ AreValid() [2/2]

template<typename T >
bool FActorDefinitionValidator::AreValid ( const FString &  Type,
const TArray< T > &  Array 
)
inlineprivate

Applies IsValid to each item in Array.

Pushes a new context to the stack for each item.

Definition at line 97 of file ActorBlueprintFunctionLibrary.cpp.

References ForEach(), and IsValid().

+ Here is the call graph for this function:

◆ ForEach()

template<typename T , typename F >
bool FActorDefinitionValidator::ForEach ( const FString &  Type,
const TArray< T > &  Array,
Validator 
)
inlineprivate

Applies Validator to each item in Array.

Pushes a new context to the stack for each item.

Definition at line 81 of file ActorBlueprintFunctionLibrary.cpp.

References GetDisplayId(), FScopedStack< T >::PushScope(), and Stack.

Referenced by AreValid(), and IsValid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDisplayId() [1/2]

template<typename T >
FString FActorDefinitionValidator::GetDisplayId ( const FString &  Type,
size_t  Index,
const T &  Item 
)
inlineprivate

Definition at line 68 of file ActorBlueprintFunctionLibrary.cpp.

Referenced by ForEach().

+ Here is the caller graph for this function:

◆ GetDisplayId() [2/2]

FString FActorDefinitionValidator::GetDisplayId ( const FString &  Type,
size_t  Index,
const FString &  Item 
)
inlineprivate

Definition at line 73 of file ActorBlueprintFunctionLibrary.cpp.

◆ IsIdValid()

bool FActorDefinitionValidator::IsIdValid ( const FString &  Id)
inlineprivate
Todo:
Do more checks.

Definition at line 102 of file ActorBlueprintFunctionLibrary.cpp.

References OnScreenAssert().

Referenced by IsValid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsValid() [1/4]

bool FActorDefinitionValidator::IsValid ( const EActorAttributeType  Type)
inlineprivate
Todo:
Do more checks.

Definition at line 114 of file ActorBlueprintFunctionLibrary.cpp.

References OnScreenAssert(), and PropAttributes::SIZE.

Referenced by AreValid(), IsValid(), and SingleIsValid().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsValid() [2/4]

bool FActorDefinitionValidator::IsValid ( const FActorVariation Variation)
inlineprivate

Definition at line 126 of file ActorBlueprintFunctionLibrary.cpp.

References ForEach(), FActorVariation::Id, IsIdValid(), IsValid(), OnScreenAssert(), FActorVariation::RecommendedValues, FActorVariation::Type, and ValueIsValid().

+ Here is the call graph for this function:

◆ IsValid() [3/4]

bool FActorDefinitionValidator::IsValid ( const FActorAttribute Attribute)
inlineprivate

Definition at line 137 of file ActorBlueprintFunctionLibrary.cpp.

References FActorAttribute::Id, IsIdValid(), IsValid(), FActorAttribute::Type, FActorAttribute::Value, and ValueIsValid().

+ Here is the call graph for this function:

◆ IsValid() [4/4]

bool FActorDefinitionValidator::IsValid ( const FActorDefinition ActorDefinition)
inlineprivate
Todo:
Validate Class and make sure IDs are not repeated.

Definition at line 145 of file ActorBlueprintFunctionLibrary.cpp.

References AreTagsValid(), AreValid(), FActorDefinition::Attributes, FActorDefinition::Id, IsIdValid(), FActorDefinition::Tags, and FActorDefinition::Variations.

+ Here is the call graph for this function:

◆ OnScreenAssert()

template<typename T , typename ... ARGS>
bool FActorDefinitionValidator::OnScreenAssert ( bool  Predicate,
const T &  Format,
ARGS &&...  Args 
) const
inlineprivate

If Predicate is false, print an error message.

If possible the message is printed to the editor window.

Definition at line 44 of file ActorBlueprintFunctionLibrary.cpp.

References Stack, and String.

Referenced by AreTagsValid(), IsIdValid(), and IsValid().

+ Here is the caller graph for this function:

◆ SingleIsValid()

bool FActorDefinitionValidator::SingleIsValid ( const FActorDefinition Definition)
inline

Validate ActorDefinition and display messages on error.

Definition at line 32 of file ActorBlueprintFunctionLibrary.cpp.

References FActorDefinition::Id, IsValid(), FScopedStack< T >::PushScope(), and Stack.

Referenced by UActorBlueprintFunctionLibrary::CheckActorDefinition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ValueIsValid()

bool FActorDefinitionValidator::ValueIsValid ( const EActorAttributeType  Type,
const FString &  Value 
)
inlineprivate
Todo:
Do more checks.

Definition at line 120 of file ActorBlueprintFunctionLibrary.cpp.

Referenced by IsValid().

+ Here is the caller graph for this function:

Member Data Documentation

◆ Stack

FScopedStack<FString> FActorDefinitionValidator::Stack
private

Definition at line 155 of file ActorBlueprintFunctionLibrary.cpp.

Referenced by ForEach(), OnScreenAssert(), and SingleIsValid().


The documentation for this class was generated from the following file: