class SchedulerTask

Represents a function to execute using the Scheduler.

Public

Constructors

SchedulerTask

SchedulerTask() = default

SchedulerTask

SchedulerTask(const SchedulerTask &other)

SchedulerTask

SchedulerTask(SchedulerTask &&other)

SchedulerTask

SchedulerTask(const Function<void ()> &workerFunction, const char *name, SchedulerTaskFlags flags = SchedulerTaskFlag::None, const String &extraInformation = StringUtility::kBlank)

SchedulerTask

SchedulerTask(Function<void ()> &&workerFunction, SchedulerTaskFlags flags = SchedulerTaskFlag::None)

Methods

GetFlags

SchedulerTaskFlags GetFlags() const

Returns the flags the task was created with.

GetName

const char *GetName() const

Returns the debug name of the task.

Operators

operator=

SchedulerTask &operator=(const SchedulerTask &other)

operator=

SchedulerTask &operator=(SchedulerTask &&other)

operator=

SchedulerTask &operator=(const Function<void ()> &workerFunction)

operator=

SchedulerTask operator=(Function<void ()> &&workerFunction)

operator bool

operator bool() const

Returns true if a valid function is assigned.

operator()

void operator()() const

Calls the task worker function.

Private

Fields

mName

const char * mName

mExtraInformation

String mExtraInformation

mWorkerFunction

Function<void ()> mWorkerFunction

mFlags

SchedulerTaskFlags mFlags