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
| IModularFeatures::DECLARE_EVENT_TwoParams | ( | IModularFeatures | , |
| FOnModularFeatureRegistered | , | ||
| const FName & | , | ||
| class IModularFeature * | |||
| ) |
Event used to inform clients that a modular feature has been registered.
| Type | The name of the modular feature type being registered. |
| IModularFeatures::DECLARE_EVENT_TwoParams | ( | IModularFeatures | , |
| FOnModularFeatureUnregistered | , | ||
| const FName & | , | ||
| class IModularFeature * | |||
| ) |
Event used to inform clients that a modular feature has been unregistered.
| Type | The name of the modular feature type being unregistered. |
|
static |
Static: Access singleton instance
|
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!
| Type | The type of feature we're looking for |
|
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().
| Type | The type of feature we're looking for |
| Index | The index of the implementation (there may be multiple implementations of the same feature registered.) |
|
pure virtual |
Returns the number of registered implementations of the specified feature type.
| Type | The type of feature we're looking for |
|
inline |
Queries for one or more implementations of a single feature.
If no feature of this type is registered, will return an empty array.
| Type | The type of feature we're looking for |
|
inline |
Checks to see if the specified feature is available
| Type | The type of feature we're looking for |
|
pure virtual |
Registers a feature.
Usually called by plugins to augment or replace existing modular features.
| Type | The type of feature we're registering |
| ModularFeature | Interface 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. |
|
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.
| Type | The type of feature we're unregistering |
| ModularFeature | Interface to the modular feature object |