Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FTrackedActivity Class Reference

#include <TrackedActivity.h>

+ Inheritance diagram for FTrackedActivity:
+ Collaboration diagram for FTrackedActivity:

Classes

struct  FInfo
 

Public Types

enum class  EType { Activity , Info , Debug }
 
enum class  EEvent : int32 { Added = 1 , Removed = 2 , Changed = 3 }
 
using ELight = ETrackedActivityLight
 

Public Member Functions

 FTrackedActivity (const TCHAR *Name, const TCHAR *Status=TEXT(""), ELight Light=ELight::None, EType Type=EType::Activity, int32 SortValue=100)
 
 ~FTrackedActivity ()
 
uint32 Push (const TCHAR *Status, bool bShowParent=false, ELight Light=ELight::Inherit)
 
void Pop ()
 
void Update (const TCHAR *Status, uint32 Index=~0u)
 
void Update (const TCHAR *Status, ELight Light, uint32 Index=~0u)
 
void Update (ELight Light, uint32 Index=~0u)
 
- Public Member Functions inherited from TSharedFromThis< FTrackedActivity >
TSharedRef< FTrackedActivity, Mode > AsShared ()
 
TSharedRef< FTrackedActivity const, Mode > AsShared () const
 
TWeakPtr< FTrackedActivity, Mode > AsWeak ()
 
TWeakPtr< FTrackedActivity const, Mode > AsWeak () const
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, Mode > const *InSharedPtr, OtherType *InObject) const
 
FORCEINLINE void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, Mode > const *InSharedRef, OtherType *InObject) const
 
FORCEINLINE bool DoesSharedInstanceExist () const
 

Static Public Member Functions

static FTrackedActivityGetEngineActivity ()
 
static FTrackedActivityGetIOActivity ()
 
static void TraverseActivities (const TFunction< void(const FInfo &Info)> &Func)
 
static void RegisterEventListener (TUniqueFunction< void(EEvent Event, const FInfo &Info)> &&Func, uint32 MaxDepth=~0u)
 

Private Member Functions

 FTrackedActivity (const FTrackedActivity &O)=delete
 
FTrackedActivityoperator= (const FTrackedActivity &O)=delete
 

Private Attributes

voidInternal
 

Additional Inherited Members

- Protected Member Functions inherited from TSharedFromThis< FTrackedActivity >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
FORCEINLINE TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< FTrackedActivity >
static FORCEINLINE TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static FORCEINLINE TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

Tracked Activity is used to be able to visualize on a semi-high level what is going on in the process. It is very useful when wanting to show the status of online, or if the runtime is waiting on loading something When new console is enabled tracked activities show at the bottom of the window under the log Tracked Activities can be created/updated/destroyed on multiple threads

Definition at line 28 of file TrackedActivity.h.

Member Typedef Documentation

◆ ELight

Member Enumeration Documentation

◆ EEvent

Enum used for Event listener to identify type of activity change

Enumerator
Added 
Removed 
Changed 

Definition at line 100 of file TrackedActivity.h.

◆ EType

Enum to specify status type of activity In the new console, 'Activity' will make sure tracked activity appears to the left of the window 'Info' appears to the right and use less width. Typically use 'Info' for things that are more static

Enumerator
Activity 
Info 
Debug 

Definition at line 36 of file TrackedActivity.h.

Constructor & Destructor Documentation

◆ FTrackedActivity() [1/2]

FTrackedActivity::FTrackedActivity ( const TCHAR * Name,
const TCHAR * Status = TEXT(""),
ELight Light = ELight::None,
EType Type = EType::Activity,
int32 SortValue = 100 )

Ctor

Parameters
NameName of tracked activity
StatusInitial status of tracked activity
Lightfor the activity. Will show as a dot in front of activity in console
TypeDecides where activity information show in console. Activity is to the left, Info to the right
SortValueDecides in what order within type the activity will show in console. Lower value means earlier

◆ ~FTrackedActivity()

FTrackedActivity::~FTrackedActivity ( )

Dtor

◆ FTrackedActivity() [2/2]

FTrackedActivity::FTrackedActivity ( const FTrackedActivity & O)
privatedelete

Member Function Documentation

◆ GetEngineActivity()

static FTrackedActivity & FTrackedActivity::GetEngineActivity ( )
static

Process Engine Activity. General status of the Engine. Used by Engine initialization etc. By default, status light will stay yellow until main threads hits Tick update, then it turns green.

◆ GetIOActivity()

static FTrackedActivity & FTrackedActivity::GetIOActivity ( )
static

I/O Activity.Shows current I / O operation.If plugin / game have their own I / O, scopes will need to be manually added

◆ operator=()

FTrackedActivity & FTrackedActivity::operator= ( const FTrackedActivity & O)
privatedelete

◆ Pop()

void FTrackedActivity::Pop ( )

◆ Push()

uint32 FTrackedActivity::Push ( const TCHAR * Status,
bool bShowParent = false,
ELight Light = ELight::Inherit )

Pushes new status on to tracked activity, will require a pop to get back to previous status ShowParent can be used to make sure Status of parent is visible in front of status of pushed scope.

◆ RegisterEventListener()

static void FTrackedActivity::RegisterEventListener ( TUniqueFunction< void(EEvent Event, const FInfo &Info)> && Func,
uint32 MaxDepth = ~0u )
static

Register listener that can track adds, removes and changes when they happen. Listener will be called from the same thread as the event happens, so make sure listener is threadsafe.

◆ TraverseActivities()

static void FTrackedActivity::TraverseActivities ( const TFunction< void(const FInfo &Info)> & Func)
static

Traverses all FTrackedActivities in the order they were added.

◆ Update() [1/3]

void FTrackedActivity::Update ( const TCHAR * Status,
ELight Light,
uint32 Index = ~0u )

◆ Update() [2/3]

void FTrackedActivity::Update ( const TCHAR * Status,
uint32 Index = ~0u )

Updates status. If Index is ~0u entry at top of stack will be updated (which is the one showing)

◆ Update() [3/3]

void FTrackedActivity::Update ( ELight Light,
uint32 Index = ~0u )

Member Data Documentation

◆ Internal

void* FTrackedActivity::Internal
private

Definition at line 117 of file TrackedActivity.h.


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