OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
epr_record.h File Reference
#include <stdio.h>
Include dependency graph for epr_record.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  EPR_SRecordInfo
 

Functions

EPR_SRecordInfo * epr_get_record_info (EPR_SDatasetId *dataset_id)
 
EPR_SRecordInfo * epr_read_record_info (EPR_SProductId *product_id, EPR_SDatasetId *dataset_id)
 
void epr_read_sub_record_info (EPR_SProductId *product_id, FILE *db_file_istream, const char *parent_name, EPR_SPtrArray *field_infos)
 
EPR_SRecordInfo * epr_create_record_info (const char *dataset_name, EPR_SPtrArray *field_infos)
 
EPR_SRecord * epr_create_record_from_info (EPR_SRecordInfo *record_info)
 
char * epr_get_record_info_path (EPR_SProductId *product_id, const char *dataset_name)
 
void epr_free_record_info (EPR_SRecordInfo *record_info)
 

Function Documentation

◆ epr_create_record_from_info()

EPR_SRecord* epr_create_record_from_info ( EPR_SRecordInfo *  record_info)

Reads the record information with the given file path and returns the poiter at it.

Parameters
product_idthe the product file identifier
dataset_namethe name of the dataset
db_file_istreamthe DB-table file identifier
Returns
the the pointer at the record information. Creates a new record instance from the dataset specified by the given dataset name.
Parameters
thepointer at the record information. must not be NULL
Returns
the new record instance or NULL if an error occured.

Definition at line 315 of file epr_record.c.

◆ epr_create_record_info()

EPR_SRecordInfo* epr_create_record_info ( const char *  dataset_name,
EPR_SPtrArray *  field_infos 
)

Creates a new record_info for the record by the given dataset name.

Parameters
dataset_namethe name of the dataset, to which the record belongs to, must not be NULL
field_infosthe pointer at the strucrure with information of all fields wich belong to record, must not be NULL
Returns
the new record instance or NULL if an error occured.

Definition at line 61 of file epr_record.c.

◆ epr_free_record_info()

void epr_free_record_info ( EPR_SRecordInfo *  record_info)

Frees the memory allocated by the given record_info.

After calling this function the give record_info pointer gets invalid and should not be used anymore.

Parameters
record_infothe record to be released, if NULL the function immediately returns

Definition at line 109 of file epr_record.c.

◆ epr_get_record_info()

EPR_SRecordInfo* epr_get_record_info ( EPR_SDatasetId *  dataset_id)

Returns information about the structure of the records contained in a dataset specified by the given dataset_id.

Parameters
dataset_idthe the dataset identifier
Returns
the the pointer for the record structure information.

Definition at line 151 of file epr_record.c.

◆ epr_get_record_info_path()

char* epr_get_record_info_path ( EPR_SProductId *  product_id,
const char *  dataset_name 
)

◆ epr_read_record_info()

EPR_SRecordInfo* epr_read_record_info ( EPR_SProductId *  product_id,
EPR_SDatasetId *  dataset_id 
)

Definition at line 190 of file epr_record.c.

◆ epr_read_sub_record_info()

void epr_read_sub_record_info ( EPR_SProductId *  product_id,
FILE *  db_file_istream,
const char *  parent_name,
EPR_SPtrArray *  field_infos 
)