A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UApexReportingManager Class ReferenceBlueprintable

Manager for automatic Apex session reporting using UApexAPI. More...

#include <ApexReportingManager.h>

Inheritance diagram for UApexReportingManager:
[legend]

Public Member Functions

 UApexReportingManager ()
 
void CompleteApexSession (bool Completed, bool Success)
 This function is responsible for completing the session.
 
 DECLARE_EVENT_HANDLER (UEndOfStoryReached)
 
 DECLARE_EVENT_HANDLER (UInitializationEvent)
 
 DECLARE_EVENT_HANDLER (UNewStepLoadedEvent)
 
 DECLARE_EVENT_HANDLER (UNewStoryLoadedEvent)
 
 DECLARE_EVENT_HANDLER (UStepCompletedEvent)
 
APlayerControllerGetPrivateOwner () const
 
FXAPIStatement GetStatementData ()
 This function can be implemented in blueprint to send custom FXAPIStatement.
 
void HandleEvent (UBaseEvent *Event)
 
void OnInitialized ()
 UFUNCTION(BlueprintImplementableEvent)
 
template<typename TEventType , typename... TInitializeArgs>
void SendEvent (TInitializeArgs... Arguments)
 
void SetPrivateOwner (APlayerController *Owner)
 

Public Attributes

int32 ScoreFactor = 1
 The value by which the score reported in 'CompleteApexSession' will be multiplied.
 
bool UseDefaultSessionEnd = true
 Indicates whether the default session end should be used on UEndOfStoryReached.
 
bool UseDefaultSessionStart = true
 Indicates whether the default session start should be used on UInitializationEvent.
 
bool UseReportingEachStep = true
 Indicates whether reporting should occur after completing each step.
 

Protected Member Functions

int32 GetAmountOfCompletedSteps (const TArray< FPassedExperiences > PassedExperiences) const
 
int32 GetApexSessionDuration ()
 Retrieves the duration of the Apex session.
 
void HandleEvent_Impl (class UBaseEvent *Event)
 

Protected Attributes

FDateTime ApexStartTime
 
UApexAPIApexSubSystem
 UPROPERTY(BlueprintReadOnly)
 
FText CurrentStep
 UPROPERTY(BlueprintReadOnly)
 
THandlers Handlers
 
TArray< int32 > LoadedStoryIndexesHistory
 Array storing the history of loaded story indexes.
 

Private Types

using THandler = TFunction<void(UBaseEvent*)>
 
using THandlerKey = UClass*
 
using THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
 

Private Member Functions

 GENERATED_BODY ()
 

Private Attributes

APlayerControllerPrivateOwner
 UPROPERTY()
 

Detailed Description

Manager for automatic Apex session reporting using UApexAPI.

UCLASS(Blueprintable, meta=(ShowWorldContextPin))

Definition at line 18 of file ApexReportingManager.h.

Member Typedef Documentation

◆ THandler

using UBaseManager::THandler = TFunction<void(UBaseEvent*)>
privateinherited

Definition at line 56 of file BaseManager.h.

◆ THandlerKey

using UBaseManager::THandlerKey = UClass*
privateinherited

Definition at line 55 of file BaseManager.h.

◆ THandlers

using UBaseManager::THandlers = std::unordered_map<THandlerKey, THandler, THandlerHash, THandlerComp>
privateinherited

Definition at line 74 of file BaseManager.h.

Constructor & Destructor Documentation

◆ UApexReportingManager()

UApexReportingManager::UApexReportingManager ( )

Definition at line 13 of file ApexReportingManager.cpp.

Member Function Documentation

◆ CompleteApexSession()

void UApexReportingManager::CompleteApexSession ( bool Completed,
bool Success )
BlueprintCallable

This function is responsible for completing the session.

Parameters
CompletedShows if session was finished.
SuccessShows if user finished session successfully.

UFUNCTION(BlueprintCallable)

Definition at line 22 of file ApexReportingManager.cpp.

Here is the call graph for this function:

◆ DECLARE_EVENT_HANDLER() [1/5]

UApexReportingManager::DECLARE_EVENT_HANDLER ( UEndOfStoryReached )

◆ DECLARE_EVENT_HANDLER() [2/5]

UApexReportingManager::DECLARE_EVENT_HANDLER ( UInitializationEvent )

◆ DECLARE_EVENT_HANDLER() [3/5]

UApexReportingManager::DECLARE_EVENT_HANDLER ( UNewStepLoadedEvent )

◆ DECLARE_EVENT_HANDLER() [4/5]

UApexReportingManager::DECLARE_EVENT_HANDLER ( UNewStoryLoadedEvent )

◆ DECLARE_EVENT_HANDLER() [5/5]

UApexReportingManager::DECLARE_EVENT_HANDLER ( UStepCompletedEvent )

◆ GENERATED_BODY()

UApexReportingManager::GENERATED_BODY ( )
private

◆ GetAmountOfCompletedSteps()

int32 UApexReportingManager::GetAmountOfCompletedSteps ( const TArray< FPassedExperiences > PassedExperiences) const
protected

Definition at line 67 of file ApexReportingManager.cpp.

Here is the caller graph for this function:

◆ GetApexSessionDuration()

int32 UApexReportingManager::GetApexSessionDuration ( )
protected

Retrieves the duration of the Apex session.

Returns
The duration of the Apex session in seconds.

Definition at line 83 of file ApexReportingManager.cpp.

Here is the caller graph for this function:

◆ GetPrivateOwner()

APlayerController * UBaseManager::GetPrivateOwner ( ) const
inlineinherited

Definition at line 47 of file BaseManager.h.

Here is the caller graph for this function:

◆ GetStatementData()

FXAPIStatement UApexReportingManager::GetStatementData ( )
BlueprintNativeEvent

This function can be implemented in blueprint to send custom FXAPIStatement.

UFUNCTION(BlueprintNativeEvent)

◆ HandleEvent()

void UBaseManager::HandleEvent ( UBaseEvent * Event)
inherited

Definition at line 11 of file BaseManager.cpp.

◆ HandleEvent_Impl()

void UBaseManager::HandleEvent_Impl ( class UBaseEvent * Event)
protectedinherited

Definition at line 24 of file BaseManager.cpp.

◆ OnInitialized()

void UApexReportingManager::OnInitialized ( )
BlueprintImplementableEvent

UFUNCTION(BlueprintImplementableEvent)

◆ SendEvent()

template<typename TEventType , typename... TInitializeArgs>
void UBaseManager::SendEvent ( TInitializeArgs... Arguments)
inlineinherited

Definition at line 40 of file BaseManager.h.

◆ SetPrivateOwner()

void UBaseManager::SetPrivateOwner ( APlayerController * Owner)
inlineinherited

Definition at line 46 of file BaseManager.h.

Member Data Documentation

◆ ApexStartTime

FDateTime UApexReportingManager::ApexStartTime
protected

Definition at line 115 of file ApexReportingManager.h.

◆ ApexSubSystem

UApexAPI* UApexReportingManager::ApexSubSystem
protectedBlueprintReadOnly

UPROPERTY(BlueprintReadOnly)

Definition at line 108 of file ApexReportingManager.h.

◆ CurrentStep

FText UApexReportingManager::CurrentStep
protectedBlueprintReadOnly

UPROPERTY(BlueprintReadOnly)

Definition at line 113 of file ApexReportingManager.h.

◆ Handlers

THandlers UBaseManager::Handlers
protectedinherited

Definition at line 77 of file BaseManager.h.

◆ LoadedStoryIndexesHistory

TArray<int32> UApexReportingManager::LoadedStoryIndexesHistory
protected

Array storing the history of loaded story indexes.

Definition at line 116 of file ApexReportingManager.h.

◆ PrivateOwner

APlayerController* UBaseManager::PrivateOwner
privateinherited

UPROPERTY()

Definition at line 53 of file BaseManager.h.

◆ ScoreFactor

int32 UApexReportingManager::ScoreFactor = 1
EditAnywhereBlueprintReadWrite

The value by which the score reported in 'CompleteApexSession' will be multiplied.

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Setup")

Definition at line 94 of file ApexReportingManager.h.

◆ UseDefaultSessionEnd

bool UApexReportingManager::UseDefaultSessionEnd = true
EditAnywhereBlueprintReadWrite

Indicates whether the default session end should be used on UEndOfStoryReached.

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Setup")

Definition at line 85 of file ApexReportingManager.h.

◆ UseDefaultSessionStart

bool UApexReportingManager::UseDefaultSessionStart = true
EditAnywhereBlueprintReadWrite

Indicates whether the default session start should be used on UInitializationEvent.

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Setup")

Definition at line 67 of file ApexReportingManager.h.

◆ UseReportingEachStep

bool UApexReportingManager::UseReportingEachStep = true
EditAnywhereBlueprintReadWrite

Indicates whether reporting should occur after completing each step.

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Setup")

Definition at line 76 of file ApexReportingManager.h.


The documentation for this class was generated from the following files: