Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# GTXabsl2EngineExecutor Class Reference

Executes an Xabsl2Engine in the GT - architecture. More...

`#include <GTXabsl2EngineExecutor.h>`

Inheritance diagram for GTXabsl2EngineExecutor:

[legend]
Collaboration diagram for GTXabsl2EngineExecutor:

[legend]
List of all members.

## Debug interface to the Xabsl2 Dialog
enum | Xabsl2DebugMode { executeRootOption, executeOption, executeBasicBehavior }
| The requested debug mode. More...
void | sendDebugMessage ()
| Sends a debug message to the Xabsl2 dialog depending on the last request.
enum GTXabsl2EngineExecutor::Xabsl2DebugMode | debugMode
| The requested debug mode.
Xabsl2Array< Xabsl2DecimalInputSymbol * > | watchedDecimalInputSymbols
| The decimal input symbols that are watched by the Xabsl2 Dialog.
Xabsl2Array< Xabsl2BooleanInputSymbol * > | watchedBooleanInputSymbols
| The boolean input symbols that are watched by the Xabsl2 Dialog.
Xabsl2Array< Xabsl2EnumeratedInputSymbol * > | watchedEnumeratedInputSymbols
| The enumerated input symbols that are watched by the Xabsl2 Dialog.
Xabsl2Array< Xabsl2EnumeratedOutputSymbol * > | watchedEnumeratedOutputSymbols
| The enumerated output symbols that are watched by the Xabsl2 Dialog.
Xabsl2Array< Xabsl2EnumeratedOutputSymbol * > | setEnumeratedOutputSymbols
| The output symbols that are set from the Xabsl2 Dialog.
Xabsl2Array< int > | setEnumeratedOutputSymbolValues
| The values for the set output symbols.
## Public Member Functions
| GTXabsl2EngineExecutor (SolutionRequest::xabsl2EngineID id, SolutionRequest::ModuleID module, const unsigned long &frameNumber)
| Constructor.
| ~GTXabsl2EngineExecutor ()
| destructor
void | init (Xabsl2InputSource &input)
| Creates a new engine.
void | executeEngine ()
| Executes the engine.
virtual void | registerSymbolsAndBasicBehaviors ()=0
| Registers symbols and basic behaviors at the engine.
void | setSelectedAgent (const char *name)
| Sets the selected Agent.
virtual bool | handleMessage (InMessage &message)
| Is called for every incoming debug message.
## Protected Member Functions
virtual void | executeIfEngineCouldNotBeCreated ()=0
| Is called if the engine could not be created.
virtual void | printGeneratedMainActionToString (char *buf)=0
| Prints the main action that was generated by the execution of the engine to a string.
## Protected Attributes
Xabsl2Engine * | pEngine
| An engine that executes the XML formalized behaviors.
GTXabsl2ErrorHandler | errorHandler
| Is invoked when errors occur.
GTXabsl2Profiler | profiler
| The profiler.
## Private Types
## Private Attributes
SolutionRequest::xabsl2EngineID | id
| The id of the Xabsl2Engine derivate.
SolutionRequest::ModuleID | module
| The id of the module (not the solution) that embeds the engine.

## Detailed Description

Executes an Xabsl2Engine in the GT - architecture.

Author:
  Martin Lötzsch

Definition at line 122 of file GTXabsl2EngineExecutor.h.

## Member Enumeration Documentation

enum GTXabsl2EngineExecutor::Xabsl2DebugMode`[private]`

  | The requested debug mode. Enumeration values:
  executeRootOption |
  executeOption |
  executeBasicBehavior |
Definition at line 195 of file GTXabsl2EngineExecutor.h.

## Constructor & Destructor Documentation

GTXabsl2EngineExecutor::GTXabsl2EngineExecutor | ( | SolutionRequest::xabsl2EngineID | id,
|  | SolutionRequest::ModuleID | module,
|  | const unsigned long & | frameNumber
| ) |

  | Constructor. Parameters:
  id | The id of the Xabsl2Engine derivate.
  module | The id of the module (not the solution) that embeds the engine
  frameNumber | A reference to a variable containing the current frame number
Definition at line 14 of file GTXabsl2EngineExecutor.cpp.

GTXabsl2EngineExecutor::~GTXabsl2EngineExecutor | ( |  | ) |

| destructor Definition at line 22 of file GTXabsl2EngineExecutor.cpp. References pEngine.

## Member Function Documentation

void GTXabsl2EngineExecutor::init | ( | Xabsl2InputSource & | input | ) |

  | Creates a new engine. Parameters:
  input | An input source to read to intermediate code from
Definition at line 27 of file GTXabsl2EngineExecutor.cpp. References Xabsl2Array< int >::clear(), Xabsl2Array< Xabsl2EnumeratedOutputSymbol * >::clear(), Xabsl2Array< Xabsl2EnumeratedInputSymbol * >::clear(), Xabsl2Array< Xabsl2DecimalInputSymbol * >::clear(), Xabsl2Array< Xabsl2BooleanInputSymbol * >::clear(), Xabsl2Engine::createOptionGraph(), debugMode, errorHandler, Xabsl2ErrorHandler::errorsOccurred, executeRootOption, SystemCall::getCurrentSystemTime(), SystemCall::getFreeMem(), GTXabsl2Profiler::init(), Xabsl2ErrorHandler::message(), pEngine, profiler, GTXabsl2Profiler::registerSymbols(), registerSymbolsAndBasicBehaviors(), setEnumeratedOutputSymbols, setEnumeratedOutputSymbolValues, watchedBooleanInputSymbols, watchedDecimalInputSymbols, watchedEnumeratedInputSymbols, and watchedEnumeratedOutputSymbols. Referenced by GT2005BehaviorControl::GT2005BehaviorControl(), GT2005HeadControl::GT2005HeadControl(), and handleMessage().

Here is the call graph for this function:

void GTXabsl2EngineExecutor::executeEngine | ( |  | ) |

| Executes the engine. Definition at line 61 of file GTXabsl2EngineExecutor.cpp. References ASSERT, DEBUG_RESPONSE, debugMode, errorHandler, Xabsl2ErrorHandler::errorsOccurred, Xabsl2Engine::execute(), executeBasicBehavior, executeIfEngineCouldNotBeCreated(), executeOption, executeRootOption, Xabsl2Engine::executeSelectedBasicBehavior(), getDebugKeyTable(), Xabsl2Array< Xabsl2EnumeratedOutputSymbol * >::getSize(), DebugKeyTable::isActive(), GTXabsl2Profiler::log, module, pEngine, profiler, GTXabsl2Profiler::profilerCollectMode, GTXabsl2Profiler::profilerWriteMode, GTXabsl2Profiler::recordLog(), sendDebugMessage(), setEnumeratedOutputSymbols, setEnumeratedOutputSymbolValues, Xabsl2Symbols::setOutputSymbols(), Xabsl2Engine::setRootOption(), GTXabsl2Profiler::writeCompleteLogToFileAndClear(), and GTXabsl2Profiler::writeLogEntriesToFileAndRemove(). Referenced by GT2005HeadControl::execute(), and GT2005BehaviorControl::execute().

Here is the call graph for this function:

virtual void GTXabsl2EngineExecutor::registerSymbolsAndBasicBehaviors | ( |  | ) | `[pure virtual]`

| Registers symbols and basic behaviors at the engine. Implemented in GT2005BehaviorControl, and GT2005HeadControl. Referenced by init().

void GTXabsl2EngineExecutor::setSelectedAgent | ( | const char * | name | ) |

  | Sets the selected Agent. If the last selected agent was different from the new one, the root option is changed depending on the new agent. Parameters:
  name | The name of the agent
Definition at line 409 of file GTXabsl2EngineExecutor.cpp. References pEngine, and Xabsl2Engine::setSelectedAgent().

Here is the call graph for this function:

bool GTXabsl2EngineExecutor::handleMessage | ( | InMessage & | message | ) | `[virtual]`

  | Is called for every incoming debug message. Parameters:
  message | An interface to read the message from the queue
Returns: if the messag was read Reimplemented in GT2005BehaviorControl, Xabsl2BehaviorControl, GT2005HeadControl, and Xabsl2HeadControl. Definition at line 253 of file GTXabsl2EngineExecutor.cpp. References Xabsl2Array< int >::append(), Xabsl2Array< Xabsl2EnumeratedOutputSymbol * >::append(), Xabsl2Array< Xabsl2EnumeratedInputSymbol * >::append(), Xabsl2Array< Xabsl2BooleanInputSymbol * >::append(), Xabsl2Array< Xabsl2DecimalInputSymbol * >::append(), InMessage::bin, Xabsl2Array< int >::clear(), Xabsl2Array< Xabsl2EnumeratedOutputSymbol * >::clear(), Xabsl2Array< Xabsl2EnumeratedInputSymbol * >::clear(), Xabsl2Array< Xabsl2BooleanInputSymbol * >::clear(), Xabsl2Array< Xabsl2DecimalInputSymbol * >::clear(), InMessage::config, debugMode, Xabsl2EnumeratedOutputSymbol::enumElements, executeBasicBehavior, executeOption, executeRootOption, Xabsl2Array< Xabsl2EnumElement * >::exists(), Xabsl2Symbols::existsBooleanInputSymbol(), Xabsl2Symbols::existsDecimalInputSymbol(), Xabsl2Symbols::existsEnumeratedInputSymbol(), Xabsl2Symbols::existsEnumeratedOutputSymbol(), Xabsl2Symbols::getBooleanInputSymbol(), Xabsl2Symbols::getDecimalInputSymbol(), Xabsl2Array< Xabsl2EnumElement * >::getElement(), Xabsl2Symbols::getEnumeratedInputSymbol(), Xabsl2Symbols::getEnumeratedOutputSymbol(), InMessage::getMessageID(), idText, idXabsl2DebugRequest, idXabsl2IntermediateCode, init(), OUTPUT, pEngine, Xabsl2Engine::setBasicBehaviorParameter(), setEnumeratedOutputSymbols, setEnumeratedOutputSymbolValues, Xabsl2Engine::setOptionParameter(), Xabsl2Engine::setRootOption(), Xabsl2Engine::setSelectedBasicBehavior(), Xabsl2EnumElement::v, watchedBooleanInputSymbols, watchedDecimalInputSymbols, watchedEnumeratedInputSymbols, and watchedEnumeratedOutputSymbols. Referenced by Xabsl2HeadControl::handleMessage(), and Xabsl2BehaviorControl::handleMessage().

Here is the call graph for this function:

virtual void GTXabsl2EngineExecutor::executeIfEngineCouldNotBeCreated | ( |  | ) | `[protected, pure virtual]`

| Is called if the engine could not be created. Implemented in Xabsl2BehaviorControl, and Xabsl2HeadControl. Referenced by executeEngine().

virtual void GTXabsl2EngineExecutor::printGeneratedMainActionToString | ( | char * | buf | ) | `[protected, pure virtual]`

  | Prints the main action that was generated by the execution of the engine to a string. Parameters:
  buf | the string where to print the action
Implemented in Xabsl2BehaviorControl, and Xabsl2HeadControl. Referenced by sendDebugMessage().

void GTXabsl2EngineExecutor::sendDebugMessage | ( |  | ) | `[private]`

| Sends a debug message to the Xabsl2 dialog depending on the last request. Definition at line 126 of file GTXabsl2EngineExecutor.cpp. References Xabsl2Option::activeState, Xabsl2EnumeratedOutputSymbol::activeValue, OutMessage::bin, debugMode, Xabsl2EnumeratedOutputSymbol::enumElements, Xabsl2EnumeratedInputSymbol::enumElements, executeOption, executeRootOption, OutMessage::finishMessage(), getDebugOut(), Xabsl2Array< double & >::getName(), Xabsl2Array< double >::getName(), Xabsl2Engine::getRootOption(), Xabsl2Engine::getSelectedAgentName(), Xabsl2Engine::getSelectedBasicBehavior(), Xabsl2Array< double & >::getSize(), Xabsl2Array< double >::getSize(), Xabsl2Array< Xabsl2EnumeratedOutputSymbol * >::getSize(), Xabsl2Array< Xabsl2EnumElement * >::getSize(), Xabsl2Array< Xabsl2EnumeratedInputSymbol * >::getSize(), Xabsl2Array< Xabsl2BooleanInputSymbol * >::getSize(), Xabsl2Array< Xabsl2DecimalInputSymbol * >::getSize(), Xabsl2InputSymbol< int >::getValue(), idXabsl2DebugMessage, Xabsl2NamedItem::n, out, Xabsl2BasicBehavior::parameters, Xabsl2Option::parameters, pEngine, printGeneratedMainActionToString(), Xabsl2State::subsequentOption, Xabsl2Option::timeOfOptionExecution, Xabsl2State::timeOfStateExecution, watchedBooleanInputSymbols, watchedDecimalInputSymbols, watchedEnumeratedInputSymbols, and watchedEnumeratedOutputSymbols. Referenced by executeEngine().

Here is the call graph for this function:

## Member Data Documentation

Xabsl2Engine* GTXabsl2EngineExecutor::pEngine`[protected]`

| An engine that executes the XML formalized behaviors. Definition at line 166 of file GTXabsl2EngineExecutor.h. Referenced by executeEngine(), handleMessage(), init(), sendDebugMessage(), setSelectedAgent(), and ~GTXabsl2EngineExecutor().

GTXabsl2ErrorHandler GTXabsl2EngineExecutor::errorHandler`[protected]`

| Is invoked when errors occur. Definition at line 169 of file GTXabsl2EngineExecutor.h. Referenced by executeEngine(), and init().

GTXabsl2Profiler GTXabsl2EngineExecutor::profiler`[protected]`

| The profiler. Definition at line 181 of file GTXabsl2EngineExecutor.h. Referenced by executeEngine(), and init().

SolutionRequest::xabsl2EngineID GTXabsl2EngineExecutor::id`[private]`

| The id of the Xabsl2Engine derivate. Definition at line 186 of file GTXabsl2EngineExecutor.h.

SolutionRequest::ModuleID GTXabsl2EngineExecutor::module`[private]`

| The id of the module (not the solution) that embeds the engine. Definition at line 189 of file GTXabsl2EngineExecutor.h. Referenced by executeEngine().

enum GTXabsl2EngineExecutor::Xabsl2DebugMode GTXabsl2EngineExecutor::debugMode`[private]`

| The requested debug mode. Referenced by executeEngine(), handleMessage(), init(), and sendDebugMessage().

Xabsl2Array<Xabsl2DecimalInputSymbol*> GTXabsl2EngineExecutor::watchedDecimalInputSymbols`[private]`

| The decimal input symbols that are watched by the Xabsl2 Dialog. Definition at line 201 of file GTXabsl2EngineExecutor.h. Referenced by handleMessage(), init(), and sendDebugMessage().

Xabsl2Array<Xabsl2BooleanInputSymbol*> GTXabsl2EngineExecutor::watchedBooleanInputSymbols`[private]`

| The boolean input symbols that are watched by the Xabsl2 Dialog. Definition at line 204 of file GTXabsl2EngineExecutor.h. Referenced by handleMessage(), init(), and sendDebugMessage().

Xabsl2Array<Xabsl2EnumeratedInputSymbol*> GTXabsl2EngineExecutor::watchedEnumeratedInputSymbols`[private]`

| The enumerated input symbols that are watched by the Xabsl2 Dialog. Definition at line 207 of file GTXabsl2EngineExecutor.h. Referenced by handleMessage(), init(), and sendDebugMessage().

Xabsl2Array<Xabsl2EnumeratedOutputSymbol*> GTXabsl2EngineExecutor::watchedEnumeratedOutputSymbols`[private]`

| The enumerated output symbols that are watched by the Xabsl2 Dialog. Definition at line 210 of file GTXabsl2EngineExecutor.h. Referenced by handleMessage(), init(), and sendDebugMessage().

Xabsl2Array<Xabsl2EnumeratedOutputSymbol*> GTXabsl2EngineExecutor::setEnumeratedOutputSymbols`[private]`

| The output symbols that are set from the Xabsl2 Dialog. Definition at line 213 of file GTXabsl2EngineExecutor.h. Referenced by executeEngine(), handleMessage(), and init().

Xabsl2Array<int> GTXabsl2EngineExecutor::setEnumeratedOutputSymbolValues`[private]`

| The values for the set output symbols. Definition at line 216 of file GTXabsl2EngineExecutor.h. Referenced by executeEngine(), handleMessage(), and init().

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

- Tools/Xabsl2/GT/GTXabsl2EngineExecutor.h
- Tools/Xabsl2/GT/GTXabsl2EngineExecutor.cpp