config.h

00001 #ifndef CONFIG_H
00002 #define CONFIG_H
00003 
00004 #include "irrlicht.h"
00005 
00007 
00016 class Config  : public irr::IStringParameters
00017 {
00018     public:
00019 
00022         Config(irr::IrrlichtDevice* d);
00023 
00025         ~Config();
00026 
00029         void loadConfig(irr::c8* fileName);
00030 
00035         void safeConfig(irr::c8* description, irr::c8* fileName);
00036 
00041         void safeDefaultConfig(const irr::c8* fileName);
00042 
00046         virtual void setParameter(const irr::c8* parameterName, const irr::c8* value);
00047 
00052         virtual const irr::c8* getParameter(const irr::c8* parameterName);
00053 
00055         virtual void setParameter(const irr::c8* parameterName, bool value);
00056 
00061         virtual bool getParameterAsBool(const irr::c8* parameterName);
00062 
00064         virtual void setParameter(const irr::c8* parameterName, irr::s32 value);
00065 
00070         virtual irr::s32 getParameterAsInt(const irr::c8* parameterName);
00071 
00073         virtual void setParameter(const irr::c8* parameterName, irr::f32 value);
00074 
00079         virtual irr::f32 getParameterAsFloat(const irr::c8* parameterName);
00080 
00082         virtual irr::s32 getParameterCount();
00083 
00086         virtual const irr::c8* getParameterName(irr::s32 index);
00087 
00090         virtual const irr::c8* getParameterValue(irr::s32 index);
00091 
00092     protected:
00093 
00094     private:
00095 
00096         struct SStringPair
00097         {
00098             irr::core::stringc Name;
00099             irr::core::stringc Value;
00100         };
00101 
00102         SStringPair* getParameterP(const irr::c8* parameterName);
00103 
00104         irr::core::array<SStringPair> Parameters;
00105         irr::IrrlichtDevice* device;
00106 };
00107 
00108 #endif // CONFIG_H

Generated on Sun Dec 2 17:09:57 2007 for Swarm by  doxygen 1.4.6-NO