From e1a627ccd007460eb247153fa480c83e4f0a8b38 Mon Sep 17 00:00:00 2001 From: James Turk Date: Mon, 10 Feb 2003 03:19:37 +0000 Subject: [PATCH] Added Get/SetFloat. --- include/ZE_ZConfigFile.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/include/ZE_ZConfigFile.h b/include/ZE_ZConfigFile.h index 18e4201..5cf1c03 100644 --- a/include/ZE_ZConfigFile.h +++ b/include/ZE_ZConfigFile.h @@ -13,7 +13,7 @@ File: Types/ZE_ZConfigFile.h
Description: Header file for ZEngine INI-Style Config Files.
Author(s): James Turk
-$Id: ZE_ZConfigFile.h,v 1.6 2003/01/16 05:46:39 cozman Exp $
+$Id: ZE_ZConfigFile.h,v 1.7 2003/02/10 03:19:37 cozman Exp $
\file ZE_ZConfigFile.h \brief Definition file for ZConfigFile. @@ -158,6 +158,18 @@ class ZConfigFile : public ZObject **/ void Process(string filename); + /*! + \brief Get value in floating point format from file. + + Get the current value of a variable in the file, or defVal if not found in file. + \since 0.8.3 + \param section Name of section to seek variable under. + \param var Name of variable to seek value for. + \param defVal Value to return if var does not exist within section. + \return Contents of the variable in floating point format. + **/ + float GetFloat(string section, string var, float defVal) const; + /*! \brief Get value in integer format from file. @@ -192,6 +204,18 @@ class ZConfigFile : public ZObject **/ string GetString(string section, string var, string defVal) const; + /*! + \brief Set value in floating point format in file. + + Set the new value of a variable in the file to val, creating the section and variable + if not already found in file. + \since 0.8.3 + \param section Name of section to edit variable under. + \param var Name of variable to set value for. + \param val Floating point value to set variable to in file. + **/ + void SetFloat(string section, string var, float val); + /*! \brief Set value in integer format in file.