An interface for all sorts of sequences.
More...
#include <Iterable.h>
|
int32 | Count = 0 |
| The logical (un-buffered) number of slots in the belt that are actually candidates for being iterated once the iterable is locked.
|
|
std::atomic< int32 > | IterableCount {-1} |
| A number of currently iterable slots, excluding those, that were added before the unlocking.
|
|
|
template<typename SubjectHandleT > |
struct | TChunkIt |
|
template<typename ChunkItT , typename BeltItT , EParadigm Paradigm> |
struct | TChain |
|
An interface for all sorts of sequences.
◆ anonymous enum
Enumerator |
---|
InvalidSlotIndex | Invalid iterable slot index.
|
◆ DequeueFromRemoved() [1/2]
int32 IIterable::DequeueFromRemoved |
( |
| ) |
const |
|
inlineprotected |
Dequeue a slot from being removed.
◆ DequeueFromRemoved() [2/2]
bool IIterable::DequeueFromRemoved |
( |
int32 & |
OutSlotIndex | ) |
const |
|
inlineprotected |
Dequeue a slot from being removed.
Reference version.
- Parameters
-
OutSlotIndex | The index of the slot to queue for the removal. |
- Returns
- Was the dequeueing operation successful or the queue is empty.
◆ DoUnlock()
Unlock the iterable, applying the pending changes.
Must be implemented in the descendants.
The procedure is guaranteed to be executed under a locked critical section for this chunk.
- Parameters
-
bWasSolid | Should the iterable be unlocked from a solid state. |
- Returns
- The status of the operation.
Reimplemented in UBelt, and UChunk.
◆ EnqueueForRemoval()
void IIterable::EnqueueForRemoval |
( |
const int32 |
SlotIndex | ) |
const |
|
inlineprotected |
Enqueue a slot for removal.
- Parameters
-
SlotIndex | The index of the slot to queue for the removal. |
◆ GetOwner()
Get the owning mechanism of the iterable.
◆ HasQueuedForRemoval()
bool IIterable::HasQueuedForRemoval |
( |
| ) |
const |
|
inline |
Check if there are any slots marked for removal within the iterable.
The actual removal is delayed until the iterable becomes fully unlocked (stops being iterated).
◆ IsLiquidLocked()
bool IIterable::IsLiquidLocked |
( |
| ) |
const |
|
inline |
Check if the iterable is currently locked in a liquid manner.
- Returns
- The state of examination.
◆ IsLocked()
bool IIterable::IsLocked |
( |
| ) |
const |
|
inline |
Check if the sequence is currently locked.
The sequence is locked if its locks count is non-zero.
- Returns
- The current locking state.
◆ IsSolid()
bool IIterable::IsSolid |
( |
| ) |
const |
|
inline |
Check if the iterable is currently solid.
Being solid means being protected from any structural changes.
The iterable is solid if it's residing within a currently solid mechanism.
- Returns
- The state of examination.
◆ IsSolidLocked()
bool IIterable::IsSolidLocked |
( |
| ) |
const |
|
inline |
Check if the iterable is currently locked in a solid manner.
- Returns
- The state of examination.
◆ IterableNum()
int32 IIterable::IterableNum |
( |
| ) |
const |
|
inline |
Get the current number of elements valid for iterating.
- Note
- This number includes the stale (to be skipped) slots also.
◆ Lock()
Lock the iterable, preparing it for the iterating process.
- Template Parameters
-
bInSolid | Should the iterable be locked in a solid manner. |
- Returns
- The status of the operation.
◆ LockLiquid()
Lock the iterable in a liquid manner.
◆ LockSolid()
Lock the iterable in a solid manner.
◆ Matches()
virtual bool IIterable::Matches |
( |
const FFilter & |
InFilter | ) |
const |
|
inlinevirtual |
Check whether the sequence matches a filter.
- Parameters
-
InFilter | A filter to match. |
- Returns
- The state of matching.
Reimplemented in UBelt, and UChunk.
◆ Num()
int32 IIterable::Num |
( |
| ) |
const |
|
inline |
Get the total number of slots currently in the iterable.
- Note
- Returns the active iterable slots number when the iterable is locked, which also includes the stale (to be skipped) slots.
- Returns
- The current number of slots.
◆ Unlock()
Unlock the iterable, applying the pending changes.
- Template Parameters
-
bInSolid | Should the iterable be unlocked from a solid state. |
- Returns
- The status of the operation.
◆ TChain
template<typename ChunkItT , typename BeltItT ,
EParadigm Paradigm>
◆ TChunkIt
template<typename SubjectHandleT >
◆ Count
int32 IIterable::Count = 0 |
|
protected |
The logical (un-buffered) number of slots in the belt that are actually candidates for being iterated once the iterable is locked.
◆ IterableCount
std::atomic<int32> IIterable::IterableCount {-1} |
|
mutableprotected |
A number of currently iterable slots, excluding those, that were added before the unlocking.
This value is available and is valid only during the locked iterating. Otherwise, it should be -1.
The documentation for this class was generated from the following files: