UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
uiAction_s Struct Reference

Atomic element to store UI scripts The parser use this atom to translate script action into many trees of actions. One function is one tree, and when we call this function, the tree is executed. More...

#include <ui_actions.h>

Data Fields

short type
 Define the type of the element, it can be a command, an operator, or a value. More...
 
short subType
 Some operators/commands/values can use it to store info about the content. More...
 
union {
   struct {
      struct uiAction_s *   left
 
      struct uiAction_s *   right
 
   }   nonTerminal
 Stores a none terminal action (a command or an operator) More...
 
   struct {
      uiTerminalActionData_t   d1
 
      uiTerminalActionData_t   d2
 
   }   terminal
 Stores a terminal action (a value, which must be a leaf in the tree) More...
 
d
 Stores data about the action. More...
 
struct uiAction_snext
 Next element in the action list. More...
 

Detailed Description

Atomic element to store UI scripts The parser use this atom to translate script action into many trees of actions. One function is one tree, and when we call this function, the tree is executed.

An atom can be a command, an operator, or a value:

  • Each command (EA_ACTION like EA_CALL, EA_CMD...) uses its own action structure. It can sometimes use child actions, or can be a leaf.
  • Operators (EA_OPERATOR_*) use binary tree structure (left and right operands), else are unary.
  • A value (EA_VALUE_*) is a terminal action (a leaf).
Todo:
FIXME Merge terminal and nonTerminal, this way is finally stupid. Left can be terminal and right can be non terminal, then the structure make non sens and can create hidden bugs.

Definition at line 144 of file ui_actions.h.

Field Documentation

uiTerminalActionData_t uiAction_s::d1

Definition at line 175 of file ui_actions.h.

uiTerminalActionData_t uiAction_s::d2

Definition at line 176 of file ui_actions.h.

struct uiAction_s* uiAction_s::left

Definition at line 165 of file ui_actions.h.

struct uiAction_s* uiAction_s::next
struct { ... } uiAction_s::nonTerminal
struct uiAction_s* uiAction_s::right

Definition at line 166 of file ui_actions.h.

short uiAction_s::subType

Some operators/commands/values can use it to store info about the content.

Definition at line 154 of file ui_actions.h.


The documentation for this struct was generated from the following file: