#include "adt/list.h"
#include "mdio/file.h"
Go to the source code of this file.
Classes | |
| struct | mdio_ConfigData_t |
| Configuration file data structure. More... | |
| struct | mdio_Config_t |
| Configuration file reader class. More... | |
Typedefs | |
| typedef mdio_ConfigData_t | mdio_ConfigData |
| Configuration file data structure. | |
| typedef mdio_Config_t | mdio_Config |
| Configuration file reader class. | |
Functions | |
| mdio_Config * | mdio_createConfig (void) |
| Constructor. | |
| void | mdio_destroyConfig (mdio_Config *) |
| Destructor. | |
| int | mdio_readConfig (mdio_Config *, const char *name) |
| Read configuration file. | |
| mdio_ConfigData * | mdio_getDataConfig (mdio_Config *, int *len) |
| Obtain array of data. | |
| int | mdio_initializeConfig (mdio_Config *) |
| Alternative constructor. | |
| void | mdio_cleanupConfig (mdio_Config *) |
| Alternative destructor. | |
mdio_Config class reads one or more NAMD-style configuration files (keyword = value), compiling the results in an array of mdio_ConfigData structures. This array presents the results as separate keyword and value strings, where it is up to the user to further parse the value strings for any expected numeric values.The configuration file format is a text file that contains:
# this is a comment
keyword1=value1 # end-of-line comment
keyword2 value2
The mdio_Config class is derived from mdio_File so that error handling is performed by simply typecasting (mdio_Config *) to a (mdio_File *).
|
|
Configuration file reader class. Members should be treated as private. |
|
|
Configuration file data structure.
This provides the data parsed from a line of a configuration file. An array of |
|
|
Alternative destructor.
Use to destroy a preallocated configuration file reader object (i.e. one constructed using |
|
|
Constructor. Creates dynamically allocated configuration file reader object.
|
|
|
Destructor.
Frees dynamically allocated configuration file reader object after freeing the
Note that the |
|
||||||||||||
|
Obtain array of data.
|
|
|
Alternative constructor.
Use to construct a preallocated configuration file reader object. See |
|
||||||||||||
|
Read configuration file.
mdio_ConfigData structure saved into a list.
Each
|
1.3.9.1