Synopsis

(macro) PDX_MSGT mda_ParseFile(long option, int model, char *file, MDA_ENT_FUNC *func)

Purpose

Parse a file into a model.

Description

The parser function for the specified model is invoked against a file. The parse function is defined by setting the parser field in the MODEL_INFO structure returned from the function mda_GetModelDefaults. The func argument specifies a function to be called for each entity as it is parsed and may be set to NULL. If specified, this function must have declared as:

.RS 3 PDX_MSGT foo (MDA_PTR db_ptr, void *entity) .RE When called, the entity with database pointer db_ptr will be locked at the address specified by entity. Any changes made to the entity will be permanent. The function should return a value of MDA_NOERR. Not all interface parsers support a function being called from the parser, see the xxxx_ParseFile man page for a specific interface for more information.

Input

option

Options to be passed to parser

model

Model to parse

file

File to be parsed

func

Function to be invoked for each entity or NULL

Return

Error code from the parser