NativeEnumerated.c vars NULL init and check
[com/asn1c.git] / libasn1fix / asn1fix_value.h
1 /*
2  * Functions related with processing values.
3  */
4 #ifndef ASN1FIX_VALUE_H
5 #define ASN1FIX_VALUE_H
6
7 struct asn1p_namespace_s;   /* Forward declaration */
8
9 /*
10  * Resolve the value given by reference.
11  * This function also takes a parameter which specifies the desired
12  * value's type.
13  * 
14  * RETURN VALUES:
15  * 0:           Value resolved successfully.
16  * -1/EPERM:    Recursive looping detected.
17  * -1/EEXIST:   Reference is not compatible with the desired type.
18  * -1/ESRCH:    Cannot find the terminal reference.
19  */
20 int asn1f_value_resolve(arg_t *arg, asn1p_expr_t *tc,
21                         const enum asn1p_constraint_type_e *opt_constr_type);
22
23 /*
24  * Check if a value in value_expr refers to the enumeration or integer element
25  * within the type provided. If yes, it will replace referenced value with
26  * the appropriate inline value.
27  */
28 int asn1f_look_value_in_type(arg_t *arg,
29                 asn1p_expr_t *type_expr, asn1p_expr_t *value_expr);
30
31 #endif  /* ASN1FIX_VALUE_H */