Fawkes API Fawkes Development Version
fawkes::ExecutionTimeEstimatorManager Class Reference

A manager for execution time providers. More...

Public Member Functions

std::shared_ptr< ExecutionTimeEstimatorget_provider (const std::string &skill_string) const
 Get the execution time provider for the given skill string. More...
 
void register_provider (std::shared_ptr< ExecutionTimeEstimator > provider, int priority=0)
 Add an execution time provider. More...
 
void unregister_provider (std::shared_ptr< ExecutionTimeEstimator > provider)
 Remove an execution time estimate provider. More...
 

Detailed Description

A manager for execution time providers.

It stores prioritized providers, where the provider with the maximal priority is considered first.

Definition at line 31 of file execution_time_estimator.h.

Member Function Documentation

◆ get_provider()

std::shared_ptr< ExecutionTimeEstimator > fawkes::ExecutionTimeEstimatorManager::get_provider ( const std::string &  skill_string) const

Get the execution time provider for the given skill string.

Parameters
skill_stringThe string to get the execution time for
Returns
a pointer to the provider
Exceptions
IllegalArgumentExceptionif no provider for the given skill exists

Definition at line 42 of file execution_time_estimator.cpp.

◆ register_provider()

void fawkes::ExecutionTimeEstimatorManager::register_provider ( std::shared_ptr< ExecutionTimeEstimator provider,
int  priority = 0 
)

Add an execution time provider.

Parameters
providerThe provider to add
priorityThe priority of the new provider

Definition at line 58 of file execution_time_estimator.cpp.

Referenced by ExecutionTimeEstimatorLookupEstimatorThread::init(), ExecutionTimeEstimatorNavgraphThread::init(), and ExecutionTimeEstimatorsThread::init().

◆ unregister_provider()

void fawkes::ExecutionTimeEstimatorManager::unregister_provider ( std::shared_ptr< ExecutionTimeEstimator provider)

Remove an execution time estimate provider.

Parameters
providerThe provider to remove

Definition at line 68 of file execution_time_estimator.cpp.

Referenced by ExecutionTimeEstimatorLookupEstimatorThread::finalize(), and ExecutionTimeEstimatorNavgraphThread::finalize().


The documentation for this class was generated from the following files: