Copied on 09 Aug 2012.
Fork of ConfigFile by
Diff: ConfigFile.h
- Revision:
- 4:940510a29b44
- Parent:
- 3:7250e339328c
- Child:
- 5:56d544b8e5c6
diff -r 7250e339328c -r 940510a29b44 ConfigFile.h --- a/ConfigFile.h Sun Sep 12 07:37:25 2010 +0000 +++ b/ConfigFile.h Sun Sep 12 07:53:10 2010 +0000 @@ -19,12 +19,12 @@ * Create a configuration file class. */ ConfigFile(); - + /** * Destroy a configuration file class. */ ~ConfigFile(); - + /** * Get a value for a key. * @@ -34,7 +34,7 @@ * @return A value or NULL. */ bool getValue(char *key, char *value, size_t siz); - + /** * Set a set of a key and value. * @@ -44,7 +44,7 @@ * @return True if it succeed. */ bool setValue(char *key, char *value); - + /** * Remove a config. * @@ -53,35 +53,36 @@ * @return True if it succeed. */ bool remove(char *key); - + /** * Remove all config. * * @return True if it succeed. */ bool removeAll(void); - + /** * Read from the target file. * * @param file A target file name. */ bool read(char *file); - + typedef enum { UNIX, MAC, DOS } FileFormat; - + /** * Write from the target file. * - * @param file A target file name. + * @param file A pointer to a file name. + * @param header A pointer to a header. * @param ff File format. */ - bool write(char *file, FileFormat ff = UNIX); - + bool write(char *file, char *header = NULL, FileFormat ff = UNIX); + /** * Output for debugging. *