/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: Tasks.hpp Date: 2021-11-1 Author: Reece ***/ #pragma once namespace Aurora::Async { template struct ITask { virtual Result_t OnFrame(const Info_t &in) const = 0; }; template struct FTask final : ITask { using InfoType_t = Info_t; using ResultType_t = Result_t; AuFunction onFrame; virtual inline Result_t OnFrame(const Info_t &in) const override final { return onFrame(in); } }; template struct CTask final : ITask { using InfoType_t = Info_t; using ResultType_t = Result_t; Result_t(* onFrame)(const Info_t &) = 0; virtual inline Result_t OnFrame(const Info_t &in) const override final { return onFrame(in); } }; using FVoidTask = FTask; }