#include <TaskSchedulerRegistry.h>
Container for task schedulers and its associated name The registry is also owner of the schedulers: it destroys them in its destructor
Protected Attributes | |
std::map< std::string, TaskScheduler * > | m_schedulers |
std::optional< std::pair< std::string, TaskScheduler * > > | m_lastInserted {} |
Public Member Functions | |
bool | addTaskSchedulerToRegistry (TaskScheduler *taskScheduler, const std::string &taskSchedulerName) |
TaskScheduler * | getTaskScheduler (const std::string &taskSchedulerName) const |
bool | hasScheduler (const std::string &taskSchedulerName) const |
const std::optional< std::pair< std::string, TaskScheduler * > > & | getLastInserted () const |
void | clear () |
~TaskSchedulerRegistry () | |
|
protected |
|
protected |
sofa::simulation::TaskSchedulerRegistry::~TaskSchedulerRegistry | ( | ) |
bool sofa::simulation::TaskSchedulerRegistry::addTaskSchedulerToRegistry | ( | TaskScheduler * | taskScheduler, |
const std::string & | taskSchedulerName | ||
) |
Add a task scheduler to the registry and transfer the ownership
void sofa::simulation::TaskSchedulerRegistry::clear | ( | ) |
Clear the registry and destroy the task schedulers sstored in the registry
const std::optional< std::pair< std::string, TaskScheduler * > > & sofa::simulation::TaskSchedulerRegistry::getLastInserted | ( | ) | const |
TaskScheduler * sofa::simulation::TaskSchedulerRegistry::getTaskScheduler | ( | const std::string & | taskSchedulerName | ) | const |
bool sofa::simulation::TaskSchedulerRegistry::hasScheduler | ( | const std::string & | taskSchedulerName | ) | const |