ui_expression.c File Reference

#include "ui_expression.h"
#include "ui_main.h"
#include "ui_internal.h"
#include "ui_parse.h"
#include "ui_actions.h"
#include "node/ui_node_abstractnode.h"
#include "../../shared/parse.h"
Include dependency graph for ui_expression.c:

Go to the source code of this file.

Functions

uiNode_tUI_GetNodeFromExpression (uiAction_t *expression, const uiCallContext_t *context, const value_t **property)
 Get a node and a property from an expression.
float UI_GetFloatFromExpression (uiAction_t *expression, const uiCallContext_t *context)
const char * UI_GetStringFromExpression (uiAction_t *expression, const uiCallContext_t *context)
qboolean UI_GetBooleanFromExpression (uiAction_t *expression, const uiCallContext_t *context)
 Check if an expression is true.
uiAction_tUI_AllocStaticStringCondition (const char *description)
 Allocate and initialize an expression according to a string.
static uiAction_tUI_ParseValueExpression (const char **text)
 Read a value from the stream and init an action with it.
uiAction_tUI_ParseExpression (const char **text)

Detailed Description

Definition in file ui_expression.c.


Function Documentation

uiAction_t* UI_AllocStaticStringCondition ( const char *  description  )  [read]

Allocate and initialize an expression according to a string.

Parameters:
[in] description String describing a condition
Returns:
The condition if everything is ok, NULL otherwise

Definition at line 521 of file ui_expression.c.

References Com_Printf(), uiNode_s::text, UI_ParseExpression(), and va().

Referenced by UI_ParseProperty().

qboolean UI_GetBooleanFromExpression ( uiAction_t expression,
const uiCallContext_t context 
)
float UI_GetFloatFromExpression ( uiAction_t expression,
const uiCallContext_t context 
)
uiNode_t* UI_GetNodeFromExpression ( uiAction_t expression,
const uiCallContext_t context,
const value_t **  property 
)

Get a node and a property from an expression.

Parameters:
expression Expression tree to analyse
context Call context
[out] property A node property
Returns:
A node (else NULL, if no node found) and a property (else NULL if no/wrong property defined)

Definition at line 40 of file ui_expression.c.

References Com_Printf(), uiAction_s::d, EA_HIGHT_MASK, EA_OPERATOR_PATHPROPERTYFROM, EA_OPERATOR_UNARY, EA_VALUE, EA_VALUE_NODE, EA_VALUE_PARENT, EA_VALUE_PATHNODE, EA_VALUE_PATHNODE_WITHINJECTION, EA_VALUE_PATHPROPERTY, EA_VALUE_PATHPROPERTY_WITHINJECTION, EA_VALUE_THIS, EA_VALUE_VAR, EA_VALUE_WINDOW, uiValue_s::node, uiAction_s::nonTerminal, uiNode_s::parent, qfalse, uiNode_s::root, uiCallContext_s::source, uiAction_s::terminal, uiValue_s::type, uiAction_s::type, UI_GenInjectedString(), UI_GetPath(), UI_GetVariable(), UI_ReadNodePath(), and uiValue_s::value.

Referenced by UI_GetFloatFromExpression(), and UI_GetStringFromExpression().

const char* UI_GetStringFromExpression ( uiAction_t expression,
const uiCallContext_t context 
)
uiAction_t* UI_ParseExpression ( const char **  text  )  [read]
static uiAction_t* UI_ParseValueExpression ( const char **  text  )  [static]

Read a value from the stream and init an action with it.

Returns:
An initialized action else NULL

Todo:
when it is possible, we must check range of param id
Todo:
We MUST remove the OLD code as fast as possible
Todo:
use a better check - e.g. Com_ParseValue with V_INT or V_FLOAT

Definition at line 541 of file ui_expression.c.

References Com_Error(), Com_Parse(), Com_ParsedTokenIsQuoted(), Com_Printf(), uiAction_s::d, EA_VALUE_CVARNAME, EA_VALUE_CVARNAME_WITHINJECTION, EA_VALUE_FLOAT, EA_VALUE_PARAM, EA_VALUE_PARAMCOUNT, EA_VALUE_PATHNODE, EA_VALUE_PATHNODE_WITHINJECTION, EA_VALUE_PATHPROPERTY, EA_VALUE_PATHPROPERTY_WITHINJECTION, EA_VALUE_STRING, EA_VALUE_STRING_WITHINJECTION, ERR_FATAL, f, i, Q_strcasecmp, Q_strncasecmp(), uiAction_s::terminal, uiAction_s::type, UI_AllocStaticAction(), UI_AllocStaticString(), UI_IsInjectedString(), and va().

Referenced by UI_ParseExpression().


Generated by  doxygen 1.6.2