RSE-Model/RSPModelLib/src/hob_parser.h

53 lines
1.7 KiB
C

/**
* @file hob_parser.h
* @date 18/08/2022
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief Process HOB file structure and extract its datas.
*
*/
#include "options.h"
#include "RSPModel_datatypes.h"
#ifndef SRC_HOB_PARSER_H_
#define SRC_HOB_PARSER_H_
/**
* @brief Process HOB file stored in memory.
* @details Parser will directly extract objects count and information stored in
* HOB file and store them in T_RSPMODEL_HOB structure.
* @note Unmanaged mode
*
* @param[in] pMemFile Pointer to an in-memory HOB file location.
* @param[out] hob_struct Allocated empty T_RSPMODEL_HOB structure instance to
* be filled with HOB datas.
* @param[in] p_opts Parser options. DEPRECATED.
*
* @return Processing error code, RSPLIB_SUCCESS if no error.
*/
unsigned char RSP_ModelLib_ParseHOBMemFile(const MEMFILE pMemFile,
T_RSPMODEL_HOB* hob_struct, T_PROG_OPTIONS* p_opts);
/**
* @brief Process HOB file in file system.
* @details HOB file is dumped in memory before parsing in order to enhance
* performance during parser operation and in optic to protect data
* stored in the original file (read-only).
* Parser will extract objects count and information stored in HOB file
* and store them in T_RSPMODEL_HOB structure.
* @note Managed mode
*
* @param[in] fileName String value of file name/path.
* @param[out] hob_struct Allocated empty T_RSPMODEL_HOB structure instance to
* be filled with HOB datas.
* @param[in] p_opts Parser options. DEPRECATED.
*
* @return Processing error code, RSPLIB_SUCCESS if no error.
*/
unsigned char RSP_ModelLib_ParseHOBFile(const char* fileName,
T_RSPMODEL_HOB* hob_struct, T_PROG_OPTIONS* p_opts);
#endif /* SRC_HOB_PARSER_H_ */