本文整理汇总了C++中TSharedRef::GetArrayIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::GetArrayIndex方法的具体用法?C++ TSharedRef::GetArrayIndex怎么用?C++ TSharedRef::GetArrayIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedRef
的用法示例。
在下文中一共展示了TSharedRef::GetArrayIndex方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PropertyEditConditions
FPropertyEditor::FPropertyEditor( const TSharedRef<FPropertyNode>& InPropertyNode, const TSharedRef<IPropertyUtilities>& InPropertyUtilities )
: PropertyEditConditions()
, PropertyHandle( NULL )
, PropertyNode( InPropertyNode )
, PropertyUtilities( InPropertyUtilities )
, EditConditionProperty( NULL )
{
// FPropertyEditor isn't built to handle CategoryNodes
check( InPropertyNode->AsCategoryNode() == NULL );
UProperty* Property = InPropertyNode->GetProperty();
if( Property )
{
//see if the property supports some kind of edit condition and this isn't the "parent" property of a static array
const bool bStaticArray = Property->ArrayDim > 1 && InPropertyNode->GetArrayIndex() == INDEX_NONE;
if ( Property->HasMetaData( TEXT( "EditCondition" ) ) && !bStaticArray )
{
if ( !GetEditConditionPropertyAddress( /*OUT*/EditConditionProperty, *InPropertyNode, PropertyEditConditions ) )
{
EditConditionProperty = NULL;
}
}
}
PropertyHandle = PropertyEditorHelpers::GetPropertyHandle( InPropertyNode, PropertyUtilities->GetNotifyHook(), PropertyUtilities );
check( PropertyHandle.IsValid() && PropertyHandle->IsValidHandle() );
}
示例2: Supports
bool SPropertyEditorCombo::Supports( const TSharedRef< class FPropertyEditor >& InPropertyEditor )
{
const TSharedRef< FPropertyNode > PropertyNode = InPropertyEditor->GetPropertyNode();
const UProperty* Property = InPropertyEditor->GetProperty();
int32 ArrayIndex = PropertyNode->GetArrayIndex();
if( ((Property->IsA(UByteProperty::StaticClass()) && Cast<const UByteProperty>(Property)->Enum)
|| (Property->IsA(UNameProperty::StaticClass()) && Property->GetFName() == NAME_InitialState)
|| (Property->IsA(UStrProperty::StaticClass()) && Property->HasMetaData(TEXT("Enum")))
)
&& ( ( ArrayIndex == -1 && Property->ArrayDim == 1 ) || ( ArrayIndex > -1 && Property->ArrayDim > 0 ) ) )
{
return true;
}
return false;
}
示例3: Supports
bool SPropertyEditorClass::Supports(const TSharedRef< class FPropertyEditor >& InPropertyEditor)
{
if(InPropertyEditor->IsEditConst())
{
return false;
}
const TSharedRef< FPropertyNode > PropertyNode = InPropertyEditor->GetPropertyNode();
const UProperty* Property = InPropertyEditor->GetProperty();
int32 ArrayIndex = PropertyNode->GetArrayIndex();
if ((Property->IsA(UClassProperty::StaticClass()) || Property->IsA(UAssetClassProperty::StaticClass()))
&& ((ArrayIndex == -1 && Property->ArrayDim == 1) || (ArrayIndex > -1 && Property->ArrayDim > 0)))
{
return true;
}
return false;
}
示例4: Supports
bool SPropertyEditorEditInline::Supports( const TSharedRef< class FPropertyEditor >& InPropertyEditor )
{
const TSharedRef< FPropertyNode > PropertyNode = InPropertyEditor->GetPropertyNode();
return SPropertyEditorEditInline::Supports( &PropertyNode.Get(), PropertyNode->GetArrayIndex() );
}