Loading...
Searching...
No Matches
SCR_ResourceContainerQueue Interface Reference
Inheritance diagram for SCR_ResourceContainerQueue:
SCR_ResourceContainerQueueBase SCR_ResourceConsumerContainerQueue SCR_ResourceEncapsulatorContainerQueue SCR_ResourceGeneratorContainerQueue

Public Member Functions

int GetStorageTypeCount (EResourceContainerStorageType storageType)
 
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.
 
void CopyContainers (inout notnull set< SCR_ResourceContainer > containers)
 Copies the registered resource containers into a set of weak references of resource containers.
 
void CopyContainers (inout notnull array< SCR_ResourceContainer > containers)
 Copies the registered resource containers into an array of weak references of resource containers.
 
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 FindContainer (notnull SCR_ResourceContainer container)
 Finds the position of a specified container in the queue and returns said position.
 
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.
 
void DebugDraw ()
 
void SCR_ResourceContainerQueueBase ()
 Constructor.
 
void ~SCR_ResourceContainerQueueBase ()
 Destructor.
 

Protected Member Functions

int GetStoragePolicyCount ()
 

Protected Attributes

SCR_ResourceInteractor m_Interactor
 The interactor that owns the queue.
 
ref array< ref SCR_ResourceStoragePolicyBasem_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.Clear ( )

Clears the queue.

Implements SCR_ResourceContainerQueueBase.

◆ GetStoragePolicyCount()

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

◆ GetStorageTypeCount()

int SCR_ResourceContainerQueue.GetStorageTypeCount ( EResourceContainerStorageType storageType)
Parameters
storageTypeThe container storage type to return number of containers of.
Returns
Returns the number of containers of a specified storageType.

◆ Initialize()

override void SCR_ResourceContainerQueue.Initialize ( notnull SCR_ResourceInteractor interactor)

◆ PerformSorting()

override void SCR_ResourceContainerQueue.PerformSorting ( )

◆ PopContainerAt()

override SCR_ResourceContainer SCR_ResourceContainerQueue.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.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.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.

Implemented in SCR_ResourceEncapsulatorContainerQueue.

◆ UpdateContainerMaxResourceValue()

override float SCR_ResourceContainerQueue.UpdateContainerMaxResourceValue ( float currentValue,
float previousValue )

◆ UpdateContainerResourceValue()

override float SCR_ResourceContainerQueue.UpdateContainerResourceValue ( float currentValue,
float previousValue )

Member Data Documentation

◆ m_Interactor

SCR_ResourceInteractor SCR_ResourceContainerQueue.m_Interactor
protected

The interactor that owns the queue.

◆ m_StoragePolicies

ref array<ref SCR_ResourceStoragePolicyBase> SCR_ResourceContainerQueue.m_StoragePolicies
protected

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