#include <Xabsl2Option.h>
Inheritance diagram for Xabsl2Option:
Public Member Functions | |
Xabsl2Option (const char *name, Xabsl2InputSource &input, Xabsl2ErrorHandler &errorHandler, unsigned long(*pTimeFunction)()) | |
Constructor. | |
~Xabsl2Option () | |
Destructor. | |
void | create (Xabsl2InputSource &input, Xabsl2Array< Xabsl2Option * > &options, Xabsl2Array< Xabsl2BasicBehavior & > &basicBehaviors, Xabsl2Symbols &symbols) |
Creates the option and it's states from the intermediate code. | |
void | execute () |
Executes the option. | |
bool | getOptionReachedATargetState () const |
Returns wheter the option reached a target state. | |
Public Attributes | |
Xabsl2Array< double > | parameters |
The parameters of the option. | |
Xabsl2Array< Xabsl2State * > | states |
The states of the option. | |
Xabsl2State * | activeState |
A pointer to the active state. | |
bool | optionIsActive |
the option is activated in the current path through the option graph | |
bool | optionWasActive |
the option was activated in the last path trough the option graph | |
unsigned long | timeOfOptionExecution |
the time how long the option is already active | |
Private Attributes | |
unsigned long | timeWhenOptionWasActivated |
The time, when the option was activated. | |
Xabsl2State * | initialState |
A pointer to the initial state. | |
Xabsl2ErrorHandler & | errorHandler |
Used for error handling. | |
unsigned long(* | pTimeFunction )() |
A pointer to a function that returns the system time in ms. |
Definition at line 250 of file Xabsl2Option.h.
|
Constructor. Does not create the option.
Definition at line 325 of file Xabsl2Option.cpp. References Xabsl2Array< double >::append(), Xabsl2ErrorHandler::message(), Xabsl2InputSource::readString(), Xabsl2InputSource::readValue(), and XABSL2_DEBUG_INIT. |
Here is the call graph for this function:
|
Destructor. Deletes the states Definition at line 344 of file Xabsl2Option.cpp. References Xabsl2Array< Xabsl2State * >::getSize(). |
Here is the call graph for this function:
|
Creates the option and it's states from the intermediate code.
Definition at line 351 of file Xabsl2Option.cpp. References activeState, Xabsl2Array< Xabsl2State * >::append(), Xabsl2ErrorHandler::error(), Xabsl2ErrorHandler::errorsOccurred, Xabsl2Array< Xabsl2State * >::getElement(), initialState, Xabsl2ErrorHandler::message(), Xabsl2InputSource::readString(), Xabsl2InputSource::readValue(), timeOfOptionExecution, and XABSL2_DEBUG_INIT. |
Here is the call graph for this function:
|
Executes the option. The state machine is carried out to determine the subsequent option or the subsequent basic behavior. Output symbols are set. Definition at line 392 of file Xabsl2Option.cpp. References activeState, Xabsl2State::getNextState(), initialState, optionIsActive, optionWasActive, pTimeFunction, Xabsl2State::reset(), Xabsl2State::setOutputSymbols(), timeOfOptionExecution, and timeWhenOptionWasActivated. Referenced by Xabsl2Engine::execute(). |
Here is the call graph for this function:
|
Returns wheter the option reached a target state.
Definition at line 413 of file Xabsl2Option.cpp. References activeState, Xabsl2State::isTargetState(), and optionWasActive. Referenced by Xabsl2subsequentOptionReachedTargetStateCondition::getValue(). |
Here is the call graph for this function:
|
The parameters of the option.
Definition at line 288 of file Xabsl2Option.h. Referenced by Xabsl2State::create(), GTXabsl2Profiler::doProfiling(), GTXabsl2Profiler::registerOptions(), GTXabsl2EngineExecutor::sendDebugMessage(), Xabsl2Engine::setOptionParameter(), and Xabsl2State::setOutputSymbols(). |
|
The states of the option.
Definition at line 291 of file Xabsl2Option.h. Referenced by Xabsl2Engine::checkForLoops(), GTXabsl2Profiler::doDepthCount(), and GTXabsl2Profiler::registerOptions(). |
|
A pointer to the active state. If 0, then no state is active Definition at line 294 of file Xabsl2Option.h. Referenced by create(), GTXabsl2Profiler::doProfiling(), execute(), Xabsl2Engine::execute(), getOptionReachedATargetState(), and GTXabsl2EngineExecutor::sendDebugMessage(). |
|
the option is activated in the current path through the option graph
Definition at line 297 of file Xabsl2Option.h. Referenced by execute(), and Xabsl2Engine::execute(). |
|
the option was activated in the last path trough the option graph
Definition at line 300 of file Xabsl2Option.h. Referenced by execute(), Xabsl2Engine::execute(), and getOptionReachedATargetState(). |
|
the time how long the option is already active
Definition at line 303 of file Xabsl2Option.h. Referenced by create(), execute(), and GTXabsl2EngineExecutor::sendDebugMessage(). |
|
The time, when the option was activated.
Definition at line 310 of file Xabsl2Option.h. Referenced by execute(). |
|
A pointer to the initial state.
Definition at line 313 of file Xabsl2Option.h. |
|
Used for error handling.
Definition at line 316 of file Xabsl2Option.h. |
|
A pointer to a function that returns the system time in ms.
Referenced by execute(). |