xabsl::State Class Reference#include <XabslState.h>
Inheritance diagram for xabsl::State:
[legend]Collaboration diagram for xabsl::State:
[legend]List of all members.
Detailed Description
Represents a single state written in.
- Author:
- Martin Loetzsch
Definition at line 32 of file XabslState.h.
|
Public Member Functions |
| State (const char *name, ErrorHandler &errorHandler, const unsigned &time, int optionIndex, int index) |
| Constructor.
|
| ~State () |
| Destructor.
|
void | create (InputSource &input, NamedArray< Option * > &options, NamedArray< BasicBehavior * > &basicBehaviors, NamedArray< State * > &states, Symbols &symbols) |
| Creates the state and it's subelements from the intermediate code.
|
virtual State * | getNextState () |
| Executes the decision tree and determines the next active state (can be the same).
|
void | reset () |
| Sets the time when the state was activated to 0.
|
bool | isTargetState () const |
| Returns wheter the state is a target state.
|
virtual bool | coopCheck () |
| Check whether this state can be entered, or whether entering is blocked due to cooperating agents.
|
virtual bool | getConflict () |
| Whether this state is currently conflicted, i.e whether cooperation conditions are violated.
|
Public Attributes |
Array< Action * > | actions |
| The actions of the state.
|
Option * | subsequentOption |
| The first subsequent option that is executed after that option if the state is active.
|
unsigned | timeOfStateExecution |
| The time how long the state is already active.
|
int | index |
| Index of the state in array states in corresponding option.
|
unsigned | timeWhenStateWasActivated |
| The time, when the state was activated.
|
int | optionIndex |
| Index of the corresponding option this state belongs to.
|
Protected Attributes |
bool | targetState |
| If true, the state is a target state.
|
ErrorHandler & | errorHandler |
| Used for error handling.
|
Statement * | decisionTree |
| The root element of the decision tree.
|
const unsigned & | time |
| The system time in ms.
|
Constructor & Destructor Documentation
xabsl::State::State |
( |
const char * |
name, |
|
|
ErrorHandler & |
errorHandler, |
|
|
const unsigned & |
time, |
|
|
int |
optionIndex, |
|
|
int |
index |
|
) |
|
|
|
Constructor.
Does not create the state. - Parameters:
-
name | The name of the state. For debugging purposes. |
errorHandler | A reference to a ErrorHandler instance |
time | The system time in ms. |
optionIndex | Index of the corresponding option this state belongs to |
index | Index of the state in array states in corresponding option |
Definition at line 20 of file XabslState.cpp. |
Here is the call graph for this function:
Member Function Documentation
|
Creates the state and it's subelements from the intermediate code.
- 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 |
states | All states of the option |
symbols | All available symbols |
Definition at line 41 of file XabslState.cpp.
References actions, xabsl::Array< Action * >::append(), decisionTree, xabsl::ErrorHandler::error(), xabsl::ErrorHandler::errorsOccurred, xabsl::ErrorHandler::message(), xabsl::ActionOption::option, optionIndex, xabsl::InputSource::readString(), xabsl::InputSource::readValue(), subsequentOption, targetState, and XABSL_DEBUG_INIT. |
Here is the call graph for this function:
State * xabsl::State::getNextState |
( |
|
) |
[virtual] |
|
Here is the call graph for this function:
void xabsl::State::reset |
( |
|
) |
|
|
bool xabsl::State::isTargetState |
( |
|
) |
const |
|
virtual bool xabsl::State::coopCheck |
( |
|
) |
[inline, virtual] |
|
virtual bool xabsl::State::getConflict |
( |
|
) |
[inline, virtual] |
|
Member Data Documentation
|
The first subsequent option that is executed after that option if the state is active.
If 0, no subsequent option is executed after that option. This pointer is present just for compatibility reasons, please use getactions instead
Definition at line 80 of file XabslState.h.
Referenced by create(). |
|
Index of the state in array states in corresponding option.
Definition at line 92 of file XabslState.h. |
|
Index of the corresponding option this state belongs to.
Definition at line 98 of file XabslState.h.
Referenced by create(). |
The documentation for this class was generated from the following files:
Up | Main Page | Generated at Wed Aug 19 17:32:31 2009.
|