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

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

# Mers::Interfaces::TimedExecutionInterface Class Reference

`#include <TimedExecutionInterface.h>`

Inheritance diagram for Mers::Interfaces::TimedExecutionInterface:

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

[legend]
List of all members.

## Public Member Functions
| TimedExecutionInterface (TimedTaskFactory *pTimedTaskFactory)
virtual | ~TimedExecutionInterface ()
virtual TaskIdentifier | createTask (const char *taskName)
virtual TaskIdentifier | createTask (const char *taskName, std::vector< std::string * > const &parameters)
virtual TaskIdentifier | createTask (const char *taskName, Mers::Utils::Lang::Time const &start, Mers::Utils::Lang::Time const &duration)
virtual TaskIdentifier | createTask (const char *taskName, std::vector< std::string * > const &parameters, Mers::Utils::Lang::Time const &start, Mers::Utils::Lang::Time const &duration)
virtual void | deleteTask (TaskIdentifier task)
virtual void | setTaskFactory (TimedTaskFactory *tFactory)
virtual TimedTaskFactory * | getTaskFactory ()
virtual TimedTask * | getTask (TaskIdentifier task)
## Protected Attributes
std::map< TaskIdentifier, TimedTask * > | mTimedTasks
| The set of all tasks that this object has allocated.
TimedTaskFactory * | mTimedTaskFactory
| The current task factory.

## Detailed Description

This class represents the default time-sensitive interface between two engine layers for generic interaction. The interface supports arbitrarily parameterized task execution as well as task-queries. Classes that use this interface can be given time-sensitive tasks and will respond to these tasks.

Author:
  Paul H. Elliott

Definition at line 35 of file TimedExecutionInterface.h.

## Constructor & Destructor Documentation

TimedExecutionInterface::TimedExecutionInterface | ( | TimedTaskFactory * | pTimedTaskFactory | ) |

Creates a new execution interface.

Definition at line 31 of file TimedExecutionInterface.cpp.

References Mers::Utils::Lang::ReferencedObject::addReference(), and mTimedTaskFactory.

Here is the call graph for this function:

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

Destroys this object.

Definition at line 40 of file TimedExecutionInterface.cpp.

References mTimedTaskFactory, and Mers::Utils::Lang::ReferencedObject::removeReference().

Here is the call graph for this function:

## Member Function Documentation

ExecutionInterfaceBase::TaskIdentifier TimedExecutionInterface::createTask | ( | const char * | taskName | ) | `[virtual]`

Creates a new Task that can be later referenced.

Parameters:

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

Definition at line 48 of file TimedExecutionInterface.cpp.

References Mers::Interfaces::TimedTaskFactory::createTask(), mTimedTaskFactory, and mTimedTasks.

Here is the call graph for this function:

virtual TaskIdentifier Mers::Interfaces::TimedExecutionInterface::createTask | ( | const char * | taskName,
|  | std::vector< std::string * > 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.

ExecutionInterfaceBase::TaskIdentifier TimedExecutionInterface::createTask | ( | const char * | taskName,
|  | Mers::Utils::Lang::Time const & | start,
|  | Mers::Utils::Lang::Time const & | duration |
| ) |  |  | `[virtual]`

Creates a new Task that can be later referenced.

Parameters:

  | taskName | The name of the task that should be created.
  | start | The time at which the task started or starts.
  | duration | The duration of the task.

Definition at line 72 of file TimedExecutionInterface.cpp.

References Mers::Interfaces::TimedTaskFactory::createTask(), mTimedTaskFactory, and mTimedTasks.

Here is the call graph for this function:

virtual TaskIdentifier Mers::Interfaces::TimedExecutionInterface::createTask | ( | const char * | taskName,
|  | std::vector< std::string * > const & | parameters,
|  | Mers::Utils::Lang::Time const & | start,
|  | Mers::Utils::Lang::Time const & | duration |
| ) |  |  | `[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.
  | start | The time at which the task started or starts.
  | duration | The duration of the task.

void TimedExecutionInterface::deleteTask | ( | TaskIdentifier | task | ) | `[virtual]`

Frees a task that was previously created. Note that this function just dereferences the object, so other classes that have also taken a reference to the class will still have a valid object.

Parameters:

  | task | The task that should be freed.

Reimplemented from Mers::Interfaces::ExecutionInterfaceBase.

Definition at line 98 of file TimedExecutionInterface.cpp.

References mTimedTasks.

void TimedExecutionInterface::setTaskFactory | ( | TimedTaskFactory * | tFactory | ) | `[virtual]`

Sets a new Task Factory.

Parameters:

  | tFactory | The factory that will be used to create tasks.

Definition at line 108 of file TimedExecutionInterface.cpp.

References mTimedTaskFactory, Mers::Utils::Lang::ReferencedObject::removeReference(), and Mers::Interfaces::ExecutionInterfaceBase::setTaskFactory().

Here is the call graph for this function:

TimedTaskFactory * TimedExecutionInterface::getTaskFactory | ( |  | ) | `[virtual]`

Returns the current factory.

Returns:
  The factory currently being used to create tasks.

Reimplemented from Mers::Interfaces::ExecutionInterfaceBase.

Definition at line 120 of file TimedExecutionInterface.cpp.

References mTimedTaskFactory.

TimedTask * TimedExecutionInterface::getTask | ( | TaskIdentifier | task | ) | `[virtual]`

Returns a Task object from an identifier, if the identifier is valid. Otherwise, returns NULL.

Parameters:

  | task | The identifier of the task being sought.

Returns:
  A handle to the task that corresponds to the task identifier.

Definition at line 127 of file TimedExecutionInterface.cpp.

References mTimedTasks.

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

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