UFO: Alien Invasion
Loading...
Searching...
No Matches
uiAction_t 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>

Collaboration diagram for uiAction_t:
Collaboration graph

Data Fields

short type
 Define the type of the element, it can be a command, an operator, or a value.
short subType
 Some operators/commands/values can use it to store info about the content.
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.
struct uiAction_s * next
 Next element in the action list.

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

◆ [union]

◆ d1

◆ d2

◆ left

◆ next

struct uiAction_s* uiAction_t::next

◆ [struct]

struct { ... } uiAction_t::nonTerminal

◆ right

◆ subType

short uiAction_t::subType

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

Definition at line 154 of file ui_actions.h.

◆ [struct]

◆ type


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