engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
IModularFeatures类 参考abstract

Public interface to all known modular features 更多...

#include <IModularFeatures.h>

Public 成员函数

 DECLARE_EVENT_TwoParams (IModularFeatures, FOnModularFeatureRegistered, const FName &, class IModularFeature *)
 Event used to inform clients that a modular feature has been registered. 更多...
 
 DECLARE_EVENT_TwoParams (IModularFeatures, FOnModularFeatureUnregistered, const FName &, class IModularFeature *)
 Event used to inform clients that a modular feature has been unregistered. 更多...
 
template<typename TModularFeature >
TModularFeature & GetModularFeature (const FName Type)
 Queries for a specific feature. 更多...
 
virtual class IModularFeature * GetModularFeatureImplementation (const FName Type, const int32 Index)=0
 Queries for a specific modular feature. 更多...
 
virtual int32 GetModularFeatureImplementationCount (const FName Type)=0
 Returns the number of registered implementations of the specified feature type. 更多...
 
template<typename TModularFeature >
TArray< TModularFeature * > GetModularFeatureImplementations (const FName Type)
 Queries for one or more implementations of a single feature. 更多...
 
bool IsModularFeatureAvailable (const FName Type)
 Checks to see if the specified feature is available 更多...
 
virtual void RegisterModularFeature (const FName Type, class IModularFeature *ModularFeature)=0
 Registers a feature. 更多...
 
virtual void UnregisterModularFeature (const FName Type, class IModularFeature *ModularFeature)=0
 Unregisters a feature that was registered earlier on. 更多...
 
virtual ~IModularFeatures ()
 Virtual destructor, to make polymorphism happy.
 

静态 Public 成员函数

static CORE_API IModularFeatures & Get ()
 Static: Access singleton instance 更多...
 

详细描述

Public interface to all known modular features

成员函数说明

◆ DECLARE_EVENT_TwoParams() [1/2]

IModularFeatures::DECLARE_EVENT_TwoParams ( IModularFeatures  ,
FOnModularFeatureRegistered  ,
const FName &  ,
class IModularFeature *   
)

Event used to inform clients that a modular feature has been registered.

参数
TypeThe name of the modular feature type being registered.

◆ DECLARE_EVENT_TwoParams() [2/2]

IModularFeatures::DECLARE_EVENT_TwoParams ( IModularFeatures  ,
FOnModularFeatureUnregistered  ,
const FName &  ,
class IModularFeature *   
)

Event used to inform clients that a modular feature has been unregistered.

参数
TypeThe name of the modular feature type being unregistered.

◆ Get()

static CORE_API IModularFeatures & IModularFeatures::Get ( )
static

Static: Access singleton instance

返回
Reference to the singleton object

◆ GetModularFeature()

template<typename TModularFeature >
TModularFeature & IModularFeatures::GetModularFeature ( const FName  Type)
inline

Queries for a specific feature.

If multiple implementations of the same feature were registered, this will return the first. Will assert or crash if the specified feature is not available! You should call IsModularFeatureAvailable() first!

参数
TypeThe type of feature we're looking for
返回
The feature.

◆ GetModularFeatureImplementation()

virtual class IModularFeature * IModularFeatures::GetModularFeatureImplementation ( const FName  Type,
const int32  Index 
)
pure virtual

Queries for a specific modular feature.

Returns NULL if the feature is not available. Does not assert. Usually you should just call GetModularFeature instead, after calling IsModularFeatureAvailable().

参数
TypeThe type of feature we're looking for
IndexThe index of the implementation (there may be multiple implementations of the same feature registered.)
返回
Pointer to the feature interface, or NULL if it's not available right now.

◆ GetModularFeatureImplementationCount()

virtual int32 IModularFeatures::GetModularFeatureImplementationCount ( const FName  Type)
pure virtual

Returns the number of registered implementations of the specified feature type.

参数
TypeThe type of feature we're looking for
返回
Number of implementations of this feature.

◆ GetModularFeatureImplementations()

template<typename TModularFeature >
TArray< TModularFeature * > IModularFeatures::GetModularFeatureImplementations ( const FName  Type)
inline

Queries for one or more implementations of a single feature.

If no feature of this type is registered, will return an empty array.

参数
TypeThe type of feature we're looking for
返回
List of available implementations of this feature.

◆ IsModularFeatureAvailable()

bool IModularFeatures::IsModularFeatureAvailable ( const FName  Type)
inline

Checks to see if the specified feature is available

参数
TypeThe type of feature we're looking for
返回
True if the feature is available right now and it is safe to call GetModularFeature()

◆ RegisterModularFeature()

virtual void IModularFeatures::RegisterModularFeature ( const FName  Type,
class IModularFeature *  ModularFeature 
)
pure virtual

Registers a feature.

Usually called by plugins to augment or replace existing modular features.

参数
TypeThe type of feature we're registering
ModularFeatureInterface to the modular feature object. We do not assume ownership of this object. It's up to you to keep it allocated until it is unregistered later on.

◆ UnregisterModularFeature()

virtual void IModularFeatures::UnregisterModularFeature ( const FName  Type,
class IModularFeature *  ModularFeature 
)
pure virtual

Unregisters a feature that was registered earlier on.

After unregistering a feature, other systems will no longer be able to gain access to it through this interface.

参数
TypeThe type of feature we're unregistering
ModularFeatureInterface to the modular feature object

该类的文档由以下文件生成: