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

Schema Record for RecordV2. More...

Typedefs

typedef struct
DIFFUSION_RECORDV2_SCHEMA_RECORD_T 
DIFFUSION_RECORDV2_SCHEMA_RECORD_T
 Opaque recordv2 schema record data type.
 

Functions

bool diffusion_recordv2_schema_record_get_fields (const DIFFUSION_RECORDV2_SCHEMA_RECORD_T *schema_record, LIST_T **fields, DIFFUSION_API_ERROR *error)
 Retrieves a copy of the ordered list of field definitions in the schema. More...
 
bool diffusion_recordv2_schema_record_get_name (const DIFFUSION_RECORDV2_SCHEMA_RECORD_T *schema_record, char **record_name, DIFFUSION_API_ERROR *error)
 Retrieves a copy of the node name. More...
 
bool diffusion_recordv2_schema_record_get_min (const DIFFUSION_RECORDV2_SCHEMA_RECORD_T *schema_record, int *min, DIFFUSION_API_ERROR *error)
 Retrieves minimum number of occurrences. More...
 
bool diffusion_recordv2_schema_record_get_max (const DIFFUSION_RECORDV2_SCHEMA_RECORD_T *schema_record, int *max, DIFFUSION_API_ERROR *error)
 Retrieves maximum number of occurrences. More...
 
bool diffusion_recordv2_schema_record_is_variable (const DIFFUSION_RECORDV2_SCHEMA_RECORD_T *schema_record, bool *is_variable, DIFFUSION_API_ERROR *error)
 Retrieves true if the node has variable multiplicity. More...
 
void diffusion_recordv2_schema_record_free (DIFFUSION_RECORDV2_SCHEMA_RECORD_T *schema_record)
 Free a schema record. More...
 

Detailed Description

Schema Record for RecordV2.

Function Documentation

void diffusion_recordv2_schema_record_free ( DIFFUSION_RECORDV2_SCHEMA_RECORD_T schema_record)

Free a schema record.

Parameters
schema_recordschema record to be freed
bool diffusion_recordv2_schema_record_get_fields ( const DIFFUSION_RECORDV2_SCHEMA_RECORD_T schema_record,
LIST_T **  fields,
DIFFUSION_API_ERROR error 
)

Retrieves a copy of the ordered list of field definitions in the schema.

There will be at least one.

Parameters
schema_recordthe schema record
fieldspopulated with a memory allocated LIST_T containing the records fields as DIFFUSION_RECORDV2_SCHEMA_FIELD_Ts. Must be freed after use.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the fields were successfully retrieved from the schema_record false, otherwise.
bool diffusion_recordv2_schema_record_get_max ( const DIFFUSION_RECORDV2_SCHEMA_RECORD_T schema_record,
int *  max,
DIFFUSION_API_ERROR error 
)

Retrieves maximum number of occurrences.

This will be a positive value greater than or equal to the "min" value, or -1 to indicate an unlimited number.

Parameters
schema_recordthe schema record
maxpopulated with the record's maximum number of occurrences.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the maximum was successfully retrieved from the schema_record. false, otherwise.
bool diffusion_recordv2_schema_record_get_min ( const DIFFUSION_RECORDV2_SCHEMA_RECORD_T schema_record,
int *  min,
DIFFUSION_API_ERROR error 
)

Retrieves minimum number of occurrences.

This may be 0 for a variable multiplicity field; otherwise, it will be a positive value.

Parameters
schema_recordthe schema record
minpopulated with the record's minimum number of occurrences.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the minimum was successfully retrieved from the schema_record false, otherwise.
bool diffusion_recordv2_schema_record_get_name ( const DIFFUSION_RECORDV2_SCHEMA_RECORD_T schema_record,
char **  record_name,
DIFFUSION_API_ERROR error 
)

Retrieves a copy of the node name.

Parameters
schema_recordthe schema record
record_namepopulated with a pointer to the record's name. Must be freed after use.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the name of the field was successfully retrieved from the schema_record false, otherwise.
bool diffusion_recordv2_schema_record_is_variable ( const DIFFUSION_RECORDV2_SCHEMA_RECORD_T schema_record,
bool *  is_variable,
DIFFUSION_API_ERROR error 
)

Retrieves true if the node has variable multiplicity.

i.e. min != max.

Parameters
schema_recordthe schema record
is_variablepopulated with a bool stating if the record has variable multiplicity.
errorpopulated if an error occurs. Can be NULL.
Returns
true if the records's variable multiplicity was successfully retrieved from the schema_record false, otherwise.