]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/SetupBrowserDxe/Expression.h
2 Private structure, MACRO and function definitions for User Interface related functionalities.
4 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #define _EXPRESSION_H_
13 Get the expression list count.
15 @param Level Which type this expression belong to. Form,
18 @retval >=0 The expression count
19 @retval -1 Input parameter error.
23 GetConditionalExpressionCount (
24 IN EXPRESS_LEVEL Level
28 Reset stack pointer to begin of the stack.
32 ResetCurrentExpressionStack (
37 Reset stack pointer to begin of the stack.
41 ResetMapExpressionListStack (
46 Reset stack pointer to begin of the stack.
55 Push an Operand onto the Stack
57 @param Operand Operand to push.
59 @retval EFI_SUCCESS The value was pushed onto the stack.
60 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
70 Get the expression Buffer pointer.
72 @param Level Which type this expression belong to. Form,
75 @retval The start pointer of the expression buffer or NULL.
79 GetConditionalExpressionList (
80 IN EXPRESS_LEVEL Level
84 Pop an Operand from the Stack
86 @param Operand Operand to pop.
88 @retval EFI_SUCCESS The value was pushed onto the stack.
89 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
99 Push the list of map expression onto the Stack
101 @param Pointer Pointer to the list of map expression to be pushed.
103 @retval EFI_SUCCESS The value was pushed onto the stack.
104 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
108 PushMapExpressionList (
113 Push current expression onto the Stack
115 @param Pointer Pointer to current expression.
117 @retval EFI_SUCCESS The value was pushed onto the stack.
118 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
122 PushCurrentExpression (
127 Zero extend integer/boolean/date/time to UINT64 for comparing.
129 @param Value HII Value to be converted.
134 IN EFI_HII_VALUE
*Value
138 Push the expression options onto the Stack.
140 @param Pointer Pointer to the current expression.
141 @param Level Which type this expression belong to. Form,
144 @retval EFI_SUCCESS The value was pushed onto the stack.
145 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
149 PushConditionalExpression (
150 IN FORM_EXPRESSION
*Pointer
,
151 IN EXPRESS_LEVEL Level
155 Pop the expression options from the Stack
157 @param Level Which type this expression belong to. Form,
160 @retval EFI_SUCCESS The value was pushed onto the stack.
161 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
165 PopConditionalExpression (
166 IN EXPRESS_LEVEL Level
170 Pop the list of map expression from the Stack
172 @param Pointer Pointer to the list of map expression to be pop.
174 @retval EFI_SUCCESS The value was pushed onto the stack.
175 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
179 PopMapExpressionList (
184 Pop current expression from the Stack
186 @param Pointer Pointer to current expression to be pop.
188 @retval EFI_SUCCESS The value was pushed onto the stack.
189 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
193 PopCurrentExpression (
198 Evaluate the result of a HII expression.
200 If Expression is NULL, then ASSERT.
202 @param FormSet FormSet associated with this expression.
203 @param Form Form associated with this expression.
204 @param Expression Expression to be evaluated.
206 @retval EFI_SUCCESS The expression evaluated successfuly
207 @retval EFI_NOT_FOUND The Question which referenced by a QuestionId
209 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
211 @retval EFI_ACCESS_DENIED The pop operation underflowed the stack
212 @retval EFI_INVALID_PARAMETER Syntax error with the Expression
217 IN FORM_BROWSER_FORMSET
*FormSet
,
218 IN FORM_BROWSER_FORM
*Form
,
219 IN OUT FORM_EXPRESSION
*Expression
222 Return the result of the expression list. Check the expression list and
223 return the highest priority express result.
224 Priority: DisableIf > SuppressIf > GrayOutIf > FALSE
226 @param ExpList The input expression list.
227 @param Evaluate Whether need to evaluate the expression first.
228 @param FormSet FormSet associated with this expression.
229 @param Form Form associated with this expression.
231 @retval EXPRESS_RESULT Return the higher priority express result.
232 DisableIf > SuppressIf > GrayOutIf > FALSE
236 EvaluateExpressionList (
237 IN FORM_EXPRESSION_LIST
*ExpList
,
239 IN FORM_BROWSER_FORMSET
*FormSet
, OPTIONAL
240 IN FORM_BROWSER_FORM
*Form OPTIONAL
244 Get Form given its FormId.
246 @param FormSet The formset which contains this form.
247 @param FormId Id of this form.
249 @retval Pointer The form.
250 @retval NULL Specified Form is not found in the formset.
255 IN FORM_BROWSER_FORMSET
*FormSet
,
259 #endif // _EXPRESSION_H