mermaid::support::activeobject::ActiveObjectAce Class Reference

ActiveObjectAce interface. More...

#include <ActiveObjectAce.hpp>

Inheritance diagram for mermaid::support::activeobject::ActiveObjectAce:
Inheritance graph
[legend]
Collaboration diagram for mermaid::support::activeobject::ActiveObjectAce:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ActiveObjectAce (ActiveObjectManager *aom)
virtual void addTask (shared_ptr< Task > t)
 This method adds a task to be executed by the ActiveObject.
virtual void addTaskInternal (shared_ptr< Task > t)
shared_ptr< CommunicationGatewaygetCommunicationGateway ()
 Getter for the communication gateway.
ActiveObjectState getState ()
 Getter for the current state of the ActiveObject.
std::string getStateString ()
 Gets a string representation of the current ActiveObject's state.
void start ()
void stop ()

Static Public Member Functions

static std::string getStateString (ActiveObjectState state)
 Helper function that translates a given ActiveObjectState to a string.

Protected Member Functions

virtual void addTaskImplementation (shared_ptr< Task > t)
void setState (ActiveObjectState s)
 Setter for the current state of the ActiveObject.

Protected Attributes

ActiveObjectManageraoManager_
 Reference to the ActiveObjectManager instance.
shared_ptr< TaskSchedulertaskScheduler_
 Reference to the TaskScheduler used by this ActiveObject.

Friends

class ActiveObjectAceAddTaskMethod
class ActiveObjectAceRunTaskMethod
class ActiveObjectManager

Detailed Description

ActiveObjectAce interface.

Author:
Marco Barbosa + Nelson Ramos

Definition at line 43 of file ActiveObjectAce.hpp.


Member Function Documentation

void ActiveObjectAce::addTask ( shared_ptr< Task t  )  [virtual]

This method adds a task to be executed by the ActiveObject.

It should only be called from OUTSIDE the context of an ActiveObject. Calling it in the context of an ActiveObject will block the ActiveObject.

Author:
Marco Barbosa + Nelson Ramos

Todo:
IMPORTANT: uncommenting the following line causes segfaults and/or memory corruption. The line should be uncommented and the cause of the error should be found and corrected.

Reimplemented from mermaid::support::activeobject::ActiveObject.

Definition at line 230 of file ActiveObjectAce.cpp.

shared_ptr< CommunicationGateway > ActiveObject::getCommunicationGateway (  )  [inherited]

Getter for the communication gateway.

This methd should only be used in the execution context of the ActiveObject

Author:
Marco Barbosa

Definition at line 123 of file ActiveObject.cpp.

ActiveObjectState ActiveObject::getState (  )  [inherited]

Getter for the current state of the ActiveObject.

Returns:
ActiveObjectState representing the current state of the ActiveObject.
Author:
Marco Barbosa + Nelson Ramos

Definition at line 62 of file ActiveObject.cpp.

std::string ActiveObject::getStateString ( ActiveObjectState  state  )  [static, inherited]

Helper function that translates a given ActiveObjectState to a string.

Parameters:
state The state for which a string representation is needed.
Returns:
string of the given state.
Author:
Marco Barbosa + Nelson Ramos

Definition at line 72 of file ActiveObject.cpp.

std::string ActiveObject::getStateString (  )  [inherited]

Gets a string representation of the current ActiveObject's state.

Returns:
string of the current state.
Author:
Marco Barbosa + Nelson Ramos

Definition at line 67 of file ActiveObject.cpp.

void ActiveObject::setState ( ActiveObjectState  s  )  [protected, inherited]

Setter for the current state of the ActiveObject.

Parameters:
s State to which the ActiveObject should be set.
Author:
Marco Barbosa + Nelson Ramos

Definition at line 102 of file ActiveObject.cpp.

void ActiveObjectAce::start (  )  [virtual]

this method start the active object.

Author:
Marco Barbosa + Nelson Ramos

Implements mermaid::support::activeobject::ActiveObject.

Definition at line 63 of file ActiveObjectAce.cpp.

void ActiveObjectAce::stop (  )  [virtual]

this method stop the active object.

Author:
Marco Barbosa + Nelson Ramos

Implements mermaid::support::activeobject::ActiveObject.

Definition at line 77 of file ActiveObjectAce.cpp.


Member Data Documentation

Reference to the ActiveObjectManager instance.

Definition at line 143 of file ActiveObject.hpp.

Reference to the TaskScheduler used by this ActiveObject.

Definition at line 140 of file ActiveObject.hpp.

Generated on Fri Mar 4 22:15:42 2011 for MeRMaID::support by  doxygen 1.6.3