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

Revision 3220, 982 bytes checked in by mattausch, 16 years ago (diff)

worked on video replay function

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        Options are stored as name / value pair
19*/
20class Environment
21{
22public:
23
24        /** Reads the environment
25        */
26        bool Read(const std::string &filename);
27
28        bool GetFloatParam(std::string &name, float &val) const;
29        bool GetIntParam(std::string &name, int &val) const;
30        bool GetVectorParam(std::string &name, Vector3 &val) const;
31        bool GetBoolParam(std::string &name, bool &val) const;
32        bool GetStringParam(std::string &name, std::string &val) const;
33
34
35protected:
36
37        /** Parse this string, return tokens separated by given delimiters
38        */
39        void Tokenize(const std::string& str, std::vector<std::string> &tokens, const std::string &delim = " ") const;
40
41        std::map<std::string, std::string> mParams;
42};
43
44}
45#endif
Note: See TracBrowser for help on using the repository browser.