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

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

# Mers::Interfaces::StaticTaskFactory Class Reference

`#include <StaticTaskFactory.h>`

Inheritance diagram for Mers::Interfaces::StaticTaskFactory:

[legend]
Collaboration diagram for Mers::Interfaces::StaticTaskFactory:

[legend]
List of all members.

## Public Member Functions
| StaticTaskFactory ()
virtual | ~StaticTaskFactory ()
virtual t_TaskSharedPointer | createTask (const t_TaskName &taskName)
virtual t_TaskSharedPointer | createTask (const t_TaskName &taskName, std::vector< const t_TaskParameter * > const &parameters)
t_TaskSharedPointer * | getAllTasks ()
unsigned int | getNumberOfTasks () const
## Protected Member Functions
void | logTasks (log4cplus::LogLevel logLevel) const
## Protected Attributes
t_TaskSharedPointer * | m_Tasks
| A list of all valid tasks.
unsigned int | m_NumTasks
| The number of tasks stored in the list.

## Detailed Description

This class provides means for interfacing with a normal task factory except all the tasks are pre-generated ahead of time. A handle to a valid task is only returned if a task that has already been created is requested.

Author:
  Paul H. Elliott

Definition at line 33 of file StaticTaskFactory.h.

## Constructor & Destructor Documentation

StaticTaskFactory::StaticTaskFactory | ( |  | ) |

Creates a new StaticTaskFactory

Definition at line 34 of file StaticTaskFactory.cpp.

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

Destroys this object.

Definition at line 43 of file StaticTaskFactory.cpp.

References m_Tasks.

## Member Function Documentation

TaskFactory::t_TaskSharedPointer StaticTaskFactory::createTask | ( | const t_TaskName & | taskName | ) | `[virtual]`

Creates a new Task that can be later referenced.

Parameters:

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

Implements Mers::Interfaces::TaskFactory.

Definition at line 51 of file StaticTaskFactory.cpp.

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

Creates a new Task that can be later referenced.

Parameters:

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

t_TaskSharedPointer* Mers::Interfaces::StaticTaskFactory::getAllTasks | ( |  | ) | `[inline]`

Returns the list of valid tasks.

Returns:
  The list of all tasks that can be created.

Definition at line 70 of file StaticTaskFactory.h.

References m_Tasks.

unsigned int Mers::Interfaces::StaticTaskFactory::getNumberOfTasks | ( |  | ) | const`[inline]`

Returns the number of valid tasks.

Returns:
  The number of tasks returned by getAllTasks()

Definition at line 79 of file StaticTaskFactory.h.

References m_NumTasks.

void StaticTaskFactory::logTasks | ( | log4cplus::LogLevel | logLevel | ) | const`[protected]`

Prints all available tasks to the internal logger based on the log level.

Parameters:

  | logLevel | the log level at which tasks should be printed.

Definition at line 137 of file StaticTaskFactory.cpp.

References m_Tasks.

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

- /Users/fpy/titan-1-5-MBARI/Mers/Interfaces/StaticTaskFactory.h
- /Users/fpy/titan-1-5-MBARI/Mers/Interfaces/StaticTaskFactory.cpp