Go to the documentation of this file.
1 
10 #ifndef SCANDIT_PARSER_RESULT_H_
11 #define SCANDIT_PARSER_RESULT_H_
12 
13 #include <stddef.h>
14 
15 #include <Scandit/ScByteArray.h>
16 #include <Scandit/ScCommon.h>
17 
19 
25 typedef struct ScOpaqueParserResult ScParserResult;
28 
34 typedef struct ScOpaqueField ScField;
37 
45 SC_EXPORT
47 
56 SC_EXPORT
58 
70 SC_EXPORT
72  char const *field_name);
73 
84 SC_EXPORT
85 ScField const *sc_parser_result_get_field_by_index(ScParserResult const *result, size_t index);
86 
96 SC_EXPORT
98 
111 SC_EXPORT
113 
125 SC_EXPORT
127 
138 SC_EXPORT
140 
151 SC_EXPORT
153 
164 SC_EXPORT
166 
178 SC_EXPORT
179 ScByteArray sc_field_get_issue(ScField const *field, uint32_t index);
180 
189 SC_EXPORT
190 size_t sc_field_get_issues_count(ScField const *field);
191 
193 
194 #endif // SCANDIT_PARSER_RESULT_H_
Functions to manage an array of bytes.
void sc_parser_result_free(ScParserResult *result)
Free the parsing result and any resource associated with it, including all its fields.
ScField const * sc_parser_result_get_field_by_name(ScParserResult const *result, char const *field_name)
Get the data associated with a field.
ScField const * sc_parser_result_get_field_by_index(ScParserResult const *result, size_t index)
Get the data associated with a field.
ScByteArray sc_field_get_name(ScField const *field)
Returns the name of the given field.
ScBool sc_parser_result_is_ok(ScParserResult const *result)
Returns true when result contains a valid result, false if an error occurred during parsing...
size_t sc_parser_result_get_fields_count(ScParserResult const *result)
Get number of fields of this result.
ScByteArray sc_field_get_issue(ScField const *field, uint32_t index)
Returns issue string at the given index.
Parser result field.
#define SC_EXTERN_C_BEGIN
Start of external C code.
Definition: ScConfig.h:19
#define SC_EXTERN_C_END
End of external C code.
Definition: ScConfig.h:28
ScByteArray sc_field_get_json_values(ScField const *field)
Returns the json representation of the given field.
ScByteArray sc_field_get_string_value(ScField const *field)
Returns the string value of the given field.
Common functions and data structures.
ScByteArray sc_parser_result_get_error_message(ScParserResult const *result)
Retrieve error message from parser result.
Parser result.
ScByteArray sc_parser_result_get_json_values(ScParserResult const *result)
Returns the json string value of the fields in a result.
size_t sc_field_get_issues_count(ScField const *field)
Returns number of issues for the given field.
A null terminated array of bytes.
int32_t ScBool
Boolean value, can be SC_TRUE or SC_FALSE.
Definition: ScConfig.h:158