#include <actions.hpp>

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 | |
| static 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().
| TaskFactory & Action::TaskFactory::instance | ( | ) | [static] |
Get access to the task factory.
Clients access the task factory exclusively through this method.
| Task::AutoPtr Action::TaskFactory::create | ( | TaskType | type | ) |
Create a task.
| type | Identifies the type of task to create. |
| void Action::TaskFactory::registerTask | ( | TaskType | type, | |
| Task::AutoPtr | task | |||
| ) |
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.
| type | Task type. | |
| task | Pointer to the prototype. Ownership is transfered to the task factory. That's what the auto pointer indicates. |
1.5.4