TianoCore EDK2 master
Loading...
Searching...
No Matches
Expression.h File Reference

Go to the source code of this file.

Functions

INTN GetConditionalExpressionCount (IN EXPRESS_LEVEL Level)
 
VOID ResetCurrentExpressionStack (VOID)
 
VOID ResetMapExpressionListStack (VOID)
 
VOID ResetScopeStack (VOID)
 
EFI_STATUS PushScope (IN UINT8 Operand)
 
FORM_EXPRESSION ** GetConditionalExpressionList (IN EXPRESS_LEVEL Level)
 
EFI_STATUS PopScope (OUT UINT8 *Operand)
 
EFI_STATUS PushMapExpressionList (IN VOID *Pointer)
 
EFI_STATUS PushCurrentExpression (IN VOID *Pointer)
 
VOID ExtendValueToU64 (IN EFI_HII_VALUE *Value)
 
EFI_STATUS PushConditionalExpression (IN FORM_EXPRESSION *Pointer, IN EXPRESS_LEVEL Level)
 
EFI_STATUS PopConditionalExpression (IN EXPRESS_LEVEL Level)
 
EFI_STATUS PopMapExpressionList (OUT VOID **Pointer)
 
EFI_STATUS PopCurrentExpression (OUT VOID **Pointer)
 
EFI_STATUS EvaluateExpression (IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form, IN OUT FORM_EXPRESSION *Expression)
 
EXPRESS_RESULT EvaluateExpressionList (IN FORM_EXPRESSION_LIST *ExpList, IN BOOLEAN Evaluate, IN FORM_BROWSER_FORMSET *FormSet OPTIONAL, IN FORM_BROWSER_FORM *Form OPTIONAL)
 
FORM_BROWSER_FORMIdToForm (IN FORM_BROWSER_FORMSET *FormSet, IN UINT16 FormId)
 

Detailed Description

Private structure, MACRO and function definitions for User Interface related functionalities.

Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Expression.h.

Function Documentation

◆ EvaluateExpression()

EFI_STATUS EvaluateExpression ( IN FORM_BROWSER_FORMSET FormSet,
IN FORM_BROWSER_FORM Form,
IN OUT FORM_EXPRESSION Expression 
)

Evaluate the result of a HII expression.

If Expression is NULL, then ASSERT.

Parameters
FormSetFormSet associated with this expression.
FormForm associated with this expression.
ExpressionExpression to be evaluated.
Return values
EFI_SUCCESSThe expression evaluated successfuly
EFI_NOT_FOUNDThe Question which referenced by a QuestionId could not be found.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.
EFI_ACCESS_DENIEDThe pop operation underflowed the stack
EFI_INVALID_PARAMETERSyntax error with the Expression

Definition at line 2536 of file Expression.c.

◆ EvaluateExpressionList()

EXPRESS_RESULT EvaluateExpressionList ( IN FORM_EXPRESSION_LIST ExpList,
IN BOOLEAN  Evaluate,
IN FORM_BROWSER_FORMSET *FormSet  OPTIONAL,
IN FORM_BROWSER_FORM *Form  OPTIONAL 
)

Return the result of the expression list. Check the expression list and return the highest priority express result. Priority: DisableIf > SuppressIf > GrayOutIf > FALSE

Parameters
ExpListThe input expression list.
EvaluateWhether need to evaluate the expression first.
FormSetFormSet associated with this expression.
FormForm associated with this expression.
Return values
EXPRESS_RESULTReturn the higher priority express result. DisableIf > SuppressIf > GrayOutIf > FALSE

Definition at line 3732 of file Expression.c.

◆ ExtendValueToU64()

VOID ExtendValueToU64 ( IN EFI_HII_VALUE Value)

Zero extend integer/boolean/date/time to UINT64 for comparing.

Parameters
ValueHII Value to be converted.

Definition at line 2096 of file Expression.c.

◆ GetConditionalExpressionCount()

INTN GetConditionalExpressionCount ( IN EXPRESS_LEVEL  Level)

Get the expression list count.

Parameters
LevelWhich type this expression belong to. Form, statement or option?
Return values
>=0The expression count
-1Input parameter error.

Definition at line 423 of file Expression.c.

◆ GetConditionalExpressionList()

FORM_EXPRESSION ** GetConditionalExpressionList ( IN EXPRESS_LEVEL  Level)

Get the expression Buffer pointer.

Parameters
LevelWhich type this expression belong to. Form, statement or option?
Return values
Thestart pointer of the expression buffer or NULL.

Definition at line 450 of file Expression.c.

◆ IdToForm()

FORM_BROWSER_FORM * IdToForm ( IN FORM_BROWSER_FORMSET FormSet,
IN UINT16  FormId 
)

Get Form given its FormId.

Parameters
FormSetThe formset which contains this form.
FormIdId of this form.
Return values
PointerThe form.
NULLSpecified Form is not found in the formset.

Definition at line 767 of file Expression.c.

◆ PopConditionalExpression()

EFI_STATUS PopConditionalExpression ( IN EXPRESS_LEVEL  Level)

Pop the expression options from the Stack

Parameters
LevelWhich type this expression belong to. Form, statement or option?
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 523 of file Expression.c.

◆ PopCurrentExpression()

EFI_STATUS PopCurrentExpression ( OUT VOID **  Pointer)

Pop current expression from the Stack

Parameters
PointerPointer to current expression to be pop.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 243 of file Expression.c.

◆ PopMapExpressionList()

EFI_STATUS PopMapExpressionList ( OUT VOID **  Pointer)

Pop the list of map expression from the Stack

Parameters
PointerPointer to the list of map expression to be pop.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 594 of file Expression.c.

◆ PopScope()

EFI_STATUS PopScope ( OUT UINT8 *  Operand)

Pop an Operand from the Stack

Parameters
OperandOperand to pop.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 663 of file Expression.c.

◆ PushConditionalExpression()

EFI_STATUS PushConditionalExpression ( IN FORM_EXPRESSION Pointer,
IN EXPRESS_LEVEL  Level 
)

Push the expression options onto the Stack.

Parameters
PointerPointer to the current expression.
LevelWhich type this expression belong to. Form, statement or option?
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 479 of file Expression.c.

◆ PushCurrentExpression()

EFI_STATUS PushCurrentExpression ( IN VOID *  Pointer)

Push current expression onto the Stack

Parameters
PointerPointer to current expression.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 216 of file Expression.c.

◆ PushMapExpressionList()

EFI_STATUS PushMapExpressionList ( IN VOID *  Pointer)

Push the list of map expression onto the Stack

Parameters
PointerPointer to the list of map expression to be pushed.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 567 of file Expression.c.

◆ PushScope()

EFI_STATUS PushScope ( IN UINT8  Operand)

Push an Operand onto the Stack

Parameters
OperandOperand to push.
Return values
EFI_SUCCESSThe value was pushed onto the stack.
EFI_OUT_OF_RESOURCESThere is not enough system memory to grow the stack.

Definition at line 635 of file Expression.c.

◆ ResetCurrentExpressionStack()

VOID ResetCurrentExpressionStack ( VOID  )

Reset stack pointer to begin of the stack.

Definition at line 196 of file Expression.c.

◆ ResetMapExpressionListStack()

VOID ResetMapExpressionListStack ( VOID  )

Reset stack pointer to begin of the stack.

Definition at line 266 of file Expression.c.

◆ ResetScopeStack()

VOID ResetScopeStack ( VOID  )

Reset stack pointer to begin of the stack.

Definition at line 617 of file Expression.c.