engine
 
载入中...
搜索中...
未找到
函数
PropertyPathHelpers 命名空间参考

A collection of utility functions operating on cached property paths 更多...

函数

PROPERTYPATH_API bool CopyPropertyValue (UObject *InContainer, const FCachedPropertyPath &InDestPropertyPath, const FCachedPropertyPath &InSrcPropertyPath)
 Copy values between two property paths in the same container. 更多...
 
PROPERTYPATH_API bool CopyPropertyValueFast (UObject *InContainer, const FCachedPropertyPath &InDestPropertyPath, const FCachedPropertyPath &InSrcPropertyPath)
 Copy values between two property paths in the same container. 更多...
 
PROPERTYPATH_API void FindFieldNameAndArrayIndex (int32 InCount, const TCHAR *InString, int32 &OutCount, const TCHAR **OutPropertyName, int32 &OutArrayIndex)
 Parses a property path segment name of the form PropertyName[OptionalArrayIndex] 更多...
 
template<typename T >
bool GetPropertyValue (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, T &OutValue)
 Get the value represented by this property path. 更多...
 
template<typename T >
bool GetPropertyValue (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, T &OutValue, FProperty *&OutProperty)
 Get the value and the leaf property represented by this property path. 更多...
 
template<typename T >
bool GetPropertyValue (UObject *InContainer, const FString &InPropertyPath, T &OutValue)
 Get the value represented by this property path. 更多...
 
template<typename T >
bool GetPropertyValue (UObject *InContainer, const FString &InPropertyPath, T &OutValue, FProperty *&OutProperty)
 Get the value and the leaf property represented by this property path. 更多...
 
PROPERTYPATH_API bool GetPropertyValueAsString (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, FString &OutValue)
 Get the value represented by this property path as a string 更多...
 
PROPERTYPATH_API bool GetPropertyValueAsString (UObject *InContainer, const FString &InPropertyPath, FString &OutValue)
 Get the value represented by this property path as a string 更多...
 
PROPERTYPATH_API bool GetPropertyValueAsString (UObject *InContainer, const FString &InPropertyPath, FString &OutValue, FProperty *&OutProperty)
 Get the value represented by this property path as a string 更多...
 
PROPERTYPATH_API bool GetPropertyValueAsString (void *InContainer, UStruct *InStruct, const FCachedPropertyPath &InPropertyPath, FString &OutValue)
 Get the value represented by this property path as a string 更多...
 
PROPERTYPATH_API bool GetPropertyValueAsString (void *InContainer, UStruct *InStruct, const FString &InPropertyPath, FString &OutValue)
 Get the value represented by this property path as a string 更多...
 
PROPERTYPATH_API bool GetPropertyValueAsString (void *InContainer, UStruct *InStruct, const FString &InPropertyPath, FString &OutValue, FProperty *&OutProperty)
 Get the value represented by this property path as a string 更多...
 
template<typename T >
bool GetPropertyValueFast (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, T &OutValue)
 Get the value represented by this property path. 更多...
 
template<typename T >
bool GetPropertyValueFast (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, T &OutValue, FProperty *&OutProperty)
 Get the value and the leaf property represented by this property path, forcing the use of cached addresses whether or not the path resolves over object or dynamic array boundaries. 更多...
 
PROPERTYPATH_API bool PerformArrayOperation (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, TFunctionRef< bool(FScriptArrayHelper &, int32)> InOperation)
 Perform the specified operation on the array referenced by the property path 更多...
 
PROPERTYPATH_API bool PerformArrayOperation (UObject *InContainer, const FString &InPropertyPath, TFunctionRef< bool(FScriptArrayHelper &, int32)> InOperation)
 Perform the specified operation on the array referenced by the property path 更多...
 
template<typename T >
bool SetPropertyValue (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, const T &InValue)
 Set the value and the leaf property represented by this property path If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. 更多...
 
template<typename T >
bool SetPropertyValue (UObject *InContainer, const FString &InPropertyPath, const T &InValue)
 Set the value and the leaf property represented by this property path If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. 更多...
 
template<typename T >
bool SetPropertyValueFast (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, const T &InValue)
 Get the value represented by this property path. 更多...
 
PROPERTYPATH_API bool SetPropertyValueFromString (UObject *InContainer, const FCachedPropertyPath &InPropertyPath, const FString &InValue)
 Set the value represented by this property path from a string 更多...
 
PROPERTYPATH_API bool SetPropertyValueFromString (UObject *InContainer, const FString &InPropertyPath, const FString &InValue)
 Set the value represented by this property path from a string 更多...
 
PROPERTYPATH_API bool SetPropertyValueFromString (void *InContainer, UStruct *InStruct, const FCachedPropertyPath &InPropertyPath, const FString &InValue)
 Set the value represented by this property path from a string 更多...
 
PROPERTYPATH_API bool SetPropertyValueFromString (void *InContainer, UStruct *InStruct, const FString &InPropertyPath, const FString &InValue)
 Set the value represented by this property path from a string 更多...
 

详细描述

A collection of utility functions operating on cached property paths

函数说明

◆ CopyPropertyValue()

PROPERTYPATH_API bool PropertyPathHelpers::CopyPropertyValue ( UObject *  InContainer,
const FCachedPropertyPath &  InDestPropertyPath,
const FCachedPropertyPath &  InSrcPropertyPath 
)

Copy values between two property paths in the same container.

参数
InContainerThe container object to resolve the property path against
InDestPropertyPathThe property path to copy to
InSrcPropertyPathThe property path to copy from
返回
true if the copy was successful

◆ CopyPropertyValueFast()

PROPERTYPATH_API bool PropertyPathHelpers::CopyPropertyValueFast ( UObject *  InContainer,
const FCachedPropertyPath &  InDestPropertyPath,
const FCachedPropertyPath &  InSrcPropertyPath 
)

Copy values between two property paths in the same container.

Fast, unsafe version. Using this requires that the two paths are pre-resolved from either a previous call to CopyPropertyValue (or GetPropertyValue/SetPropertyValue) or FCachedPropertyPath::Resolve().

参数
InContainerThe container object to resolve the property path against
InDestPropertyPathThe property path to copy to
InSrcPropertyPathThe property path to copy from
返回
true if the copy was successful

◆ FindFieldNameAndArrayIndex()

PROPERTYPATH_API void PropertyPathHelpers::FindFieldNameAndArrayIndex ( int32  InCount,
const TCHAR *  InString,
int32 &  OutCount,
const TCHAR **  OutPropertyName,
int32 &  OutArrayIndex 
)

Parses a property path segment name of the form PropertyName[OptionalArrayIndex]

参数
InCountThe length of the input string
InStringThe Input string to parse
OutCountThe length of the resulting property name string
OutPropertyNameThe string storing the name of the property
OutArrayIndexThe resulting array index, if any

◆ GetPropertyValue() [1/4]

template<typename T >
bool PropertyPathHelpers::GetPropertyValue ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
T &  OutValue 
)

Get the value represented by this property path.

If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
OutValueThe value to write to
返回
true if the property value was successfully copied

◆ GetPropertyValue() [2/4]

template<typename T >
bool PropertyPathHelpers::GetPropertyValue ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
T &  OutValue,
FProperty *&  OutProperty 
)

Get the value and the leaf property represented by this property path.

If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
OutValueThe value to write to
OutPropertyThe leaf property that the path resolved to
返回
true if the property value was successfully copied

◆ GetPropertyValue() [3/4]

template<typename T >
bool PropertyPathHelpers::GetPropertyValue ( UObject *  InContainer,
const FString &  InPropertyPath,
T &  OutValue 
)

Get the value represented by this property path.

If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
OutValueThe value to write to
返回
true if the property value was successfully copied

◆ GetPropertyValue() [4/4]

template<typename T >
bool PropertyPathHelpers::GetPropertyValue ( UObject *  InContainer,
const FString &  InPropertyPath,
T &  OutValue,
FProperty *&  OutProperty 
)

Get the value and the leaf property represented by this property path.

If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path. This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
OutValueThe value to write to
OutPropertyThe leaf property that the path resolved to
返回
true if the property value was successfully copied

◆ GetPropertyValueAsString() [1/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
FString &  OutValue 
)

Get the value represented by this property path as a string

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
OutValueThe string to write the properties value to
返回
true if the property value was successfully copied

◆ GetPropertyValueAsString() [2/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( UObject *  InContainer,
const FString &  InPropertyPath,
FString &  OutValue 
)

Get the value represented by this property path as a string

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
OutValueThe string to write the properties value to
返回
true if the property value was successfully copied

◆ GetPropertyValueAsString() [3/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( UObject *  InContainer,
const FString &  InPropertyPath,
FString &  OutValue,
FProperty *&  OutProperty 
)

Get the value represented by this property path as a string

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
OutValueThe string to write the properties value to
OutPropertyThe leaf property that the path resolved to
返回
true if the property value was successfully copied

◆ GetPropertyValueAsString() [4/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( void *  InContainer,
UStruct *  InStruct,
const FCachedPropertyPath &  InPropertyPath,
FString &  OutValue 
)

Get the value represented by this property path as a string

参数
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path
OutValueThe string to write the properties value to
返回
true if the property value was successfully copied

◆ GetPropertyValueAsString() [5/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( void *  InContainer,
UStruct *  InStruct,
const FString &  InPropertyPath,
FString &  OutValue 
)

Get the value represented by this property path as a string

参数
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path string
OutValueThe string to write the properties value to
返回
true if the property value was successfully copied

◆ GetPropertyValueAsString() [6/6]

PROPERTYPATH_API bool PropertyPathHelpers::GetPropertyValueAsString ( void *  InContainer,
UStruct *  InStruct,
const FString &  InPropertyPath,
FString &  OutValue,
FProperty *&  OutProperty 
)

Get the value represented by this property path as a string

参数
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path string
OutValueThe string to write the properties value to
OutPropertyThe leaf property that the path resolved to
返回
true if the property value was successfully copied

◆ GetPropertyValueFast() [1/2]

template<typename T >
bool PropertyPathHelpers::GetPropertyValueFast ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
T &  OutValue 
)

Get the value represented by this property path.

forcing the use of cached addresses whether or not the path resolves over object or dynamic array boundaries. Using this function implies that the path is resolved and has not changed since last resolution.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
OutValueThe value to write to
返回
true if the property value was successfully copied

◆ GetPropertyValueFast() [2/2]

template<typename T >
bool PropertyPathHelpers::GetPropertyValueFast ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
T &  OutValue,
FProperty *&  OutProperty 
)

Get the value and the leaf property represented by this property path, forcing the use of cached addresses whether or not the path resolves over object or dynamic array boundaries.

Using this function implies that the path is resolved and has not changed since last resolution.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
OutValueThe value to write to
OutPropertyThe leaf property that the path resolved to
返回
true if the property value was successfully copied

◆ PerformArrayOperation() [1/2]

PROPERTYPATH_API bool PropertyPathHelpers::PerformArrayOperation ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
TFunctionRef< bool(FScriptArrayHelper &, int32)>  InOperation 
)

Perform the specified operation on the array referenced by the property path

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
InOperationThe operation to perform. The function will receive a script array helper and an index (if the path specified one).
返回
true if the operation was successful

◆ PerformArrayOperation() [2/2]

PROPERTYPATH_API bool PropertyPathHelpers::PerformArrayOperation ( UObject *  InContainer,
const FString &  InPropertyPath,
TFunctionRef< bool(FScriptArrayHelper &, int32)>  InOperation 
)

Perform the specified operation on the array referenced by the property path

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
InOperationThe operation to perform. The function will receive a script array helper and an index (if the path specified one).
返回
true if the operation was successful

◆ SetPropertyValue() [1/2]

template<typename T >
bool PropertyPathHelpers::SetPropertyValue ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
const T &  InValue 
)

Set the value and the leaf property represented by this property path If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path.

This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
InValueThe value to write from
返回
true if the property value was successfully copied

◆ SetPropertyValue() [2/2]

template<typename T >
bool PropertyPathHelpers::SetPropertyValue ( UObject *  InContainer,
const FString &  InPropertyPath,
const T &  InValue 
)

Set the value and the leaf property represented by this property path If the cached property path has a cached address it will use that as a 'fast path' instead of iterating the path.

This has safety implications depending on the form of the path, so paths that are resolved over object boundaries or dynamic arrays will always use the slow path for safety.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
InValueThe value to write from
返回
true if the property value was successfully copied

◆ SetPropertyValueFast()

template<typename T >
bool PropertyPathHelpers::SetPropertyValueFast ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
const T &  InValue 
)

Get the value represented by this property path.

Fast, unsafe version. Using this function implies that the path is resolved and has not changed since last resolution.

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
InValueThe value to write from
返回
true if the property value was successfully copied

◆ SetPropertyValueFromString() [1/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( UObject *  InContainer,
const FCachedPropertyPath &  InPropertyPath,
const FString &  InValue 
)

Set the value represented by this property path from a string

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path
InValueThe string to read the properties value from
返回
true if the property value was successfully copied

◆ SetPropertyValueFromString() [2/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( UObject *  InContainer,
const FString &  InPropertyPath,
const FString &  InValue 
)

Set the value represented by this property path from a string

参数
InContainerThe container object to resolve the property path against
InPropertyPathThe property path string
InValueThe string to read the properties value from
返回
true if the property value was successfully copied

◆ SetPropertyValueFromString() [3/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( void *  InContainer,
UStruct *  InStruct,
const FCachedPropertyPath &  InPropertyPath,
const FString &  InValue 
)

Set the value represented by this property path from a string

参数
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path
InValueThe string to read the properties value from
返回
true if the property value was successfully copied

◆ SetPropertyValueFromString() [4/4]

PROPERTYPATH_API bool PropertyPathHelpers::SetPropertyValueFromString ( void *  InContainer,
UStruct *  InStruct,
const FString &  InPropertyPath,
const FString &  InValue 
)

Set the value represented by this property path from a string

参数
InContainerA pointer to the container structure to resolve the property path against
InStructThe struct type that InContainer points to
InPropertyPathThe property path string
InValueThe string to read the properties value from
返回
true if the property value was successfully copied