source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Environment.h @ 2828

Revision 2828, 868 bytes checked in by mattausch, 16 years ago (diff)
Line 
1#ifndef __Environment_H__
2#define __Environment_H__
3
4
5#include <string>
6#include <iostream>
7#include <fstream>
8#include <map>
9
10#include "common.h"
11#include "Vector3.h"
12
13
14namespace CHCDemoEngine
15{
16
17/** Loads startup environment for the demo
18*/
19class Environment
20{
21public:
22
23        /** Reads the environment
24        */
25        bool Read(const std::string &filename);
26
27        bool GetFloatParam(std::string &str, float &val) const;
28        bool GetIntParam(std::string &str, int &val) const;
29        bool GetVectorParam(std::string &str, Vector3 &val) const;
30        bool GetBoolParam(std::string &str, bool &val) const;
31
32protected:
33
34        /** Parse this string, return tokens separated by given delimiters
35        */
36        void Tokenize(const std::string& str, std::vector<std::string> &tokens, const std::string &delim = " ") const;
37
38        std::map<std::string, std::string> mParams;
39};
40
41}
42#endif
Note: See TracBrowser for help on using the repository browser.