Cogs.Core
Public Member Functions | Public Attributes | List of all members
Cogs::Core::TaskId Struct Reference

Task id struct used to identify unique Task instances. More...

#include <TaskManager.h>

Public Member Functions

bool isValid () const
 Check if the task id is valid.
 
bool operator== (const TaskId &rhs) const
 

Public Attributes

uint32_t taskHandle = static_cast<uint32_t>(-1)
 Integer handle to the task in a TaskPool.
 
uint16_t generation = 0
 Generation counter used to separate generational instances.
 
TaskQueueId queueId = 0
 Id of the TaskQueue the Task belongs to.
 

Detailed Description

Task id struct used to identify unique Task instances.

Definition at line 19 of file TaskManager.h.

Member Function Documentation

◆ isValid()

bool Cogs::Core::TaskId::isValid ( ) const
inline

Check if the task id is valid.

Definition at line 29 of file TaskManager.h.

References taskHandle.

Referenced by Cogs::Core::TaskManager::destroy(), and Cogs::Core::TaskManager::wait().

◆ operator==()

bool Cogs::Core::TaskId::operator== ( const TaskId rhs) const
inline

Definition at line 31 of file TaskManager.h.

Member Data Documentation

◆ generation

uint16_t Cogs::Core::TaskId::generation = 0

Generation counter used to separate generational instances.

Definition at line 24 of file TaskManager.h.

Referenced by Cogs::Core::TaskQueue::create(), Cogs::Core::TaskQueue::createGroup(), Cogs::Core::TaskQueue::destroy(), and Cogs::Core::TaskQueue::wait().

◆ queueId

TaskQueueId Cogs::Core::TaskId::queueId = 0

◆ taskHandle

uint32_t Cogs::Core::TaskId::taskHandle = static_cast<uint32_t>(-1)

Integer handle to the task in a TaskPool.

Definition at line 22 of file TaskManager.h.

Referenced by Cogs::Core::TaskQueue::getTask(), and isValid().


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