// Copyright 2011-2020 Molecular Matters GmbH, all rights reserved. #pragma once #if LC_VERSION == 1 // BEGIN EPIC MOD #include "CoreTypes.h" // END EPIC MOD #include "LC_SchedulerTask.h" namespace scheduler { void Startup(void); void Shutdown(void); // BEGIN EPIC MOD // creates a new task from any function template Task>* CreateTask(F&& function) { return new Task>(function); } // creates a new task from any function as child of a parent task template Task>* CreateTask(TaskBase* parent, F&& function) { return new Task>(parent, function); } // END EPIC MOD // creates an empty task TaskBase* CreateEmptyTask(void); // destroys a task void DestroyTask(TaskBase* task); // destroys a container of tasks template void DestroyTasks(const T& container) { const size_t count = container.size(); for (size_t i = 0u; i < count; ++i) { DestroyTask(container[i]); } } void RunTask(TaskBase* task); void WaitForTask(TaskBase* task); } #endif