[Gcblue-commits] gcb_wx/include/common tcOptions.h,1.5,1.6
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-05-08 21:25:34
|
Update of /cvsroot/gcblue/gcb_wx/include/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19946/include/common Modified Files: tcOptions.h Log Message: Index: tcOptions.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/common/tcOptions.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcOptions.h 29 Feb 2004 22:51:35 -0000 1.5 --- tcOptions.h 8 May 2004 21:25:25 -0000 1.6 *************** *** 1,6 **** /* ! ** tcOptions.h ** ! ** Copyright (C) 2003 Dewitt "Cole" Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- /* ! ** @file tcOptions.h ** ! ** Copyright (C) 2003-2004 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 25,32 **** --- 25,36 ---- #include "wx/wx.h" + #include <string> #define N_OPTIONS 32 // max number of options #define N_OPTION_VALUES 4 // max number of states for each option + class TiXmlDocument; + class TiXmlNode; + struct tsOptionInfo { *************** *** 42,46 **** }; ! // TODO: fix option drawing class tcOptions { --- 46,57 ---- }; ! /** ! * A singleton class for game configuration options ! * Eventually the older binary options format will be replaced with ! * XML. Currently XML can handle string options via GetOptionString ! * and SetOptionString. ! * ! * TODO: fix option drawing ! */ class tcOptions { *************** *** 61,71 **** void AddOption(tsOptionInfo& oi); ! int Init(void); ! void Synchronize(void); void Serialize(int abRead); ! tcOptions(); ! virtual ~tcOptions(); private: }; --- 72,93 ---- void AddOption(tsOptionInfo& oi); ! ! const char* GetOptionString(const char* optionName); ! bool OptionStringExists(const char* optionName) const; ! void SetOptionString(const char* optionName, const char* optionValue); ! ! void Synchronize(); void Serialize(int abRead); ! ! static tcOptions* Get(); ///< accessor for singleton instance ! private: + TiXmlDocument *optionsXml; ///< XML options file + TiXmlNode* rootNode; ///< root node for XML options file + int Init(); + + tcOptions(); + ~tcOptions(); }; |