#include <actions.hpp>
Collaboration diagram for Action::TaskFactory:
Public Member Functions | |
void | cleanup () |
Destructor. | |
Task::AutoPtr | create (TaskType type) |
Create a task. | |
void | registerTask (TaskType type, Task::AutoPtr task) |
Register a task prototype together with its type. | |
Static Public Member Functions | |
TaskFactory & | instance () |
Get access to the task factory. |
Creates an instance of the task of the requested type. The factory is implemented as a singleton, which can be accessed only through the static member function instance().
|
Create a task.
|
|
Get access to the task factory. Clients access the task factory exclusively through this method. |
|
Register a task prototype together with its type. The task factory creates new tasks of a given type by cloning its associated prototype. Additional tasks can be registered. If called for a type which already exists in the list, the corresponding prototype is replaced.
|