DocTest
testing Doxygen for my C library
 All Data Structures Files Functions
DtMyParser.h
Go to the documentation of this file.
1 #ifndef DT_MY_PARSER
2 #define DT_MY_PARSER
3 
4 #include <stdio.h>
5 #include "DtMyObject.h"
6 
7 /**
8  * @file DtMyParser.h
9  * @brief API for the DtMyParser class
10  *
11  * The DtMyParser class is used for parsing DtMyObjects from data files.
12  */
13 
14 /**
15  * @struct DtMyParser
16  * @brief Data structure of the DtMyParser class
17  */
18 typedef struct DtMyParser DtMyParser;
19 
20 /**
21  * @brief Destructor for DtMyParser class
22  * @param parser parser object to be destroyed
23  */
24 void dt_my_parser_delete(DtMyParser *parser);
25 
26 /**
27  * @brief Constructor for DtMyParser class
28  * @param filename path of the data file to be parsed
29  * @return a new parser object
30  */
31 DtMyParser *dt_my_parser_new(const char *filename);
32 
33 /**
34  * @brief Constructor for DtMyParser class
35  *
36  * Alternative constructor for the DtMyParser class, using a filehandle instead
37  * of a filename. The user is responsible to close the file handle after
38  * destroying this object.
39  *
40  * @param file handle to the data file to be parsed
41  * @return a new parser object
42  */
44 
45 /**
46  * @brief Retrieve the next object from the data file
47  * @param parser parser object
48  * @return the next object in the data file, or NULL if the object stream is
49  * exhausted
50  */
52 
53 #endif
API for the DtMyObject class.
void dt_my_parser_delete(DtMyParser *parser)
Destructor for DtMyParser class.
DtMyParser * dt_my_parser_new_from_fh(FILE *file)
Constructor for DtMyParser class.
DtMyObject * dt_my_parser_next_object(DtMyParser *parser)
Retrieve the next object from the data file.
DtMyParser * dt_my_parser_new(const char *filename)
Constructor for DtMyParser class.
Data structure of the DtMyParser class.
Data structure of the DtMyObject class.