![]() |
Diffusion C API 6.11.5
|
Schema Builder for RecordV2. More...
Typedefs | |
typedef struct DIFFUSION_RECORDV2_SCHEMA_BUILDER_T | DIFFUSION_RECORDV2_SCHEMA_BUILDER_T |
Opaque recordv2 schema builder data type. | |
Functions | |
DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | diffusion_recordv2_schema_builder_init () |
Initialise a new recordv2 schema builder. | |
bool | diffusion_recordv2_schema_builder_record (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *record_name, DIFFUSION_API_ERROR *error) |
Add a new single occurrence record to the schema. | |
bool | diffusion_recordv2_schema_builder_record_with_occurs (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *record_name, int occurs, DIFFUSION_API_ERROR *error) |
Add a new single occurrence record to the schema. | |
bool | diffusion_recordv2_schema_builder_record_with_min_max (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *record_name, int min, int max, DIFFUSION_API_ERROR *error) |
Add a new single occurrence record to the schema. | |
bool | diffusion_recordv2_schema_builder_string (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, DIFFUSION_API_ERROR *error) |
Add a single occurrence string field to the current record. | |
bool | diffusion_recordv2_schema_builder_string_with_occurs (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, int occurs, DIFFUSION_API_ERROR *error) |
Add a single occurrence string field to the current record. | |
bool | diffusion_recordv2_schema_builder_string_with_min_max (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, int min, int max, DIFFUSION_API_ERROR *error) |
Add a single occurrence string field to the current record. | |
bool | diffusion_recordv2_schema_builder_integer (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, DIFFUSION_API_ERROR *error) |
Add a single occurrence integer field to the current record. | |
bool | diffusion_recordv2_schema_builder_integer_with_occurs (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, int occurs, DIFFUSION_API_ERROR *error) |
Add a single occurrence integer field to the current record. | |
bool | diffusion_recordv2_schema_builder_integer_with_min_max (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, int min, int max, DIFFUSION_API_ERROR *error) |
Add a single occurrence integer field to the current record. | |
bool | diffusion_recordv2_schema_builder_decimal (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, int scale, DIFFUSION_API_ERROR *error) |
Add a single occurrence decimal field to the current record. | |
bool | diffusion_recordv2_schema_builder_decimal_with_occurs (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, int scale, int occurs, DIFFUSION_API_ERROR *error) |
Add a single occurrence decimal field to the current record. | |
bool | diffusion_recordv2_schema_builder_decimal_with_min_max (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, const char *field_name, int scale, int min, int max, DIFFUSION_API_ERROR *error) |
Add a single occurrence decimal field to the current record. | |
DIFFUSION_RECORDV2_SCHEMA_T * | diffusion_recordv2_schema_builder_build (const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder, DIFFUSION_API_ERROR *error) |
Build an immutable Schema. | |
void | diffusion_recordv2_schema_builder_free (DIFFUSION_RECORDV2_SCHEMA_BUILDER_T *recordv2_schema_builder) |
Free a recordv2 schema builder. | |
Schema Builder for RecordV2.
DIFFUSION_RECORDV2_SCHEMA_T * diffusion_recordv2_schema_builder_build | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
DIFFUSION_API_ERROR * | error | ||
) |
Build an immutable Schema.
At least one record with at least one field must have been added to the builder. diffusion_recordv2_schema_free
should be called on this pointer when no longer needed.
recordv2_schema_builder | the schema builder |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_decimal | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
int | scale, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence decimal field to the current record.
This is the equivalent of calling: recordv2_schema_builder_decimal_with_occurs(builder, name, scale, 1)
.
recordv2_schema_builder | the schema builder |
field_name | the field name |
scale | the scale of the field (the number of decimal places). This must be a positive value. |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_decimal_with_min_max | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
int | scale, | ||
int | min, | ||
int | max, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence decimal field to the current record.
A field may not be added after a field that has variable multiplicity (min != max).
recordv2_schema_builder | the schema builder |
field_name | the field name |
scale | the scale of the field (the number of decimal places). This must be a positive value. |
min | the minimum number of occurrences of the record. This must not be negative. |
max | the maximum number of occurrences of the record. This must either be -1 to indicate an unlimited number or it must be a positive number greater than or equal to "min". |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_decimal_with_occurs | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
int | scale, | ||
int | occurs, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence decimal field to the current record.
This is the equivalent of calling: recordv2_schema_builder_decimal_with_min_max(builder, name, scale, occurs, occurs)
.
recordv2_schema_builder | the schema builder |
field_name | the field name |
scale | the scale of the field (the number of decimal places). This must be a positive value. |
occurs | the fixed number of times the field should occur within the record. This must be positive. |
error | populated if an error occurs. Can be NULL. |
void diffusion_recordv2_schema_builder_free | ( | DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder | ) |
Free a recordv2 schema builder.
recordv2_schema_builder | the schema builder to be freed. |
DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * diffusion_recordv2_schema_builder_init | ( | ) |
Initialise a new recordv2 schema builder.
diffusion_recordv2_schema_builder_free
should be called on this pointer when no longer needed.
bool diffusion_recordv2_schema_builder_integer | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence integer field to the current record.
This is the equivalent of calling: recordv2_schema_builder_integer_with_occurs(builder, name, 1)
.
recordv2_schema_builder | the schema builder |
field_name | the field name |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_integer_with_min_max | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
int | min, | ||
int | max, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence integer field to the current record.
A field may not be added after a field that has variable multiplicity (min != max).
recordv2_schema_builder | the schema builder |
field_name | the field name |
min | the minimum number of occurrences of the record. This must not be negative |
max | the maximum number of occurrences of the record. This must either be -1 to indicate an unlimited number or it must be a positive number greater than or equal to "min" |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_integer_with_occurs | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
int | occurs, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence integer field to the current record.
This is the equivalent to calling: recordv2_schema_builder_integer_with_min_max(builder, name, occurs, occurs)
.
recordv2_schema_builder | the schema builder |
field_name | the field name |
occurs | the fixed number of times the field should occur within the record. This must be positive |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_record | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | record_name, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a new single occurrence record to the schema.
This is the equivalent to calling: recordv2_schema_builder_record_with_occurs(builder, name, 1)
.
recordv2_schema_builder | the schema builder |
record_name | the record name |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_record_with_min_max | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | record_name, | ||
int | min, | ||
int | max, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a new single occurrence record to the schema.
A field may not be added after a field that has variable multiplicity (min != max).
recordv2_schema_builder | the schema builder |
record_name | the record name |
min | the minimum number of occurrences of the record. This must not be negative |
max | the maximum number of occurrences of the record. This must either be -1 to indicate an unlimited number or it must be a positive number greater than or equal to "min" |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_record_with_occurs | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | record_name, | ||
int | occurs, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a new single occurrence record to the schema.
This is the equivalent to calling: recordv2_schema_builder_record_with_min_max(builder, name, occurs, occurs)
.
recordv2_schema_builder | the schema builder |
record_name | the record name |
occurs | the number of times the record is to occur. This must be apositive value |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_string | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence string field to the current record.
This is the equivalent of calling: recordv2_schema_builder_string_with_occurs(builder, name, 1)
.
recordv2_schema_builder | the schema builder |
field_name | the field name |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_string_with_min_max | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
int | min, | ||
int | max, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence string field to the current record.
A field may not be added after a field that has variable multiplicity (min != max).
recordv2_schema_builder | the schema builder |
field_name | the field name |
min | the minimum number of occurrences of the record. This must not be negative |
max | the maximum number of occurrences of the record. This must either be -1 to indicate an unlimited number or it must be a positive number greater than or equal to "min" |
error | populated if an error occurs. Can be NULL. |
bool diffusion_recordv2_schema_builder_string_with_occurs | ( | const DIFFUSION_RECORDV2_SCHEMA_BUILDER_T * | recordv2_schema_builder, |
const char * | field_name, | ||
int | occurs, | ||
DIFFUSION_API_ERROR * | error | ||
) |
Add a single occurrence string field to the current record.
This is the equivalent to calling: recordv2_schema_builder_string_with_min_max(builder, name, occurs, occurs)
.
recordv2_schema_builder | the schema builder |
field_name | the field name |
occurs | the fixed number of times the field should occur within the record. This must be positive. |
error | populated if an error occurs. Can be NULL. |