Projekt for SPIE - Avatar for safety briefing / managment event
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

46 lines
853 B

// Copyright Low Entry. Apache License, Version 2.0.
#include "LowEntryExecutionQueue.h"
ULowEntryExecutionQueue::ULowEntryExecutionQueue(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) {}
ULowEntryExecutionQueue* ULowEntryExecutionQueue::Create()
{
return NewObject<ULowEntryExecutionQueue>();
}
ULowEntryExecutionQueue* ULowEntryExecutionQueue::Create(const int32 Count, const bool Next)
{
ULowEntryExecutionQueue* Instance = NewObject<ULowEntryExecutionQueue>();
Instance->Count = Count;
Instance->Next = Next;
if (Count > 0)
{
Instance->AddToRoot();
}
return Instance;
}
void ULowEntryExecutionQueue::IncreaseCount()
{
Count++;
if (Count == 1)
{
AddToRoot();
}
}
void ULowEntryExecutionQueue::DecreaseCount()
{
Count--;
if (Count == 0)
{
RemoveFromRoot();
}
if (Count < 0)
{
Count = 0;
}
}