xabsl::Action Class Reference#include <XabslAction.h>
Inheritance diagram for xabsl::Action:
[legend]List of all members.
Detailed Description
Represents an action execution.
This is either a subsequent option or basic behavior to be executed, or an output symbol assignment.
- Author:
- Max Risler
Definition at line 31 of file XabslAction.h.
|
Public Member Functions |
| | Action (const unsigned &time) |
| | Constructor.
|
| virtual | ~Action () |
| | Virtual destructor.
|
| virtual void | execute ()=0 |
| | Execute the behavior or assign the output symbol.
|
| Behavior * | getBehavior () |
| | Returns a pointer to the option or basic behavior to be executed, or 0 if an output symbol is set.
|
| const Behavior * | getBehavior () const |
| Option * | getOption () |
| | Returns a pointer to the option, if an option is to be executed, 0 otherwise.
|
| const Option * | getOption () const |
| BasicBehavior * | getBasicBehavior () |
| | Returns a pointer to the basic behavior, if a basic behavior is to be executed, 0 otherwise.
|
| const BasicBehavior * | getBasicBehavior () const |
| ParameterAssignment * | getParameters () |
| | Returns a pointer to the parameter assignments for an option or basic behavior, or 0 if an output symbol is set.
|
| const ParameterAssignment * | getParameters () const |
| const DecimalOutputSymbol * | getDecimalOutputSymbol () const |
| | Returns a pointer to the output symbol, if a decimal output symbol is to be assigned, 0 otherwise.
|
| const BooleanOutputSymbol * | getBooleanOutputSymbol () const |
| | Returns a pointer to the output symbol, if a boolean output symbol is to be assigned, 0 otherwise.
|
| const EnumeratedOutputSymbol * | getEnumeratedOutputSymbol () const |
| | Returns a pointer to the output symbol, if an enumerated output symbol is to be assigned, 0 otherwise.
|
| double | getDecimalOutputSymbolValue () const |
| | Returns the last symbol value, if a decimal output symbol is to be assigned, 0 otherwise.
|
| bool | getBooleanOutputSymbolValue () const |
| | Returns the last symbol value, if a boolean output symbol is to be assigned, 0 otherwise.
|
| int | getEnumeratedOutputSymbolValue () const |
| | Returns the last symbol value, if an enumerated output symbol is to be assigned, 0 otherwise.
|
Static Public Member Functions |
| Action * | create (InputSource &input, NamedArray< Option * > &options, NamedArray< BasicBehavior * > &basicBehaviors, Symbols &symbols, Option &option, State &state, ErrorHandler &errorHandler, const unsigned &time) |
| | Creates an action definition.
|
| Action * | create (Behavior *behavior, ErrorHandler &errorHandler, const unsigned &time) |
| | Creates an action definition which just calls a single option or basic behavior without setting any parameters.
|
Protected Attributes |
| const unsigned & | time |
| | The system time in ms.
|
Constructor & Destructor Documentation
| xabsl::Action::Action |
( |
const unsigned & |
time |
) |
[inline] |
|
|
|
Constructor.
- Parameters:
-
| time | The system time in ms. |
Definition at line 38 of file XabslAction.h. |
| virtual xabsl::Action::~Action |
( |
|
) |
[inline, virtual] |
|
Member Function Documentation
|
|
Creates an action definition.
- Parameters:
-
| input | An input source for the intermediate code. It must be opened and read until A position where a state starts. |
| options | All available options |
| basicBehaviors | All available basicBehaviors |
| symbols | All available symbols |
| option | The current option |
| state | The current state |
| errorHandler | A reference to a ErrorHandler instance |
| time | The system time in ms. |
Definition at line 16 of file XabslAction.cpp.
References xabsl::ActionBasicBehavior::basicBehavior, xabsl::ActionBooleanOutputSymbol::booleanOutputSymbol, xabsl::ActionBooleanOutputSymbol::booleanOutputSymbolExpression, xabsl::Symbols::booleanOutputSymbols, xabsl::ParameterAssignment::create(), xabsl::ActionDecimalOutputSymbol::decimalOutputSymbol, xabsl::ActionDecimalOutputSymbol::decimalOutputSymbolExpression, xabsl::Symbols::decimalOutputSymbols, xabsl::ActionEnumeratedOutputSymbol::enumeratedOutputSymbol, xabsl::ActionEnumeratedOutputSymbol::enumeratedOutputSymbolExpression, xabsl::Symbols::enumeratedOutputSymbols, xabsl::EnumeratedOutputSymbol::enumeration, xabsl::ErrorHandler::error(), xabsl::ErrorHandler::errorsOccurred, xabsl::NamedArray< EnumeratedOutputSymbol * >::exists(), xabsl::NamedArray< BooleanOutputSymbol * >::exists(), xabsl::NamedArray< DecimalOutputSymbol * >::exists(), xabsl::NamedArray< T >::exists(), xabsl::ErrorHandler::message(), xabsl::ActionOption::option, xabsl::Behavior::parameters, xabsl::ActionBehavior::parameters, xabsl::InputSource::readString(), and XABSL_DEBUG_INIT. |
Here is the call graph for this function:
| virtual void xabsl::Action::execute |
( |
|
) |
[pure virtual] |
|
| Behavior * xabsl::Action::getBehavior |
( |
|
) |
|
|
Here is the call graph for this function:
| const Behavior * xabsl::Action::getBehavior |
( |
|
) |
const |
|
Here is the call graph for this function:
| Option * xabsl::Action::getOption |
( |
|
) |
|
|
| const Option * xabsl::Action::getOption |
( |
|
) |
const |
|
| double xabsl::Action::getDecimalOutputSymbolValue |
( |
|
) |
const |
|
| bool xabsl::Action::getBooleanOutputSymbolValue |
( |
|
) |
const |
|
| int xabsl::Action::getEnumeratedOutputSymbolValue |
( |
|
) |
const |
|
Member Data Documentation
The documentation for this class was generated from the following files:
Up | Main Page | Generated at Wed Aug 19 17:32:29 2009.
|