#include <TaskSchedulerFactory.h>
Simple factory structure used to instantiate a @TaskScheduler based on a name. The name and a creation function must be registered before trying to instantiate.
Public Member Functions | |
| bool | registerScheduler (const std::string &name, const std::function< TaskScheduler *()> &creatorFunc) |
| TaskScheduler * | instantiate (const std::string &name) |
| std::set< std::string > | getAvailableSchedulers () |
| std::set< std::string > sofa::simulation::TaskSchedulerFactory::getAvailableSchedulers | ( | ) |
| TaskScheduler * sofa::simulation::TaskSchedulerFactory::instantiate | ( | const std::string & | name | ) |
| bool sofa::simulation::TaskSchedulerFactory::registerScheduler | ( | const std::string & | name, |
| const std::function< TaskScheduler *()> & | creatorFunc | ||
| ) |
Register a new scheduler in the factory
| name | key in the factory |
| creatorFunc | function creating a new TaskScheduler or a derived class |