Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResourceContainerQueueBase Class Reference

Protected Member Functions

float GetAggregatedResourceValue ()
float GetAggregatedMaxResourceValue ()
SCR_ResourceContainer GetFirstContainer ()
void CopyContainers (inout notnull set< SCR_ResourceContainer > containers)
void CopyContainers (inout notnull array< SCR_ResourceContainer > containers)
SCR_ResourceContainer GetContainerAt (int index)
int GetContainerCount ()
int RegisterContainer (notnull SCR_ResourceContainer container)
int FindContainer (notnull SCR_ResourceContainer container)
SCR_ResourceContainer PopFirstContainer ()
SCR_ResourceContainer PopContainerAt (int index)
void SetAggregatedResourceValue (float value)
void SetAggregatedMaxResourceValue (float value)
void IncreaseAggregatedResourceValue (float increment)
void DecreaseAggregatedResourceValue (float decrement)
void IncreaseAggregatedMaxResourceValue (float increment)
void DecreaseAggregatedMaxResourceValue (float decrement)
array< SCR_ResourceContainerClear ()
void PerformSorting ()
void Initialize (notnull SCR_ResourceInteractor interactor)
void DebugDraw ()
float UpdateContainerResourceValue (float currentValue, float previousValue)
float UpdateContainerMaxResourceValue (float currentValue, float previousValue)
void SCR_ResourceContainerQueueBase ()
 Constructor.
void ~SCR_ResourceContainerQueueBase ()
 Destructor.

Protected Attributes

SCR_ResourceComponent m_ResourceComponent
ref array< SCR_ResourceContainerm_aRegisteredContainers = new array<SCR_ResourceContainer>()
float m_fAggregatedResourceValue
float m_fAggregatedMaxResourceValue

Detailed Description

Definition at line 2 of file SCR_ResourceContainerQueue.c.

Constructor & Destructor Documentation

◆ SCR_ResourceContainerQueueBase()

void SCR_ResourceContainerQueueBase::SCR_ResourceContainerQueueBase ( )
inlineprotected

Constructor.

Definition at line 589 of file SCR_ResourceContainerQueue.c.

◆ ~SCR_ResourceContainerQueueBase()

void SCR_ResourceContainerQueueBase::~SCR_ResourceContainerQueueBase ( )
inlineprotected

Destructor.

Definition at line 596 of file SCR_ResourceContainerQueue.c.

Member Function Documentation

◆ Clear()

array< SCR_ResourceContainer > SCR_ResourceContainerQueueBase::Clear ( )
inlineprotected

Clears and resets the queue.

TODO: Optimize this.

Definition at line 512 of file SCR_ResourceContainerQueue.c.

◆ CopyContainers() [1/2]

void SCR_ResourceContainerQueueBase::CopyContainers ( inout notnull array< SCR_ResourceContainer > containers)
inlineprotected

Copies the registered resource containers into an array of weak references of resource containers.

Parameters
[in,out]containersThe array to copy into.

Definition at line 117 of file SCR_ResourceContainerQueue.c.

◆ CopyContainers() [2/2]

void SCR_ResourceContainerQueueBase::CopyContainers ( inout notnull set< SCR_ResourceContainer > containers)
inlineprotected

Copies the registered resource containers into a set of weak references of resource containers.

Parameters
[in,out]containersThe set to copy into.

Definition at line 105 of file SCR_ResourceContainerQueue.c.

◆ DebugDraw()

void SCR_ResourceContainerQueueBase::DebugDraw ( )
inlineprotected

Definition at line 570 of file SCR_ResourceContainerQueue.c.

◆ DecreaseAggregatedMaxResourceValue()

void SCR_ResourceContainerQueueBase::DecreaseAggregatedMaxResourceValue ( float decrement)
inlineprotected

Decreases the current maximum value of the aggregated resources with a specific decrement.

Warning
Use with care, decreasing to an arbitrary decrement with this could destabilize the entire queue maximum aggregated resource value processing.
Parameters
decrementThe desired value to be decremented on the current maximum value of the aggregated resources.

Definition at line 492 of file SCR_ResourceContainerQueue.c.

◆ DecreaseAggregatedResourceValue()

void SCR_ResourceContainerQueueBase::DecreaseAggregatedResourceValue ( float decrement)
inlineprotected

Decreases the current value of the aggregated resources with a specific decrement.

Warning
Use with care, decreasing to an arbitrary decrement with this could destabilize the entire queue aggregated resource value processing.
Parameters
decrementThe desired value to be decremented on the current value of the aggregated resources.

Definition at line 441 of file SCR_ResourceContainerQueue.c.

◆ FindContainer()

int SCR_ResourceContainerQueueBase::FindContainer ( notnull SCR_ResourceContainer container)
inlineprotected

Finds the position of a specified container in the queue and returns said position.

Parameters
containerThe container to ne found in the queue.
Returns
The position of the container in the queue or a representation of a invalid index in the queue in case of failure.

Definition at line 233 of file SCR_ResourceContainerQueue.c.

◆ GetAggregatedMaxResourceValue()

float SCR_ResourceContainerQueueBase::GetAggregatedMaxResourceValue ( )
inlineprotected

Returns the current maximum value of the aggregated resources pre-calculated by adding the maximum resource values of the containers registered into the container queue.

Returns
The current maximum value of aggregated resources.

Definition at line 43 of file SCR_ResourceContainerQueue.c.

◆ GetAggregatedResourceValue()

float SCR_ResourceContainerQueueBase::GetAggregatedResourceValue ( )
inlineprotected

Returns the current value of the aggregated resources pre-calculated by adding the current resource values of the containers registered into the container queue.

Returns
The current value of aggregated resources.

Definition at line 20 of file SCR_ResourceContainerQueue.c.

◆ GetContainerAt()

SCR_ResourceContainer SCR_ResourceContainerQueueBase::GetContainerAt ( int index)
inlineprotected

Returns a resource container located at the provided index/position in the queue.

Warning
Note that this method should only be called if and only if the queue has an element at the desired index.
Parameters
indexIndex/position of the desired container in the queue,
Returns
A resource container located at the provided index/position in the queue.

Definition at line 131 of file SCR_ResourceContainerQueue.c.

◆ GetContainerCount()

int SCR_ResourceContainerQueueBase::GetContainerCount ( )
inlineprotected

Returns the number of registered containers in the queue.

Returns
The number of registered containers in the queue.

Definition at line 176 of file SCR_ResourceContainerQueue.c.

◆ GetFirstContainer()

SCR_ResourceContainer SCR_ResourceContainerQueueBase::GetFirstContainer ( )
inlineprotected

Returns the first resource container in the queue.

Warning
Note that it is the first one in the queue in terms of order/priority and not the first container to be registered so do not cache this value as a pointer to the first container. Note that this method should only be called if and only if the queue is not empty.
Returns
The first resource container in the queue.

Definition at line 69 of file SCR_ResourceContainerQueue.c.

◆ IncreaseAggregatedMaxResourceValue()

void SCR_ResourceContainerQueueBase::IncreaseAggregatedMaxResourceValue ( float increment)
inlineprotected

Increases the current maximum value of the aggregated resources with a specific increment.

Warning
Use with care, increasing to an arbitrary increment with this could destabilize the entire queue maximum aggregated resource value processing.
Parameters
incrementThe desired value to be incremented on the current maximum value of the aggregated resources.

Definition at line 467 of file SCR_ResourceContainerQueue.c.

◆ IncreaseAggregatedResourceValue()

void SCR_ResourceContainerQueueBase::IncreaseAggregatedResourceValue ( float increment)
inlineprotected

Increases the current value of the aggregated resources with a specific increment.

Warning
Use with care, increasing to an arbitrary increment with this could destabilize the entire queue aggregated resource value processing.
Parameters
incrementThe desired value to be incremented on the current value of the aggregated resources.

Definition at line 416 of file SCR_ResourceContainerQueue.c.

◆ Initialize()

void SCR_ResourceContainerQueueBase::Initialize ( notnull SCR_ResourceInteractor interactor)
inlineprotected

Definition at line 564 of file SCR_ResourceContainerQueue.c.

◆ PerformSorting()

void SCR_ResourceContainerQueueBase::PerformSorting ( )
protected

◆ PopContainerAt()

SCR_ResourceContainer SCR_ResourceContainerQueueBase::PopContainerAt ( int index)
inlineprotected

Removes from the queue the container at the specified index/position and returns it.

Warning
Note that this method should only be called if and only if the queue has an element at the desired index.
Parameters
indexIndex/position of the desired container in the queue,
Returns
A resource container that was located at the provided index/position in the queue.

Definition at line 296 of file SCR_ResourceContainerQueue.c.

◆ PopFirstContainer()

SCR_ResourceContainer SCR_ResourceContainerQueueBase::PopFirstContainer ( )
inlineprotected

Removes from the queue the first container and returns it.

Warning
Note that this method should only be called if and only if the queue is not empty.
Returns
The container that was at the first position in the queue.

Definition at line 256 of file SCR_ResourceContainerQueue.c.

◆ RegisterContainer()

int SCR_ResourceContainerQueueBase::RegisterContainer ( notnull SCR_ResourceContainer container)
inlineprotected

Registers a container into the queue.

Warning
An existence check is not performed so the method should not be called if the container is already registered in the queue.
Parameters
containerThe container to be registered into the queue.
Returns
The position of the container in the queue.

Definition at line 201 of file SCR_ResourceContainerQueue.c.

◆ SetAggregatedMaxResourceValue()

void SCR_ResourceContainerQueueBase::SetAggregatedMaxResourceValue ( float value)
inlineprotected

Assigns the current maximum value of the aggregated resources to a specific value.

Warning
Use with care, assigning an arbitrary value with this could destabilize the entire queue maximum aggregated resource value processing.
Parameters
valueThe desired value to be assigned for the current maximum value of the aggregated resources.

Definition at line 384 of file SCR_ResourceContainerQueue.c.

◆ SetAggregatedResourceValue()

void SCR_ResourceContainerQueueBase::SetAggregatedResourceValue ( float value)
inlineprotected

Assigns the current value of the aggregated resources to a specific value.

Warning
Use with care, assigning an arbitrary value with this could destabilize the entire queue aggregated resource value processing.
Parameters
valueThe desired value to be assigned for the current value of the aggregated resources.

Definition at line 352 of file SCR_ResourceContainerQueue.c.

◆ UpdateContainerMaxResourceValue()

float SCR_ResourceContainerQueueBase::UpdateContainerMaxResourceValue ( float currentValue,
float previousValue )
inlineprotected

Definition at line 582 of file SCR_ResourceContainerQueue.c.

◆ UpdateContainerResourceValue()

float SCR_ResourceContainerQueueBase::UpdateContainerResourceValue ( float currentValue,
float previousValue )
inlineprotected

Definition at line 576 of file SCR_ResourceContainerQueue.c.

Member Data Documentation

◆ m_aRegisteredContainers

ref array<SCR_ResourceContainer> SCR_ResourceContainerQueueBase::m_aRegisteredContainers = new array<SCR_ResourceContainer>()
protected

Definition at line 9 of file SCR_ResourceContainerQueue.c.

◆ m_fAggregatedMaxResourceValue

float SCR_ResourceContainerQueueBase::m_fAggregatedMaxResourceValue
protected

Definition at line 11 of file SCR_ResourceContainerQueue.c.

◆ m_fAggregatedResourceValue

float SCR_ResourceContainerQueueBase::m_fAggregatedResourceValue
protected

Definition at line 10 of file SCR_ResourceContainerQueue.c.

◆ m_ResourceComponent

SCR_ResourceComponent SCR_ResourceContainerQueueBase::m_ResourceComponent
protected

Definition at line 8 of file SCR_ResourceContainerQueue.c.


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