Next: MinSectionParser, Previous: MIN Parser API, Up: MIN Parser API
The MinParser
component functionality opens and reads test data. The purpose of MinParser
is to parse a required section of the test data. The section may be a whole test data file or some part of the data file.
The main functions of MinParser
are:
mp_create
for creating a parser with path and file information
mp_create_mem
mp_destroy
mp_section
mp_next_section
MinParser* mp_create(const TPtrC* path, const TPtrC* file, TCommentType comments)
ENOENT
: invalid path argument.
EACCES
: permission denied.
const TPtrC* path
const TPtrC* file
TCommentType comments
ENoComments
: Comments are included with parsing.
ECStyleComments
: The user wants to parse sections without c-style comments.
MinParser* mp_create_mem(const TPtrC* buffer, TCommentType comments)
const TPtrC* buffer
TCommentType comments
ENoComments
: Comments are included with parsing.
ECStyleComments
: The user wants to parse sections without c-style comments.
void mp_destroy(MinParser** mp)
MinParser** mp
INITPTR
pointer value is returned in mp pointer parameter if destroying operation completed successfully.
MinSectionParser* mp_section(MinParser *mp, const TPtrC* start_tag, const TPtrC* end_tag, int seeked)
If end tag is empty the parsing goes end of configuration file.
This function will parse next section after the earlier section if the sought parameter is set to 1.
If configuration file includes several sections with both start and end tags so sought parameter seeks the required section.
EINVAL
: invalid value was passed to the function.
MinParser *mp
const TPtrC* start_tag
If the start tag is empty, the parsing starts at the beginning of the file.
const TPtrC* end_tag
If the end tag is empty, the parsing goes to the end of the file.
int seeked
MinSectionParser* mp_next_section( MinParser *mp, const TPtrC* start_tag, const TPtrC* end_tag, int seeked)
If end tag is empty the parsing goes end of configuration file.
This method will parse next section after the earlier section if sought parameter is set to 1.
If configuration file includes several sections with both start and end tags so sought parameter seeks the required section.
:
EINVAL
: Invalid value was passed to the function.
MinParser *mp
const TPtrC* start_tag
If the start tag is empty, the parsing starts at the beginning of the file.
const TPtrC* end_tag
If the end tag is empty, the parsing goes to the end of the file.
int seeked
MinSectionParser
struct object.