Skip to content
SiteEmail

FCohtmlScriptProvider

Inherits from ICohtmlScriptProvider

Name
virtual FCohtmlCompiledScriptDataPtrGetScriptCacheEntry(const FString & FilePath) override
virtual voidAddScriptCacheEntry(const FString & FilePath, const CohtmlCompiledScriptData & Data)
virtual TMap< FString, FCohtmlCompiledScriptDataPtr > &ModifyCachedScripts()
Returns a reference to all currently cached compiled scripts. This is useful for saving them to disk, packaging them, or modifying them after the pre-loading process has finished.
virtual voidSetCachedScripts(TMap< FString, FCohtmlCompiledScriptDataPtr > && ScriptCollection)
virtual voidRemoveScriptCacheEntry(const FString & FilePath)
virtual voidClearScriptCache()
Removes all cached scripts from memory.
virtual~FCohtmlScriptProvider() =default
Name
TMap< FString, FCohtmlCompiledScriptDataPtr >CachedScripts

Public Functions inherited from ICohtmlScriptProvider

Name
virtual~ICohtmlScriptProvider() =default
virtual FCohtmlCompiledScriptDataPtr GetScriptCacheEntry(
const FString & FilePath
) override

Parameters:

  • FilePath - A relative or absolute path to a given JavaScript file. Relative path should be with respect to the working directory. Will return a script from the internal TMap storage if such exists, or nullptr.

Reimplements: ICohtmlScriptProvider::GetScriptCacheEntry

virtual void AddScriptCacheEntry(
const FString & FilePath,
const CohtmlCompiledScriptData & Data
)

Parameters:

  • FilePath - A relative or absolute path to a given JavaScript file. Relative path should be with respect to the working directory. The path needs to serve as a unique id for the data provided, so it can be retrieved later.
virtual TMap< FString, FCohtmlCompiledScriptDataPtr > & ModifyCachedScripts()

Returns a reference to all currently cached compiled scripts. This is useful for saving them to disk, packaging them, or modifying them after the pre-loading process has finished.

virtual void SetCachedScripts(
TMap< FString, FCohtmlCompiledScriptDataPtr > && ScriptCollection
)
virtual void RemoveScriptCacheEntry(
const FString & FilePath
)

Parameters:

  • FilePath - A relative or absolute path to a given JavaScript file. Relative path should be with respect to the working directory. Removes a single cached script from memory.
virtual void ClearScriptCache()

Removes all cached scripts from memory.

virtual ~FCohtmlScriptProvider() =default
TMap< FString, FCohtmlCompiledScriptDataPtr > CachedScripts;