2003-04-27 22:15:26 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
< html > < head > < meta http-equiv = "Content-Type" content = "text/html;charset=iso-8859-1" >
< title > ZE::ZConfigFile class Reference< / title >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" >
< / head > < body >
2003-07-05 00:40:44 +00:00
<!-- Generated by Doxygen 1.3 -->
2003-04-27 22:15:26 +00:00
< center >
< a class = "qindex" href = "index.html" > Main Page< / a > < a class = "qindex" href = "namespaces.html" > Namespace List< / a > < a class = "qindex" href = "annotated.html" > Compound List< / a > < a class = "qindex" href = "files.html" > File List< / a > < a class = "qindex" href = "namespacemembers.html" > Namespace Members< / a > < a class = "qindex" href = "functions.html" > Compound Members< / a > < a class = "qindex" href = "globals.html" > File Members< / a > < / center >
< hr > < h1 > ZE::ZConfigFile Class Reference< / h1 > < code > #include < < a class = "el" href = "ZE__ZConfigFile_8h-source.html" > ZE_ZConfigFile.h< / a > > < / code >
< p >
< a href = "classZE_1_1ZConfigFile-members.html" > List of all members.< / a > < hr > < a name = "_details" > < / a > < h2 > Detailed Description< / h2 >
< a class = "el" href = "classZE_1_1ZConfigFile.html" > ZConfigFile< / a > class for INI-style configuration files for games or applications. Inherited from ZObject.
< p >
< table border = 0 cellpadding = 0 cellspacing = 0 >
< tr > < td > < / td > < / tr >
2003-07-05 00:40:44 +00:00
< tr > < td colspan = 2 > < br > < h2 > Public Member Functions< / h2 > < / td > < / tr >
2003-04-27 22:15:26 +00:00
< tr > < td nowrap align = right valign = top > < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a0" > ZConfigFile< / a > ()< / td > < / tr >
2003-07-05 00:40:44 +00:00
< tr > < td > < / td > < td > < em class = "mdesc" > Default constructor.< / em > < a href = "#a0" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a1" > ZConfigFile< / a > (std::string filename)< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Constructor which takes filename.< / em > < a href = "#a1" > < / a > < em > < / em > < br > < br > < / td > < / tr >
2003-04-27 22:15:26 +00:00
< tr > < td nowrap align = right valign = top > virtual < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a2" > ~ZConfigFile< / a > ()< / td > < / tr >
2003-07-05 00:40:44 +00:00
< tr > < td > < / td > < td > < em class = "mdesc" > Destructor, flushes file.< / em > < a href = "#a2" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a3" > Process< / a > (std::string filename)< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Parse a file.< / em > < a href = "#a3" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > float < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a4" > GetFloat< / a > (std::string section, std::string var, float defVal) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Get value in floating point format from file.< / em > < a href = "#a4" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > int < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a5" > GetInt< / a > (std::string section, std::string var, int defVal) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Get value in integer format from file.< / em > < a href = "#a5" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > bool < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a6" > GetBool< / a > (std::string section, std::string var, bool defVal) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Get value in boolean format from file.< / em > < a href = "#a6" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > std::string < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a7" > GetString< / a > (std::string section, std::string var, std::string defVal) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Get value in std::string format from file.< / em > < a href = "#a7" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a8" > SetFloat< / a > (std::string section, std::string var, float val)< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Set value in floating point format in file.< / em > < a href = "#a8" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a9" > SetInt< / a > (std::string section, std::string var, int val)< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Set value in integer format in file.< / em > < a href = "#a9" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a10" > SetBool< / a > (std::string section, std::string var, bool val)< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Set value in boolean format in file.< / em > < a href = "#a10" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a11" > SetString< / a > (std::string section, std::string var, std::string val)< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Set value in std::string format in file.< / em > < a href = "#a11" > < / a > < em > < / em > < br > < br > < / td > < / tr >
2003-04-27 22:15:26 +00:00
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a12" > Flush< / a > ()< / td > < / tr >
2003-07-05 00:40:44 +00:00
< tr > < td > < / td > < td > < em class = "mdesc" > Write all values to file.< / em > < a href = "#a12" > < / a > < em > < / em > < br > < br > < / td > < / tr >
2003-04-27 22:15:26 +00:00
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#a13" > Close< / a > ()< / td > < / tr >
2003-07-05 00:40:44 +00:00
< tr > < td > < / td > < td > < em class = "mdesc" > Close the file.< / em > < a href = "#a13" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td colspan = 2 > < br > < h2 > Protected Member Functions< / h2 > < / td > < / tr >
< tr > < td nowrap align = right valign = top > std::string < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#b0" > CleanString< / a > (std::string str) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Reformat a std::string in a form more suitable to parsing.< / em > < a href = "#b0" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > bool < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#b1" > Exists< / a > (std::string sec) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Check if a section exists.< / em > < a href = "#b1" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > bool < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#b2" > Exists< / a > (std::string sec, std::string var) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Check if a variable exists.< / em > < a href = "#b2" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > void < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#b3" > SetVariable< / a > (std::string sec, std::string var, std::string val)< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Internal function to set variables.< / em > < a href = "#b3" > < / a > < em > < / em > < br > < br > < / td > < / tr >
< tr > < td nowrap align = right valign = top > std::string < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#b4" > GetVariable< / a > (std::string sec, std::string var, std::string defVal) const< / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Internal function to get value of a variable.< / em > < a href = "#b4" > < / a > < em > < / em > < br > < br > < / td > < / tr >
2003-04-27 22:15:26 +00:00
< tr > < td colspan = 2 > < br > < h2 > Protected Attributes< / h2 > < / td > < / tr >
< tr > < td nowrap align = right valign = top > < a name = "n0" doxytag = "ZE::ZConfigFile::rFileLayout" > < / a >
2003-07-05 00:40:44 +00:00
std::list< < a class = "el" href = "classZE_1_1ZConfigFile_1_1ZCF__Section.html" > ZCF_Section< / a > > < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#n0" > rFileLayout< / a > < / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > List of sections of internal type.< / em > < br > < br > < / td > < / tr >
2003-04-27 22:15:26 +00:00
< tr > < td nowrap align = right valign = top > < a name = "n1" doxytag = "ZE::ZConfigFile::rFilename" > < / a >
2003-07-05 00:40:44 +00:00
std::string < / td > < td valign = bottom > < a class = "el" href = "classZE_1_1ZConfigFile.html#n1" > rFilename< / a > < / td > < / tr >
< tr > < td > < / td > < td > < em class = "mdesc" > Filename of file currently open.< / em > < br > < br > < / td > < / tr >
2003-04-27 22:15:26 +00:00
< / table >
< hr > < h2 > Constructor & Destructor Documentation< / h2 >
< a name = "a0" doxytag = "ZE::ZConfigFile::ZConfigFile" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > ZE::ZConfigFile::ZConfigFile < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
A no-op default constructor. < / td >
< / tr >
< / table >
< a name = "a1" doxytag = "ZE::ZConfigFile::ZConfigFile" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > ZE::ZConfigFile::ZConfigFile < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname1" valign = "top" nowrap > < em > filename< / em > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Constructor takes filename, and calls process on it. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > filename< / em > < / td > < td > File to load as < a class = "el" href = "classZE_1_1ZConfigFile.html" > ZConfigFile< / a > . < / td > < / tr >
< / table >
< / dl >
< / td >
< / tr >
< / table >
< a name = "a2" doxytag = "ZE::ZConfigFile::~ZConfigFile" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > ZE::ZConfigFile::~ZConfigFile < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > < code > [virtual]< / code > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Flushes the file, ensures a flush if the file is left open. < / td >
< / tr >
< / table >
< hr > < h2 > Member Function Documentation< / h2 >
< a name = "b0" doxytag = "ZE::ZConfigFile::CleanString" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string ZE::ZConfigFile::CleanString < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname1" valign = "top" nowrap > < em > str< / em > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > const< code > [protected]< / code > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
2003-07-05 00:40:44 +00:00
Removes whitespace from a std::string and makes all characters lowercase. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
2003-04-27 22:15:26 +00:00
< table border = "0" cellspacing = "2" cellpadding = "0" >
2003-07-05 00:40:44 +00:00
< tr > < td valign = top > < em > str< / em > < / td > < td > The std::string to get a clean version of. < / td > < / tr >
2003-04-27 22:15:26 +00:00
< / table >
< / dl >
2003-07-05 00:40:44 +00:00
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > Cleaned std::string. < / dd > < / dl >
2003-04-27 22:15:26 +00:00
< / td >
< / tr >
< / table >
< a name = "b1" doxytag = "ZE::ZConfigFile::Exists" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > bool ZE::ZConfigFile::Exists < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname1" valign = "top" nowrap > < em > sec< / em > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > const< code > [protected]< / code > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Find out if a section currently exists. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > sec< / em > < / td > < td > Section to check for. < / td > < / tr >
< / table >
< / dl >
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > bool, true if section exists in file. < / dd > < / dl >
< / td >
< / tr >
< / table >
< a name = "b2" doxytag = "ZE::ZConfigFile::Exists" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > bool ZE::ZConfigFile::Exists < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > sec< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > const< code > [protected]< / code > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Find out if a variable currently exists. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > sec< / em > < / td > < td > Section to check in. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Variable to check for. < / td > < / tr >
< / table >
< / dl >
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > bool, true if section exists in file. < / dd > < / dl >
< / td >
< / tr >
< / table >
< a name = "b3" doxytag = "ZE::ZConfigFile::SetVariable" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::SetVariable < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > sec< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > val< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > < code > [protected]< / code > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Set variable to value, called internally only. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > sec< / em > < / td > < td > Section for variable. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Variable to set. < / td > < / tr >
< tr > < td valign = top > < em > val< / em > < / td > < td > Value to set variable to. < / td > < / tr >
< / table >
< / dl >
< / td >
< / tr >
< / table >
< a name = "b4" doxytag = "ZE::ZConfigFile::GetVariable" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string ZE::ZConfigFile::GetVariable < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > sec< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > defVal< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > const< code > [protected]< / code > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Get value of variable, called internally only. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > sec< / em > < / td > < td > Section for variable. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Variable to get. < / td > < / tr >
< tr > < td valign = top > < em > defVal< / em > < / td > < td > Value to return if variable doesnt exist. < / td > < / tr >
< / table >
< / dl >
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > Value of variable. < / dd > < / dl >
< / td >
< / tr >
< / table >
< a name = "a3" doxytag = "ZE::ZConfigFile::Process" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::Process < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname1" valign = "top" nowrap > < em > filename< / em > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Parses the file, reading the contents into the fileLayout map. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > filename< / em > < / td > < td > File to parse and attach this ZDataFile to. < / td > < / tr >
< / table >
< / dl >
< / td >
< / tr >
< / table >
< a name = "a4" doxytag = "ZE::ZConfigFile::GetFloat" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > float ZE::ZConfigFile::GetFloat < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
< td class = "md" nowrap > float < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname" nowrap > < em > defVal< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > const< / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Get the current value of a variable in the file, or defVal if not found in file. < dl compact > < dt > < b > Since:< / b > < / dt > < dd > 0.8.3 < / dd > < / dl >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to seek variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to seek value for. < / td > < / tr >
< tr > < td valign = top > < em > defVal< / em > < / td > < td > Value to return if var does not exist within section. < / td > < / tr >
< / table >
< / dl >
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > Contents of the variable in floating point format. < / dd > < / dl >
< / td >
< / tr >
< / table >
< a name = "a5" doxytag = "ZE::ZConfigFile::GetInt" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > int ZE::ZConfigFile::GetInt < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
< td class = "md" nowrap > int < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname" nowrap > < em > defVal< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > const< / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Get the current value of a variable in the file, or defVal if not found in file. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to seek variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to seek value for. < / td > < / tr >
< tr > < td valign = top > < em > defVal< / em > < / td > < td > Value to return if var does not exist within section. < / td > < / tr >
< / table >
< / dl >
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > Contents of the variable in integer format. < / dd > < / dl >
< / td >
< / tr >
< / table >
< a name = "a6" doxytag = "ZE::ZConfigFile::GetBool" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > bool ZE::ZConfigFile::GetBool < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
< td class = "md" nowrap > bool < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname" nowrap > < em > defVal< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > const< / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Get the current value of a variable in the file, or defVal if not found in file. (Valid values are "0","1","true" and "false") < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to seek variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to seek value for. < / td > < / tr >
< tr > < td valign = top > < em > defVal< / em > < / td > < td > Value to return if var does not exist within section. < / td > < / tr >
< / table >
< / dl >
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > Contents of the variable in boolean format. < / dd > < / dl >
< / td >
< / tr >
< / table >
< a name = "a7" doxytag = "ZE::ZConfigFile::GetString" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string ZE::ZConfigFile::GetString < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > defVal< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > const< / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Get the current value of a variable in the file, or defVal if not found in file. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to seek variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to seek value for. < / td > < / tr >
< tr > < td valign = top > < em > defVal< / em > < / td > < td > Value to return if var does not exist within section. < / td > < / tr >
< / table >
< / dl >
2003-07-05 00:40:44 +00:00
< dl compact > < dt > < b > Returns:< / b > < / dt > < dd > Contents of the variable in std::string format. < / dd > < / dl >
2003-04-27 22:15:26 +00:00
< / td >
< / tr >
< / table >
< a name = "a8" doxytag = "ZE::ZConfigFile::SetFloat" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::SetFloat < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
< td class = "md" nowrap > float < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname" nowrap > < em > val< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Set the new value of a variable in the file to val, creating the section and variable if not already found in file. < dl compact > < dt > < b > Since:< / b > < / dt > < dd > 0.8.3 < / dd > < / dl >
< dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to edit variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to set value for. < / td > < / tr >
< tr > < td valign = top > < em > val< / em > < / td > < td > Floating point value to set variable to in file. < / td > < / tr >
< / table >
< / dl >
< / td >
< / tr >
< / table >
< a name = "a9" doxytag = "ZE::ZConfigFile::SetInt" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::SetInt < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
< td class = "md" nowrap > int < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname" nowrap > < em > val< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Set the new value of a variable in the file to val, creating the section and variable if not already found in file. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to edit variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to set value for. < / td > < / tr >
< tr > < td valign = top > < em > val< / em > < / td > < td > Integer value to set variable to in file. < / td > < / tr >
< / table >
< / dl >
< / td >
< / tr >
< / table >
< a name = "a10" doxytag = "ZE::ZConfigFile::SetBool" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::SetBool < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
< td class = "md" nowrap > bool < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname" nowrap > < em > val< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Set the new value of a variable in the file to val, creating the section and variable if not already found in file. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to edit variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to set value for. < / td > < / tr >
< tr > < td valign = top > < em > val< / em > < / td > < td > Boolean value to set variable to in file. < / td > < / tr >
< / table >
< / dl >
< / td >
< / tr >
< / table >
< a name = "a11" doxytag = "ZE::ZConfigFile::SetString" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::SetString < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap valign = "top" > std::string < / td >
< td class = "mdname" nowrap > < em > section< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > var< / em > , < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td > < / td >
2003-07-05 00:40:44 +00:00
< td class = "md" nowrap > std::string < / td >
< td class = "mdname" nowrap > < em > val< / em > < / td >
2003-04-27 22:15:26 +00:00
< / tr >
< tr >
< td > < / td >
< td class = "md" > ) < / td >
< td class = "md" colspan = "2" > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Set the new value of a variable in the file to val, creating the section and variable if not already found in file. < dl compact > < dt > < b > Parameters:< / b > < / dt > < dd >
< table border = "0" cellspacing = "2" cellpadding = "0" >
< tr > < td valign = top > < em > section< / em > < / td > < td > Name of section to edit variable under. < / td > < / tr >
< tr > < td valign = top > < em > var< / em > < / td > < td > Name of variable to set value for. < / td > < / tr >
< tr > < td valign = top > < em > val< / em > < / td > < td > String value to set variable to in file. < / td > < / tr >
< / table >
< / dl >
< / td >
< / tr >
< / table >
< a name = "a12" doxytag = "ZE::ZConfigFile::Flush" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::Flush < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Writes all values and sections to file. < / td >
< / tr >
< / table >
< a name = "a13" doxytag = "ZE::ZConfigFile::Close" > < / a > < p >
< table width = "100%" cellpadding = "2" cellspacing = "0" border = "0" >
< tr >
< td class = "md" >
< table cellpadding = "0" cellspacing = "0" border = "0" >
< tr >
< td class = "md" nowrap valign = "top" > void ZE::ZConfigFile::Close < / td >
< td class = "md" valign = "top" > ( < / td >
2003-07-05 00:40:44 +00:00
< td class = "mdname1" valign = "top" nowrap > < / td >
< td class = "md" valign = "top" > ) < / td >
2003-04-27 22:15:26 +00:00
< td class = "md" nowrap > < / td >
< / tr >
< / table >
< / td >
< / tr >
< / table >
< table cellspacing = 5 cellpadding = 0 border = 0 >
< tr >
< td >
< / td >
< td >
< p >
Flush the file and clear the filename. < / td >
< / tr >
< / table >
< hr > The documentation for this class was generated from the following files:< ul >
< li > /include/< a class = "el" href = "ZE__ZConfigFile_8h-source.html" > ZE_ZConfigFile.h< / a > < li > /src/< a class = "el" href = "ZE__ZConfigFile_8cpp.html" > ZE_ZConfigFile.cpp< / a > < / ul >
2003-07-05 00:40:44 +00:00
< hr > < address style = "align: right;" > < small > Generated on Sun Jun 29 14:13:51 2003 for ZEngine by
2003-04-27 22:15:26 +00:00
< a href = "http://www.doxygen.org/index.html" >
< img src = "doxygen.png" alt = "doxygen" align = "middle" border = 0
2003-07-05 00:40:44 +00:00
width=110 height=53>< / a > 1.3 < / small > < / address >
2003-04-27 22:15:26 +00:00
< / body >
< / html >