Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::mt::ParallelCallbackRecord Struct Reference

Internal storage record for a shared parallel callback. More...

#include <jobmanager.h>

+ Inheritance diagram for gaia::mt::ParallelCallbackRecord:

Public Member Functions

 ParallelCallbackRecord ()=default
 Creates an empty callback record.
 
 ~ParallelCallbackRecord ()=default
 Destroys the callback record.
 
 ParallelCallbackRecord (const ParallelCallbackRecord &)=delete
 
ParallelCallbackRecordoperator= (const ParallelCallbackRecord &)=delete
 
 ParallelCallbackRecord (ParallelCallbackRecord &&other) noexcept
 
ParallelCallbackRecordoperator= (ParallelCallbackRecord &&other) noexcept
 
- Public Member Functions inherited from gaia::cnt::ilist_item
 ilist_item (uint32_t index, uint32_t generation)
 
 ilist_item (const ilist_item &other)
 
ilist_itemoperator= (const ilist_item &other)
 
 ilist_item (ilist_item &&other)
 
ilist_itemoperator= (ilist_item &&other)
 

Static Public Member Functions

static GAIA_NODISCARD ParallelCallbackRecord create (uint32_t index, uint32_t generation, void *pCtx)
 Creates a new callback record for the intrusive storage.
 
static GAIA_NODISCARD ParallelCallbackHandle handle (const ParallelCallbackRecord &record)
 Returns the public handle associated with record.
 

Public Attributes

JobArgsFunc callback
 
std::atomic_uint32_t refs = 0
 
- Public Attributes inherited from gaia::cnt::ilist_item
uint32_t idx
 Allocated items: Index in the list. Deleted items: Index of the next deleted item in the list.
 
ItemData data
 Item data.
 

Detailed Description

Internal storage record for a shared parallel callback.

Member Function Documentation

◆ create()

static GAIA_NODISCARD ParallelCallbackRecord gaia::mt::ParallelCallbackRecord::create ( uint32_t  index,
uint32_t  generation,
void *  pCtx 
)
inlinestatic

Creates a new callback record for the intrusive storage.

Parameters
indexStable slot index in the callback pool.
generationGeneration assigned to the slot.
pCtxAllocation context carrying the callback and reference count.
Returns
Initialized callback record.

◆ handle()

static GAIA_NODISCARD ParallelCallbackHandle gaia::mt::ParallelCallbackRecord::handle ( const ParallelCallbackRecord record)
inlinestatic

Returns the public handle associated with record.

Parameters
recordCallback record to inspect.
Returns
Handle referencing record.

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