#include <vcConfig.h>

Public Member Functions | |
| vcConfig () | |
| ~vcConfig () | |
| vcConfig (const vcConfig &) | |
| bool | loadFile (string) |
| bool | saveFile (string) |
| void | set (string, string) |
| void | set (string, bool) |
| void | set (string, int) |
| string | getString (string) |
| bool | getBool (string) |
| int | getInt (string) |
| string | toString () |
| void | fromString (string) |
| void | clear () |
| int | size () |
| bool | isSet (string) |
| bool | areSet (string[], int) |
| void | operator= (vcConfig) |
Static Public Member Functions | |
| static string | getVersion () |
Private Member Functions | |
| void | setReal (string, string) |
Private Attributes | |
| map< string, string > | items |
| map< string, string >::iterator | it |
Uses basic KEY=value Skips blank lines and lines starting with #
| vcConfig::vcConfig | ( | ) |
| vcConfig::~vcConfig | ( | ) |
| vcConfig::vcConfig | ( | const vcConfig & | _config | ) |
| bool vcConfig::loadFile | ( | string | file | ) |
Attempts to load a file containing configuration options.
| file | The file name to load. |
| bool vcConfig::saveFile | ( | string | file | ) |
Attempts to save the current configuration to a file. Be aware that this is a complete overwrite.
| file | The name of the file to save into. |
| void vcConfig::set | ( | string | index, | |
| string | value | |||
| ) |
Sets a configuration value.
| index | The configuration name. | |
| value | The configuration value. |
| void vcConfig::set | ( | string | index, | |
| bool | value | |||
| ) |
Sets a configuration value.
| index | The configuration name. | |
| value | The configuration value. |
| void vcConfig::set | ( | string | index, | |
| int | value | |||
| ) |
Sets a configuration value.
| index | The configuration name. | |
| value | The configuration value. |
| string vcConfig::getString | ( | string | index | ) |
Returns the string value of a configuration item.
| index | The configuration name. |
| bool vcConfig::getBool | ( | string | index | ) |
| int vcConfig::getInt | ( | string | index | ) |
Returns the string value of a configuration item.
| index | The configuration name. |
| string vcConfig::toString | ( | ) |
Dumps the configuration to a string. Good for debugging.
| void vcConfig::fromString | ( | string | ) |
| void vcConfig::clear | ( | ) |
Clears out all the config information.
| int vcConfig::size | ( | ) |
The size of the config.
| bool vcConfig::isSet | ( | string | index | ) |
Check if an index is set. May still be empty.
| index | The index to look for. |
| bool vcConfig::areSet | ( | string | indicies[], | |
| int | size | |||
| ) |
Checks that every index in the passed array has a set value. May still be empty, but they are still there.
| indicies | An array of indicies to check. | |
| size | The size of the array. |
| string vcConfig::getVersion | ( | ) | [static] |
Get the version of the library. Don't know why you'd actually want this.
| void vcConfig::operator= | ( | vcConfig | right | ) |
| void vcConfig::setReal | ( | string | index, | |
| string | value | |||
| ) | [private] |
Everything is stored as a string, this set's it for real.
| index | The configuration name. | |
| value | The configuration value. |
map<string,string> vcConfig::items [private] |
map<string,string>::iterator vcConfig::it [private] |
1.5.5