]>
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 - 2013, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _EXPRESSION_H_
16 #define _EXPRESSION_H_
19 Get the expression list count.
21 @param Level Which type this expression belong to. Form,
24 @retval >=0 The expression count
25 @retval -1 Input parameter error.
29 GetConditionalExpressionCount (
30 IN EXPRESS_LEVEL Level
34 Reset stack pointer to begin of the stack.
38 ResetCurrentExpressionStack (
43 Reset stack pointer to begin of the stack.
47 ResetMapExpressionListStack (
52 Reset stack pointer to begin of the stack.
61 Push an Operand onto the Stack
63 @param Operand Operand to push.
65 @retval EFI_SUCCESS The value was pushed onto the stack.
66 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
76 Get the expression Buffer pointer.
78 @param Level Which type this expression belong to. Form,
81 @retval The start pointer of the expression buffer or NULL.
85 GetConditionalExpressionList (
86 IN EXPRESS_LEVEL Level
90 Pop an Operand from the Stack
92 @param Operand Operand to pop.
94 @retval EFI_SUCCESS The value was pushed onto the stack.
95 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
105 Push the list of map expression onto the Stack
107 @param Pointer Pointer to the list of map expression to be pushed.
109 @retval EFI_SUCCESS The value was pushed onto the stack.
110 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
114 PushMapExpressionList (
119 Push current expression onto the Stack
121 @param Pointer Pointer to current expression.
123 @retval EFI_SUCCESS The value was pushed onto the stack.
124 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
128 PushCurrentExpression (
133 Zero extend integer/boolean/date/time to UINT64 for comparing.
135 @param Value HII Value to be converted.
140 IN EFI_HII_VALUE
*Value
144 Push the expression options onto the Stack.
146 @param Pointer Pointer to the current expression.
147 @param Level Which type this expression belong to. Form,
150 @retval EFI_SUCCESS The value was pushed onto the stack.
151 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
155 PushConditionalExpression (
156 IN FORM_EXPRESSION
*Pointer
,
157 IN EXPRESS_LEVEL Level
161 Pop the expression options from the Stack
163 @param Level Which type this expression belong to. Form,
166 @retval EFI_SUCCESS The value was pushed onto the stack.
167 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
171 PopConditionalExpression (
172 IN EXPRESS_LEVEL Level
176 Pop the list of map expression from the Stack
178 @param Pointer Pointer to the list of map expression to be pop.
180 @retval EFI_SUCCESS The value was pushed onto the stack.
181 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
185 PopMapExpressionList (
190 Pop current expression from the Stack
192 @param Pointer Pointer to current expression to be pop.
194 @retval EFI_SUCCESS The value was pushed onto the stack.
195 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
199 PopCurrentExpression (
204 Evaluate the result of a HII expression.
206 If Expression is NULL, then ASSERT.
208 @param FormSet FormSet associated with this expression.
209 @param Form Form associated with this expression.
210 @param Expression Expression to be evaluated.
212 @retval EFI_SUCCESS The expression evaluated successfuly
213 @retval EFI_NOT_FOUND The Question which referenced by a QuestionId
215 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
217 @retval EFI_ACCESS_DENIED The pop operation underflowed the stack
218 @retval EFI_INVALID_PARAMETER Syntax error with the Expression
223 IN FORM_BROWSER_FORMSET
*FormSet
,
224 IN FORM_BROWSER_FORM
*Form
,
225 IN OUT FORM_EXPRESSION
*Expression
228 Return the result of the expression list. Check the expression list and
229 return the highest priority express result.
230 Priority: DisableIf > SuppressIf > GrayOutIf > FALSE
232 @param ExpList The input expression list.
233 @param Evaluate Whether need to evaluate the expression first.
234 @param FormSet FormSet associated with this expression.
235 @param Form Form associated with this expression.
237 @retval EXPRESS_RESULT Return the higher priority express result.
238 DisableIf > SuppressIf > GrayOutIf > FALSE
242 EvaluateExpressionList (
243 IN FORM_EXPRESSION_LIST
*ExpList
,
245 IN FORM_BROWSER_FORMSET
*FormSet
, OPTIONAL
246 IN FORM_BROWSER_FORM
*Form OPTIONAL
250 Get Form given its FormId.
252 @param FormSet The formset which contains this form.
253 @param FormId Id of this form.
255 @retval Pointer The form.
256 @retval NULL Specified Form is not found in the formset.
261 IN FORM_BROWSER_FORMSET
*FormSet
,
265 #endif // _EXPRESSION_H