#ifndef __Environment_H__ #define __Environment_H__ #include #include #include #include #include "common.h" #include "Vector3.h" namespace CHCDemoEngine { /** Loads startup environment for the demo */ class Environment { public: /** Reads the environment */ bool Read(const std::string &filename); bool GetFloatParam(std::string &str, float &val) const; bool GetIntParam(std::string &str, int &val) const; bool GetVectorParam(std::string &str, Vector3 &val) const; bool GetBoolParam(std::string &str, bool &val) const; protected: /** Parse this string, return tokens separated by given delimiters */ void Tokenize(const std::string& str, std::vector &tokens, const std::string &delim = " ") const; std::map mParams; }; } #endif