Diffusion C API  6.4.3
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
diffusion-recordv2-builder.h File Reference

Typedefs

typedef struct
DIFFUSION_RECORDV2_BUILDER_T 
DIFFUSION_RECORDV2_BUILDER_T
 Opaque recordv2 value builder data type.
 

Functions

DIFFUSION_RECORDV2_BUILDER_Tdiffusion_recordv2_builder_init ()
 Initialise a new recordv2 builder. More...
 
void diffusion_recordv2_builder_add_record (const DIFFUSION_RECORDV2_BUILDER_T *recordv2_builder, char **fields)
 Adds a new record comprising the specified field values. More...
 
void diffusion_recordv2_builder_add_record_with_list (const DIFFUSION_RECORDV2_BUILDER_T *recordv2_builder, LIST_T *fields)
 Adds a new record comprising the specified field values. More...
 
void diffusion_recordv2_builder_add_fields (const DIFFUSION_RECORDV2_BUILDER_T *recordv2_builder, char **values)
 Adds one or more field values. More...
 
void diffusion_recordv2_builder_add_fields_with_list (const DIFFUSION_RECORDV2_BUILDER_T *recordv2_builder, LIST_T *values)
 Adds one or more field values. More...
 
void * diffusion_recordv2_builder_build (const DIFFUSION_RECORDV2_BUILDER_T *recordv2_builder)
 Builds a bytes representation of the current builder state. More...
 
void diffusion_recordv2_builder_clear (DIFFUSION_RECORDV2_BUILDER_T *recordv2_builder)
 Clears all current values from the builder allowing it to be reused to generate new data. More...
 
void diffusion_recordv2_builder_free (DIFFUSION_RECORDV2_BUILDER_T *recordv2_builder)
 Free a recordv2 builder. More...
 

Function Documentation

void diffusion_recordv2_builder_add_fields ( const DIFFUSION_RECORDV2_BUILDER_T recordv2_builder,
char **  values 
)

Adds one or more field values.

If there is a current record, this adds the fields to the end of the current record.

Parameters
recordv2_builderthe builder to modify
valuesfield values
void diffusion_recordv2_builder_add_fields_with_list ( const DIFFUSION_RECORDV2_BUILDER_T recordv2_builder,
LIST_T values 
)

Adds one or more field values.

If there is a current record, this adds the fields to the end of the current record.

Parameters
recordv2_builderthe builder to modify
valuesfield values
void diffusion_recordv2_builder_add_record ( const DIFFUSION_RECORDV2_BUILDER_T recordv2_builder,
char **  fields 
)

Adds a new record comprising the specified field values.

Parameters
recordv2_builderthe builder to modify
fieldsthe fields within the new record. If no fields are supplied, an empty record will be added.
void diffusion_recordv2_builder_add_record_with_list ( const DIFFUSION_RECORDV2_BUILDER_T recordv2_builder,
LIST_T fields 
)

Adds a new record comprising the specified field values.

Parameters
recordv2_builderthe builder to modify
fieldsthe fields within the new record. If no fields are supplied, an empty record will be added.
void* diffusion_recordv2_builder_build ( const DIFFUSION_RECORDV2_BUILDER_T recordv2_builder)

Builds a bytes representation of the current builder state.

Parameters
recordv2_builderthe builder to build
Returns
a bytes representation of the builder.
void diffusion_recordv2_builder_clear ( DIFFUSION_RECORDV2_BUILDER_T recordv2_builder)

Clears all current values from the builder allowing it to be reused to generate new data.

Parameters
recordv2_builderthe builder to clear
void diffusion_recordv2_builder_free ( DIFFUSION_RECORDV2_BUILDER_T recordv2_builder)

Free a recordv2 builder.

Parameters
recordv2_builderbuilder to be freed.
DIFFUSION_RECORDV2_BUILDER_T* diffusion_recordv2_builder_init ( )

Initialise a new recordv2 builder.

diffusion_recordv2_builder_free should be called on this pointer when no longer needed.

Returns
a recordv2 builder