Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SCR_ResourceContainerQueue< Class ResourceInteractorType > Interface Template Reference
Inheritance diagram for SCR_ResourceContainerQueue< Class ResourceInteractorType >:
[legend]

Public Member Functions

override int RegisterContainer (notnull SCR_ResourceContainer container)
 Registers a container into the queue.
 
override SCR_ResourceContainer PopFirstContainer ()
 Removes from the queue the first container and returns it.
 
override SCR_ResourceContainer PopContainerAt (int index)
 Removes from the queue the container at the specified index/position and returns it.
 
override void PerformSorting ()
 
override array< SCR_ResourceContainerClear ()
 Clears the queue.
 
override void Initialize (notnull SCR_ResourceInteractor interactor)
 
override float UpdateContainerResourceValue (float currentValue, float previousValue)
 
override float UpdateContainerMaxResourceValue (float currentValue, float previousValue)
 
- Public Member Functions inherited from SCR_ResourceContainerQueueBase
float GetAggregatedResourceValue ()
 Returns the current value of the aggregated resources pre-calculated by adding the current resource values of the containers registered into the container queue.
 
float GetAggregatedMaxResourceValue ()
 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.
 
SCR_ResourceContainer GetFirstContainer ()
 Returns the first resource container in the queue.
 
SCR_ResourceContainer GetContainerAt (int index)
 Returns a resource container located at the provided index/position in the queue.
 
int GetContainerCount ()
 Returns the number of registered containers in the queue.
 
int RegisterContainer (notnull SCR_ResourceContainer container)
 Registers a container into the queue.
 
int FindContainer (notnull SCR_ResourceContainer container)
 Finds the position of a specified container in the queue and returns said position.
 
SCR_ResourceContainer PopFirstContainer ()
 Removes from the queue the first container and returns it.
 
SCR_ResourceContainer PopContainerAt (int index)
 Removes from the queue the container at the specified index/position and returns it.
 
void SetAggregatedResourceValue (float value)
 Assigns the current value of the aggregated resources to a specific value.
 
void SetAggregatedMaxResourceValue (float value)
 Assigns the current maximum value of the aggregated resources to a specific value.
 
void IncreaseAggregatedResourceValue (float increment)
 Increases the current value of the aggregated resources with a specific increment.
 
void DecreaseAggregatedResourceValue (float decrement)
 Decreases the current value of the aggregated resources with a specific decrement.
 
void IncreaseAggregatedMaxResourceValue (float increment)
 Increases the current maximum value of the aggregated resources with a specific increment.
 
void DecreaseAggregatedMaxResourceValue (float decrement)
 Decreases the current maximum value of the aggregated resources with a specific decrement.
 
array< SCR_ResourceContainerClear ()
 Clears and resets the queue.
 
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 Member Functions

int GetStoragePolicyCount ()
 

Protected Attributes

ResourceInteractorType m_Interactor
 The interactor that owns the queue.
 
ref array< ref SCR_ResourceStoragePolicyBase< ResourceInteractorType > > m_StoragePolicies
 
- Protected Attributes inherited from SCR_ResourceContainerQueueBase
SCR_ResourceComponent m_ResourceComponent
 
ref array< SCR_ResourceContainerm_aRegisteredContainers = new array<SCR_ResourceContainer>()
 
float m_fAggregatedResourceValue
 
float m_fAggregatedMaxResourceValue
 

Additional Inherited Members

- Static Public Attributes inherited from SCR_ResourceContainerQueueBase
static const int FIRST_CONTAINER_INDEX = 0
 
static const int INVALID_CONTAINER_INDEX = -1
 
static const int INVALID_CONTAINER_COUNT = -1
 

Member Function Documentation

◆ Clear()

override array< SCR_ResourceContainer > SCR_ResourceContainerQueue< Class ResourceInteractorType >.Clear ( )

Clears the queue.

Implements SCR_ResourceContainerQueueBase.

◆ GetStoragePolicyCount()

int SCR_ResourceContainerQueue< Class ResourceInteractorType >.GetStoragePolicyCount ( )
protected
Returns
Returns the number of storage policies that are registered.

◆ Initialize()

override void SCR_ResourceContainerQueue< Class ResourceInteractorType >.Initialize ( notnull SCR_ResourceInteractor  interactor)

◆ PerformSorting()

override void SCR_ResourceContainerQueue< Class ResourceInteractorType >.PerformSorting ( )

◆ PopContainerAt()

override SCR_ResourceContainer SCR_ResourceContainerQueue< Class ResourceInteractorType >.PopContainerAt ( int  index)

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.

Implements SCR_ResourceContainerQueueBase.

◆ PopFirstContainer()

override SCR_ResourceContainer SCR_ResourceContainerQueue< Class ResourceInteractorType >.PopFirstContainer ( )

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.

Implements SCR_ResourceContainerQueueBase.

◆ RegisterContainer()

override int SCR_ResourceContainerQueue< Class ResourceInteractorType >.RegisterContainer ( notnull SCR_ResourceContainer  container)

Registers a container into the queue.

Parameters
containerThe container to be registered into the queue.
Returns
Returns the position of the container in the queue.

Implements SCR_ResourceContainerQueueBase.

◆ UpdateContainerMaxResourceValue()

override float SCR_ResourceContainerQueue< Class ResourceInteractorType >.UpdateContainerMaxResourceValue ( float  currentValue,
float  previousValue 
)

◆ UpdateContainerResourceValue()

override float SCR_ResourceContainerQueue< Class ResourceInteractorType >.UpdateContainerResourceValue ( float  currentValue,
float  previousValue 
)

Member Data Documentation

◆ m_Interactor

ResourceInteractorType SCR_ResourceContainerQueue< Class ResourceInteractorType >.m_Interactor
protected

The interactor that owns the queue.

◆ m_StoragePolicies

ref array<ref SCR_ResourceStoragePolicyBase<ResourceInteractorType> > SCR_ResourceContainerQueue< Class ResourceInteractorType >.m_StoragePolicies
protected

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