- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Executives::DeductiveController::TaskFactory Class Reference

`#include <TaskFactory.h>`

Inheritance diagram for Mers::Executives::DeductiveController::TaskFactory:

[legend]
Collaboration diagram for Mers::Executives::DeductiveController::TaskFactory:

[legend]
List of all members.

## Public Types
typedef ::Mers::Executives::DeductiveController::Task | t_DCTask
| The type of task we're actually storing here.
typedef ::Mers::Utils::Containers::SharedPointer< t_DCTask > | t_DCTaskSharedPointer
| The type of task shared pointer we'd like to work with.
## Public Member Functions
| TaskFactory (Mers::Models::Base::BaseModel *model)
virtual | ~TaskFactory ()
virtual t_TaskSharedPointer | createTask (const t_TaskName taskName)
virtual t_TaskSharedPointer | createTask (const t_TaskName taskName, std::vector< const t_TaskParameter * > const &parameters)

## Detailed Description

A factory for creating Tasks for the deductive controller. This task factory pre-generates all valid tasks and returns a handle to the valid task when a new task is requested.

Author:
  Paul H. Elliott

Definition at line 36 of file TaskFactory.h.

## Constructor & Destructor Documentation

TaskFactory::TaskFactory | ( | Mers::Models::Base::BaseModel * | model | ) |

Constructs a new task factory, using the model as a basis for all valid tasks.

Parameters:

  | model | The model that is used to construct the valid tasks for this object. All variables are considered valid tasks.

Definition at line 36 of file TaskFactory.cpp.

References Mers::Utils::Containers::DynamicArray::getLength(), Mers::Models::Base::BaseModel::getVariables(), Mers::Interfaces::StaticTaskFactory::m_NumTasks, and Mers::Interfaces::StaticTaskFactory::m_Tasks.

Here is the call graph for this function:

TaskFactory::~TaskFactory | ( |  | ) | `[virtual]`

Destroys this object.

Reimplemented from Mers::Interfaces::TaskFactory.

Definition at line 65 of file TaskFactory.cpp.

## Member Function Documentation

virtual t_TaskSharedPointer Mers::Executives::DeductiveController::TaskFactory::createTask | ( | const t_TaskName | taskName | ) | `[virtual]`

Returns a reference to a valid task, if found. At the moment, this will always fail as all tasks have one parameter.

Parameters:

  | taskName | The name of the task that should be returned.

Returns:
  The new task or NULL if it could not be found.

virtual t_TaskSharedPointer Mers::Executives::DeductiveController::TaskFactory::createTask | ( | const t_TaskName | taskName,
|  | std::vector< const t_TaskParameter * > const & | parameters |
| ) |  |  | `[virtual]`

Returns a reference to a valid task, if found.

Parameters:

  | taskName | The name of the task that should be returned.
  | parameters | The parameters of this task.

Returns:
  The new task or NULL if it could not be found.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Executives/DeductiveController/TaskFactory.h
- /Users/fpy/titan-1-5-MBARI/Mers/Executives/DeductiveController/TaskFactory.cpp