#include <file.h>
Collaboration diagram for FileConfig:
This class will take an file as an argument to its constructor, and parse that file and have members that will contain the contents of the file.
Public Member Functions | |
FileConfig () | |
Default constructor, with what probably aren't sensible values. | |
int | loadConfig (const char *filename=NULL) |
Load details from file. | |
int | saveConfig (void) |
Save the configuration to whatever file we can. | |
const scrnsize | getScreenSize (void) |
Return the requested screen characteristics (size, depth). | |
const int | getScreenSizeX (void) |
Return screen width. | |
const int | getScreenSizeY (void) |
Return screen height. | |
const bool | getFS (void) |
Whether to start in fullscreen or not. |
|
Default constructor, with what probably aren't sensible values.
|
|
Load details from file. The interesting part. Load configuration data from a file. If a string is passed to the function then try to open that first. Otherwise $HOME/.graviton is used.
|
|
Save the configuration to whatever file we can. First try a user-specified one, then $HOME/.graviton. |