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

The public interface for interacting with analytics. 更多...

#include <Analytics.h>

+ 类 FAnalytics 继承关系图:

类

struct  ConfigFromIni
 A common way of configuring is from Inis, so this class supports that notion directly by providing a configuration class with a method suitable to be used as an FAnalyticsProviderConfigurationDelegate that reads values from the specified ini and section (based on the BuildType). 更多...
 

Public 成员函数

virtual TSharedPtr< IAnalyticsProvider > CreateAnalyticsProvider (const FName &ProviderModuleName, const FAnalyticsProviderConfigurationDelegate &GetConfigValue)
 Factory function to create a specific analytics provider by providing the string name of the provider module, which will be dynamically loaded. 更多...
 
virtual FString GetConfigValueFromIni (const FString &IniName, const FString &SectionName, const FString &KeyName, bool bIsRequired)
 Helper for reading configuration values from an INI file (which will be a common scenario). 更多...
 
virtual TSharedPtr< IAnalyticsProvider > GetDefaultConfiguredProvider ()
 Creates an instance of the default configured analytics provider. 更多...
 
virtual void WriteConfigValueToIni (const FString &IniName, const FString &SectionName, const FString &KeyName, const FString &Value)
 Helper for writing configuration values from to an INI file (which will be a common scenario).
 
- Public 成员函数 继承自 IModuleInterface
virtual bool IsGameModule () const
 Returns true if this module hosts gameplay code 更多...
 
virtual void PostLoadCallback ()
 Called after the module has been reloaded
 
virtual void PreUnloadCallback ()
 Called before the module has been unloaded
 
virtual void ShutdownModule ()
 Called before the module is unloaded, right before the module object is destroyed. 更多...
 
virtual void StartupModule ()
 Called right after the module DLL has been loaded and the module object has been created Load dependent modules here, and they will be guaranteed to be available during ShutdownModule. 更多...
 
virtual bool SupportsAutomaticShutdown ()
 Override this to set whether your module would like cleanup on application shutdown 更多...
 
virtual bool SupportsDynamicReloading ()
 Override this to set whether your module is allowed to be unloaded on the fly 更多...
 
virtual ~IModuleInterface ()
 Note: Even though this is an interface class we need a virtual destructor here because modules are deleted via a pointer to this interface

 

静态 Public 成员函数

static FAnalytics & Get ()
 Singleton-like access to this module's interface. 更多...
 
static bool IsAvailable ()
 Checks to see if this module is loaded and ready. 更多...
 

详细描述

The public interface for interacting with analytics.

The basic usage is to call CreateAnalyticsProvider and supply a configuration delegate. Specific analytics providers may choose to provide strongly-typed factory methods for configuration, in which case you are free to call that directly if you know exactly what provider you will be using. This class merely facilitates loosely bound provider configuration so the provider itself can be configured purely via config.

BuildType methods exist as a common way for an analytics provider to configure itself for debug/development/playtest/release scenarios. Again, you can choose to ignore this info and provide a generic configuration delegate that does anything it wants.

To create an analytics provider using all the system defaults, simply call the static GetDefaultConfiguredProvider().

成员函数说明

◆ CreateAnalyticsProvider()

virtual TSharedPtr< IAnalyticsProvider > FAnalytics::CreateAnalyticsProvider ( const FName &  ProviderModuleName,
const FAnalyticsProviderConfigurationDelegate &  GetConfigValue 
)
virtual

Factory function to create a specific analytics provider by providing the string name of the provider module, which will be dynamically loaded.

参数
ProviderModuleNameThe name of the module that contains the specific provider. It must be the primary module interface.
GetConfigvalueDelegate used to configure the provider. The provider will call this delegate once for each key it requires for configuration.
返回
the analytics provider instance that was created. Could be NULL if initialization failed.

◆ Get()

static FAnalytics & FAnalytics::Get ( )
inlinestatic

Singleton-like access to this module's interface.

This is just for convenience! Beware of calling this during the shutdown phase, though. Your module might have been unloaded already.

返回
Returns singleton instance, loading the module on demand if needed

◆ GetConfigValueFromIni()

virtual FString FAnalytics::GetConfigValueFromIni ( const FString &  IniName,
const FString &  SectionName,
const FString &  KeyName,
bool  bIsRequired 
)
virtual

Helper for reading configuration values from an INI file (which will be a common scenario).

This is exposed here so we're not exporting more classes from the module. It's merely a helper for ConfigFromIni struct above.

◆ GetDefaultConfiguredProvider()

virtual TSharedPtr< IAnalyticsProvider > FAnalytics::GetDefaultConfiguredProvider ( )
inlinevirtual

Creates an instance of the default configured analytics provider.

Default is determined by GetDefaultProviderModuleName and a default constructed ConfigFromIni instance.

This implementation is kept in the header file to illustrate how providers are created using configuration delegates.

◆ IsAvailable()

static bool FAnalytics::IsAvailable ( )
inlinestatic

Checks to see if this module is loaded and ready.

It is only valid to call Get() if IsAvailable() returns true.

返回
True if the module is loaded and ready to use

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